For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Storefront
      • Management
        • Overview
          • Addresses
          • Authentication
          • Channels
          • Company
          • Invoice Management
          • Orders
            • GETList Orders
            • POSTCreate Order
            • GETGet Order
            • PUTUpdate Order
            • PUTReassign Orders to Different Company
            • GETList Order Products
            • PUTAssign Customer Orders to Company
            • GETList Order Extra Field Configs
          • Payment
          • Quotes
          • Sales Staff
          • Shopping List
          • Super Admin
          • Users
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTB2BManagementOrders

Assign Customer Orders to Company

PUT
https://api-b2b.bigcommerce.com/api/v3/io/customers/:customerId/orders/b2b
PUT
/api/v3/io/customers/:customerId/orders/b2b
$curl -X PUT https://api-b2b.bigcommerce.com/api/v3/io/customers/321/orders/b2b \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "code": 200,
3 "data": {
4 "total": 3
5 },
6 "message": "SUCCESS"
7}
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).
Was this page helpful?
Previous

List Order Products

Next

List Order Extra Field Configs

Built with

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.

Authentication

X-Auth-Tokenstring
HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

X-Store-Hashstring
HeaderArgumentDescription
X-Store-Hashstore_hashThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.

Path parameters

customerIdintegerRequired
The ID of a BigCommerce customer account with a corresponding Company user account.

Response

OK
codeintegerDefaults to 200
HTTP Response Code
dataobject
messagestringDefaults to SUCCESS

Errors

404
Not Found Error