Company
A company in B2B Edition corresponds one-to-one with a customer group in BigCommerce. You can do the mapping through the bc_group_id
field. Once established, you cannot change this corresponding relationship. You can only delete it. Note that you cannot merge BigCommerce customer groups or B2B Edition companies.
This diagram details the relation between customer groups and companies:
The best practice for using these Company APIs is to maintain unidirectional data flow, with B2B Edition endpoints as the primary touchpoint. By default B2B Edition's company operations handle modifying linked BigCommerce customer group data (add, update, and delete).
Get All Companies
GET https://api-b2b.bigcommerce.com/api/v3/io/companiesRequest
Authentication
- authToken in header
Parameters
- limit in query with default of 10 - integerPagination limit
- offset in query0 - integerPagination offset
- minModified in query - numberMinimum modified timestamp
- maxModified in query - numberMaximum modified timestamp
- minCreated in query - numberMinimum created timestamp
- maxCreated in query - numberMaximum created timestamp
- sortBy in query with default of updatedAt - stringSort the result by a specific company field.Example: updatedAt
Allowed: companyName | updatedAt
- orderBy in query with default of DESC - stringAllow: 'DESC', 'ASC'Example: DESC
Allowed: ASC | DESC
- isIncludeExtraFields in query with default of 0 - stringWhether the response will include extra fields.
Allowed: 0 | 1
- companyStatus in query - integer0: PENDING 1: APPROVED 2: REJECTED 3: INACTIVE
Allowed: 0 | 1 | 2 | 3
- q in query - stringCompany query string
- extraFields in query - arrayFilter by extra fields.Type: array[string]
- bcOrderId in query - integerA company purchases a BigCommerce order ID, which allows you to find the company by BigCommerce order ID.Example: 2
- orderId in query - stringCompany purchase order ID
- bcGroupId in query - stringBigCommerce customer group ID
- customerId in query - integerBigCommerce customer ID. This customer should be a B2B company user.
- extraFieldFilterType in query with default of search - stringExtra field filter type. The search filter type allows for partial matches, while the exact-match filter type only returns results that exactly match the specified criteria.
Allowed: search | exact-match
example
Response
Body
codenumber
requireddataarray[object]
required
include extra fields
standard response
Create a Company
POST https://api-b2b.bigcommerce.com/api/v3/io/companiesRequest
Create a company.
When the
independent company behavior
is enabled, the system will not automatically create a dedicated customer group for each new Company account. Instead, you can assign a customer group to a Company account as needed using thecustomerGroupId
field. If thecustomerGroupId
field is not provided, the B2B company will be associated with your configured default customer group. If you have not configured a default customer group or set the value ofcustomerGroupId
to 0, the B2B company will not be associated with any customer group, and the company users within the company will have their corresponding customer record assigned to "No Group" in BigCommerce.When the
independent company behavior
is turned off, a new customer group will be automatically created and associated with each new Company account. In this case, you will not use thecustomerGroupId
field.
Authentication
- authToken in header
Body
extraFieldsarray[object]
userExtraFieldsarray[object]
companyNamestring
requiredThe company name, if you want to specify it.>= 1 characterscompanyPhonestring
requiredcompanyEmailstring
required>= 1 charactersaddressLine1string
addressLine2string
citystring
>= 1 charactersstatestring
>= 1 characterscountrystring
required>= 1 charactersCountry full name or ISO2 country code. For Example:
A Country full name: Afghanistan
ISO2 Country code: AF
zipCodestring
adminFirstNamestring
requiredThe company first admin user first name>= 1 charactersadminLastNamestring
requiredThe company first admin user's last name>= 1 charactersadminEmailstring
requiredThe company first admin user email>= 1 charactersadminPhoneNumberstring
The company first admin user phone number>= 1 characterscatalogIdinteger
BigCommerce price list ID that company related>= 1 charactersacceptCreationEmailboolean
True: Sends an email notification about the company creation to the admin user; False: Does not send the notification.Default: false
channelIdsarray[integer]
BigCommerce channel ID listoriginChannelIdinteger
BigCommerce channel ID, used for BigCommerce customer origin channel ID. This field takes effect only when you do not configure the store default B2B channel.customerGroupIdinteger
BigCommerce Customer Group ID. Used to associate a BigCommerce Customer Group to a B2B company when the independent company behavior is enabled.
example-1
Response
Body
codeinteger
requireddataobject
required
example-1
Get a Company Detail
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}Request
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
example
Response
Body
codenumber
requireddataobject
required
example-1
Update a Company
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}Request
Update a company's attributes.
When you enable
independent company behavior
, you can assign a customer group to a Company using thecustomerGroupId
field. Once assigned, the customer group will be associated with all users within that Company. IfcustomerGroupId
is set to 0, the customer group association will be removed from the Company, and all users within the Company will no longer have a group assigned. ThepriceListAssign
field will not take effect; please configure the price list for the customer group directly in the BigCommerce control panel.When you turn off
independent company behavior
, thecustomerGroupId
field will not take effect. You cannot change the association between B2B companies and BigCommerce customer groups. You will use thepriceListAssign
field to configure the price list assigned to the Company.
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
Body
companyNamestring
>= 1 characterscompanyPhonestring
companyEmailstring
>= 1 charactersaddressLine1string
addressLine2string
citystring
>= 1 charactersstatestring
>= 1 characterscountrystring
>= 1 charactersCountry full name or ISO2 country code. For Example:
A Country full name: Afghanistan
ISO2 Country code: AF
zipCodestring
extraFieldsarray[object]
To use customized extra fields with field names you need to first add company extra fields in Settings > Extra fields inside B2B edition.
e.g., If you want to create a new company with an extra integer field named licenseNO, you can use this structure [{'fieldName': 'LicenseNO', 'fieldValue': 10342340323}] in the request body.
uuidstring
Company UUID indicates external IDpriceListAssignarray[object]
This field is only enable for MSF storecustomerGroupIdinteger
BigCommerce Customer Group ID. Used to associate a BigCommerce Customer Group to a B2B company when the independent company behavior is enabled.
example
Response
Body
codenumber
requireddataobject
requiredReturn company ID.
example-1
Delete a Company
DELETE https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}Request
Delete A Company.
When you turn off
independent company behavior
. Deleting a company will also delete the corresponding BigCommerce Customer Group.When you enable
independent company behavior
. Deleting a company will not affect the customer group associated with the company.
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
example
Response
Body
codeinteger
dataobject
example-1
Convert from BigCommerce CustomerGroup into Company
POST https://api-b2b.bigcommerce.com/api/v3/io/customer-groups/{customerGroupId}/companiesRequest
Create company from a BigCommerce customer group.
- This API is turned off for the MSF store.
- This API is turned off when the independent company feature is enabled.
Authentication
- authToken in header
Parameters
- customerGroupId in path - stringrequired
Body
companyNamestring
requiredCompany name>= 1 characterscompanyPhonestring
requiredCompany phone number>= 1 characterscompanyEmailstring
requiredCompany email>= 1 charactersaddressLine1string
>= 1 charactersaddressLine2string
>= 1 characterscitystring
>= 1 charactersstatestring
>= 1 characterscountrystring
required>= 1 characterszipCodestring
>= 1 charactersadminFirstNamestring
>= 1 charactersadminLastNamestring
>= 1 charactersadminEmailstring
required>= 1 charactersadminPhoneNumberstring
required>= 1 characterscatalogIdinteger
The company catalog IDacceptCreationEmailboolean
If the company creation can accept emailDefault: false
extraFieldsarray[object]
userExtraFieldsarray[object]
example-1
Response
Body
codeinteger
requireddataobject
required
example-1
Bulk Create Companies
POST https://api-b2b.bigcommerce.com/api/v3/io/companies/bulkRequest
Bulk create companies
- When the
independent company behavior
is enabled, the system will not automatically create a dedicated customer group for each new Company account. Instead, you can assign a customer group to a Company account as needed using thecustomerGroupId
field. If thecustomerGroupId
field is not provided, the B2B company will be associated with the configured default customer group. If you have not configured a default customer group, the B2B company will not be associated with any customer group, and the company users within the company will have their corresponding customer record assigned to "No Group" in BigCommerce. - When the
independent company behavior
is turned off, a new customer group will be automatically created and associated with each new Company account. In this case, you will not use thecustomerGroupId
field.
Authentication
- authToken in header
Body
companyNamestring
Name of this company>= 1 characters<= 200 charactersExample: TeslaaddressLine1string
Address line 1 of ths company.<= 200 charactersExample: 1600 Pennsylvania Avenue NWaddressLine2string
Address line 2 of ths company.<= 200 charactersExample: Washington, DC 22202citystring
City name of the company.<= 100 charactersExample: Detroitstatestring
State of the company.<= 50 charactersExample: State of TexaszipCodestring
Zip code of the company.<= 50 charactersExample: 100000countrystring
Country of the company.<= 200 charactersExample: UScompanyEmailstring
Contact email of this company.<= 200 charactersExample: dev.b2b@test.netcompanyPhonestring
Phone number of the company.<= 50 charactersExample: 9090980catalogNamestring
Name of this company's catalog.Example: catalogadminFirstNamestring
First name of the company's administrator.>= 1 characters<= 100 charactersExample: TomadminLastNamestring
Last name of the company's administrator.>= 1 characters<= 100 charactersExample: CatadminEmailstring
Email address of the company's administrator.>= 1 characters<= 100 charactersExample: dev.b2b@test.netadminPhoneNumberstring
Phone number of the company's administrator.>= 1 characters<= 100 charactersExample: 1223312acceptWelcomeEmailboolean
If user accepts, the system sends a welcome email.extraFieldsobject
Extra fields you want to add to the company fields.channelIdsarray[integer]
BigCommerce channel ID listoriginChannelIdinteger
BigCommerce channel ID, used for BigCommerce customer origin channel ID. This field takes effect only when you do not configure the store default B2B channel.customerGroupIdinteger
BigCommerce Customer Group ID. Used to associate a BigCommerce Customer Group to a B2B company when the independent company behavior is enabled.
userExtraFieldsarray[object]
example-1
Response
Body
codeinteger
requiredExample: 200dataobject
example-1
Update Companies (Batch)
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/bulkRequest
Batch update companies.
When the
independent company behavior
is enabled, you can assign a customer group to a company using thecustomerGroupId
field. Once assigned, the customer group will be associated with all users within that company. IfcustomerGroupId
is set to 0, the customer group association will be removed from the company, and all users within the company will no longer have a group assigned. ThepriceListAssign
field will not take effect; please configure the price list for the customer group directly in the BigCommerce control panel.When the
independent company behavior
is turned off, thecustomerGroupId
field will not take effect. You cannot change the association between B2B companies and BigCommerce customer groups. You will use thepriceListAssign
field to configure the price list assigned to the company.
Authentication
- authToken in header
Body
companyIdstring
required>= 1 characterscompanyNamestring
>= 1 characterscompanyPhonestring
companyEmailstring
>= 1 charactersaddressLine1string
addressLine2string
citystring
>= 1 charactersstatestring
>= 1 characterscountrystring
>= 1 characterszipCodestring
extraFieldsarray[object]
priceListAssignarray[object]
customerGroupIdinteger
BigCommerce Customer Group ID. Used to associate a BigCommerce Customer Group to a B2B company when the independent company behavior is enabled.
example-1
Response
Body
codenumber
requireddataobject
required
example-1
Update a Company Catalog
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/catalogsRequest
Authentication
- authToken in header
Parameters
- companyId in path - integerrequiredUnique ID of company entity
Body
catalogIdstring
requiredThe catalog ID you want to update>= 1 characters
example-1
Response
Body
codenumber
requireddataobject
required
example-1
Update a Company Status
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/statusRequest
Authentication
- authToken in header
Parameters
- companyId in path - integerrequiredUnique ID of company entity
Body
companyStatusnumber
requiredCompany status you want to set 0: PENDING 1: APPROVED 2: REJECTED 3: INACTIVE 4: DELETED
example-1
Response
Body
codenumber
requireddataobject
required
example-1
Get Company Extra Field Configs
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/extra-fieldsRequest
Authentication
- authToken in header
Parameters
- offset in query - numberPagination offset default: 0
- limit in query - stringPagination limit default: 10
example
Response
Body
codeinteger
Response code of success request.Example: 200dataarray[object]
example
Get Company Attachments
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/attachmentsRequest
Authentication
- authToken in header
Parameters
- companyId in path - numberrequiredcompany Id
example
Response
Body
codenumber
Example: 200dataarray[object]
Example 1
Add Company Attachment
POST https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/attachmentsRequest
Each company can upload a maximum of 10 attachments.
The API rate limit is 15/min per store.
The attachments support the following file types:
- Images, including bmp, gif, ico, jpeg, jpg, png, svg, tif, tiff, webp, wbmp, xbm.
- DOC, DOCX
- XLS, XLSX
- CSV
Authentication
- authToken in header
Parameters
- companyId in path - numberrequiredcompany Id
Body
Response
Body
codenumber
Default: 200
dataobject
Example 1
Delete Company Attachment
DELETE https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/attachments/{attachmentId}Request
Authentication
- authToken in header
Parameters
- companyId in path - numberrequiredcompany ID
- attachmentId in path - stringrequiredattachment ID
example
Response
Body
codenumber
Default: 200
dataobject
Example 1
See something you can improve? Edit this file on GitHub