Skip to main content
POST
/
orders
/
actions
/
update-customer
Update customer details for given order IDs
curl --request POST \
  --url https://api.fabric.inc/v3/orders/actions/update-customer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '
{
  "accountId": "62272e917b12209e68751d94",
  "company": "Demo Inc",
  "email": "[email protected]",
  "employeeId": "62272e917b12209e68751d94",
  "name": {
    "firstName": "Alex",
    "lastName": "Doe",
    "middleName": "E"
  },
  "phone": {
    "number": "123-456-7890",
    "type": "MOBILE"
  },
  "userId": "62272e917b12209e68751d94"
}
'
{
  "failedCount": 2,
  "failedOrderIds": [
    "123k4h123k",
    "123k4h124k"
  ],
  "successCount": 18,
  "totalRecordCount": 10
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-fabric-tenant-id
string
required

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

x-fabric-channel-id
string
required

x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.

x-fabric-request-id
string

Unique request ID

Body

application/json

Update customer info request

accountId
string

Customer's loyalty account ID or external identifier that is used to track their loyalty program activity and rewards earned.

Example:

"62272e917b12209e68751d94"

company
string

Shopper's company name. This may be used for company discounts.

Example:

"Demo Inc"

email
string

Contact person's email

employeeId
string

Employee (ID or name) who initiated an update request

Example:

"62272e917b12209e68751d94"

name
object

Contact person's name

phone
object

Contact person's phone details.

userId
string

Identifier of the logged in user who initiated the request. This could be from either fabric Identity service or an external Identity service.

Example:

"62272e917b12209e68751d94"

Response

OK

Response for customer update request

failedCount
integer<int32>

Failed count

Example:

2

failedOrderIds
string[]

OrderIds of orders for which update failed

OrderIds of orders for which update failed

Example:
["123k4h123k", "123k4h124k"]
successCount
integer<int32>

Success count

Example:

18

totalRecordCount
integer<int32>

Total record count

Example:

10