Assign Customer Orders to Company
Associates orders from a buyer to their Company account based on the `customerId` entered. This endpoint is useful if a buyer has orders they placed before applying for or being added to a Company account.
The `customerId` parameter must include a valid BigCommerce customer ID for the request to be successful. This is different from the B2B Edition Company user ID returned by some B2B API endpoints, such as the `id` field in [Get Users](/developer/api-reference/rest/b2b/management/users).
Authentication
X-Auth-Tokenstring
### Authentication header
| Header | Argument | Description |
|:-------|:---------|:------------|
| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts). |
### Further reading
For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).
For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).
For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
X-Store-Hashstring
### Authentication header
| Header | Argument | Description |
|:-------|:---------|:------------|
| `X-Store-Hash` | `store_hash` | The unique store hash associated with a BigCommerce store that has B2B Edition enabled. |
Path parameters
customerId
The ID of a BigCommerce customer account with a corresponding Company user account.
Response
OK
code
HTTP Response Code
data
message
Errors
404
Not Found Error