BizKitHub
DocsAPI ReferenceOrder/bff/order/add-customer
postOrderAdmin BFF

/bff/order/add-customer

Adds a row to shop__order_customer linking the contact to the order. Resolves the target by cuRefNo (preferred) or email (auto-creates a contact if none matches). Refuses to link the org's anonymous fallback contact. Idempotent — already-linked contacts return alreadyLinked: true. When the order previously had no linked customers, the new row becomes primary and shop__order.customer_id is updated to match.

OrderpostBffOrderAdd-customer

Parameters

JSON body

Request body

application/json
hashstringRequired

Unique order hash identifier.

cuRefNostringOptional

16-char customer reference number.

emailstringOptional

Contact e-mail (existing or new — new e-mails auto-create a contact).

Response schema

1 status code documented

200Success
successbooleanRequired
Default: true
alreadyLinkedbooleanOptional
contactIdnumberOptional
primaryCustomerbooleanOptional

Response example

application/json
{
  "success": true,
  "alreadyLinked": false,
  "contactId": 0,
  "primaryCustomer": false
}

Request example

POST /bff/order/add-customer

post
curl -X POST "https://api.bizkithub.com/bff/order/add-customer" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "hash": "example_hash",
  "cuRefNo": "example_cuRefNo",
  "email": "example_email"
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key