Server to Server Management APIs
Companies

Companies

Get All Companies

GET /companies

Request

Returns a list of all Company accounts, sorted by companyId from highest to lowest by default. Pass optional parameters to modify the results.

Authentication

  • authToken in header

Parameters

  • limit in query with default of 10 - integer
    Determines the number of records to return per page. If left blank, this defaults to 10.
  • offset in query0 - integer
    The number of results to skip before returning the first result. If left blank, this defaults to 0.
  • minModified in query - number
    The earliest Unix timestamp that can be returned for a modified Company account.
  • maxModified in query - number
    The latest Unix timestamp that can be returned for a modified Company account.
  • minCreated in query - number
    The earliest Unix timestamp that can be returned for a modified Company account.
  • maxCreated in query - number
    The latest Unix timestamp that can be returned for a modified Company account.
  • sortBy in query with default of updatedAt - string
    Sorts results by Company name or last updated date, defaulting to the last updated date if no parameter is provided.
    Example: updatedAt

    Allowed: companyName | updatedAt

  • orderBy in query with default of DESC - string
    Establish a descending or ascending order of results. The order defaults to descending if the parameter is not included.
    Example: DESC

    Allowed: ASC | DESC

  • isIncludeExtraFields in query with default of 0 - string

    Indicates whether or not the response will include Company extra fields. If the parameter is not included, the response will exclude extra fields by default.

    A value of 0 will exclude extra fields, while a value of 1 will include them.

    Allowed: 0 | 1

  • companyStatus in query - integer
    The Company’s activity status. See Company Status Codes to learn about their corresponding statuses.
    Example: 1

    Allowed: 0 | 1 | 2 | 3

  • q in query - string
    Enter a Company name to return partial and exact matches.
  • extraFields in query - array

    Use this array to filter results by an extra field name-value pair.

    Exact usage is formatted as ?extraFields=name:value. Including this filter returns any Company account where the extra field name contains value. To search on more than one extra field, the parameter may be repeated to capture more specific instances such as ?extraFields=name1:value1&extraFields=name2,value2, which will return all Companies where the extra fields name1 and name2 contain value1 and value2, respectively.

    Type: array[string]
  • bcOrderId in query - integer
    The ID of a BigCommerce order placed by a particular Company account.
    Example: 102
  • orderId in query - string
    The ID of a BigCommerce order placed by a particular Company account.
  • bcGroupId in query - string
    The ID of the BigCommerce customer group assigned to the Company account.
  • customerId in query - integer
    The ID of a BigCommerce customer account with a corresponding Company user account.
  • extraFieldFilterType in query with default of search - string

    Establishes how results are filtered when using the extraFields parameter. The search filter type allows for partial matches, while the exact-match filter type only returns results that exactly match the specified criteria.

    The filter type defaults to search when no parameter is provided.

    Allowed: search | exact-match

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/companies \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number

  • data
    array[object]

  • meta
    object

    Used to response pagination information
    Example: {"pagination":{"limit":10,"offset":0,"totalCount":1}}

example

{
"code": 0,
"data": [
{
"companyName": "Great Buys Inc.",
"companyEmail": "admin@greatbuys.com",
"companyPhone": 8001234567,
"companyId": "123456",
"catalogId": "123456",
"catalogName": "string",
"bcGroupName": "Tier 3 B2B Clients",
"companyStatus": "1",
"parentCompany": {
"id": 123456,
"name": "Great Buys Inc"
},
"priceListAssign": [
{
"channelId": 10001234,
"priceListId": 123456,
"priceListName": "Tier 3 B2B Pricing",
"channelName": "My BigCommerce Store"
}
],
"extraFields": [
{
"fieldName": "Customer Tax Code",

Create a Company

POST /companies

Request

Creates a new Company account. This endpoint also creates a Company user account for the administrator of the business.

If you have configured required information fields in your store’s Extra Fields settings for Company accounts or Company users, you must include the field’s name and value in the extraFields array of the request body. For more information on extra fields, see B2B Edition Settings in the Help Center.

After you have created a new Company account, you can configure all of its features and settings by using the Update a Company endpoint.

Independent vs Dependent Companies Behavior

When Independent Company behavior is enabled on your store, 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 the customerGroupId field. If the customerGroupId field is not included in the request body, the Company account will be assigned to your configured default customer group.

If you have not configured a default customer group or set the value of customerGroupId to 0, the Company account will not be associated with any customer group, and its users will use your storefront’s default catalog visibility and pricing.

If your store is using legacy Dependent Company behavior, a new customer group will be automatically created and associated with each new Company account. In this case, you will not use the customerGroupId field.

Authentication

  • authToken in header

Body

object | application/json
Extra Field Values
  • extraFields
    array[object]

  • userExtraFields
    array[object]

  • companyName
    string
    required

    The name of the business associated with the Company account.
    >= 1 characters<= 200 characters
    Example: Great Buys Inc.
  • companyEmail
    string
    required

    The primary email address for the Company account.
    >= 1 characters<= 200 characters
    Example: admin@greatbuys.com
  • companyPhone
    string
    required

    The primary phone number for the Company account.
    <= 50 characters
    Example: 8001234567
  • customerGroupId
    integer

    The ID of the BigCommerce customer group assigned to the Company account. This field can be static or configurable depending on whether or not your store uses Independent Companies behavior. See Independent Companies Behavior for more information.
    Example: 123
  • addressLine1
    string

    The first line of the primary address for the Company account.
    <= 200 characters
    Example: 123 Main Street
  • addressLine2
    string

    The second line of the primary address for the Company account.
    <= 200 characters
    Example: Building 100
  • city
    string

    The city of the primary address for the Company account.
    >= 1 characters<= 100 characters
    Example: Austin
  • state
    string

    The state of the primary address for the Company account, if applicable. This must be the full name and not an abbreviation.
    >= 1 characters<= 50 characters
    Example: Texas
  • country
    string
    required

    The country of the primary address for the Company account. This must be either the full name or the ISO2 country code.
    >= 1 characters<= 200 characters
    Example: `United States` or `US`
  • zipCode
    string

    The postal code of the primary address for the Company account.
    <= 50 characters
    Example: 78726
  • adminFirstName
    string
    required

    The first name of the Company account administrator.
    >= 1 characters<= 100 characters
    Example: Marie
  • adminLastName
    string
    required

    The last name of the Company account administrator.
    >= 1 characters<= 100 characters
    Example: Curie
  • adminEmail
    string
    required

    The email address of the Company account administrator. If an existing BigCommerce customer account uses this email address, it is automatically linked to the administrator’s Company user account.
    >= 1 characters<= 100 characters
    Example: m.curie@greatbuys.com
  • adminPhoneNumber
    string

    The phone number of the Company account administrator.
    >= 1 characters<= 100 characters
    Example: 8001234567
  • originChannelId
    integer

    The storefront channel ID designated as the origin for the Company administrator. Use 1 for your store’s default storefront channel.
    Example: 1
  • channelIds
    array[integer]

    The storefront channel IDs in which buyers can access their Company’s Buyer Portal. Use 1 for your store’s default storefront channel.
    Type: array[integer]
    Example: [1,10001234]
  • catalogId
    integer

    The ID of the price list assigned to the Company account. This field is read-only for stores using Independent Companies Behavior.

    If your store uses legacy Dependent Companies behavior and it does not have Multi-Storefront enabled, this field is required for creating new Company accounts. If your store has Multi-Storefront enabled, use the priceListAssign array instead.

    Example: 123456
  • acceptCreationEmail
    boolean

    Indicates whether or not the administrator receives a welcome email when the Company account is created.

    true: Sends the welcome email to the admin user

    false: Does not send the email

    Example: true

    Default: false

Create a Company

{
"companyName": "string",
"companyPhone": "string",
"companyEmail": "user@example.com",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string",
"adminFirstName": "string",
"adminLastName": "string",
"adminEmail": "user@example.com",
"adminPhoneNumber": "string",
"catalogId": 0,
"acceptCreationEmail": false,
"extraFields": [
{
"fieldName": "string",
"fieldValue": "string"
}
],
"uuid": "string",
"channelIds": [
1,
2
],
"originChannelId": 1
}

Response

Created

Body

object | application/json
  • code
    integer

  • data
    object

  • meta
    object

200 - Created

{
"code": 200,
"data": {
"companyId": 1,
"customerId": 1,
"customerGroupId": 1
},
"meta": {
"message": "SUCCESS"
}
}

Get Company Details

GET /companies/{companyId}

Request

Returns detailed information for a specific Company account.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    Unique numeric ID of the Company account.

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/companies/[companyId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number

  • data
    object

  • meta
    object

example

{
"code": 0,
"data": {
"companyName": "Great Buys Inc.",
"companyEmail": "admin@greatbuys.com",
"companyPhone": 8001234567,
"companyId": "123456",
"catalogId": "123456",
"catalogName": "string",
"bcGroupName": "Tier 3 B2B Clients",
"companyStatus": "1",
"parentCompany": {
"id": 123456,
"name": "Great Buys Inc"
},
"priceListAssign": [
{
"channelId": 10001234,
"priceListId": 123456,
"priceListName": "Tier 3 B2B Pricing",
"channelName": "My BigCommerce Store"
}
],
"extraFields": [
{
"fieldName": "Customer Tax Code",

Update a Company

PUT /companies/{companyId}

Request

Updates a Company’s attributes.

If you have configured required information fields in your store’s Extra Fields settings for Company accounts or Company users, you must include the field’s name and value in the extraFields array of the request body. For more information on extra fields, see B2B Edition Settings in the Help Center.

Independent vs. Dependent Companies Behavior

This endpoint applies the same rules to the customerGroupId field as Create a Company, based on the Company behavior used in your store. Additionally, the priceListAssign field is not compatible with Independent Companies behavior because a Company’s price list is configured from its assigned customer group.

If your store is using Dependent Companies behavior, use the priceListAssign field to assign a price list to the Company account.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    Unique numeric ID of the Company account.

Body

object | application/json
  • companyName
    string

    The name of the business associated with the Company account.
    >= 1 characters<= 200 characters
    Example: Great Buys Inc.
  • companyEmail
    string

    The primary email address for the Company account.
    >= 1 characters<= 200 characters
    Example: admin@greatbuys.com
  • companyPhone
    string

    The primary phone number for the Company account.
    <= 50 characters
    Example: 8001234567
  • customerGroupId
    integer

    The ID of the BigCommerce customer group assigned to the Company account. This field can be static or configurable depending on whether or not your store uses Independent Companies behavior. See Independent Companies Behavior for more information.
    Example: 123
  • addressLine1
    string

    The first line of the primary address for the Company account.
    <= 200 characters
    Example: 123 Main Street
  • addressLine2
    string

    The second line of the primary address for the Company account.
    <= 200 characters
    Example: Building 100
  • city
    string

    The city of the primary address for the Company account.
    >= 1 characters<= 100 characters
    Example: Austin
  • state
    string

    The state of the primary address for the Company account, if applicable. This must be the full name and not an abbreviation.
    >= 1 characters<= 50 characters
    Example: Texas
  • country
    string

    The country of the primary address for the Company account. This must be either the full name or the ISO2 country code.
    >= 1 characters<= 200 characters
    Example: `United States` or `US`
  • zipCode
    string

    The postal code of the primary address for the Company account.
    <= 50 characters
    Example: 78726
  • uuid
    string

    An external ID assigned to the Company account in a third-party system, such as an ERP. Leave this field blank if you do not have an external system.
    Example: 497f6eca-6276-4993-bfeb-53cbbbba6f08
  • priceListAssign
    array[object]

    Use this array to assign a price list to a Company account if your store uses legacy Dependent Companies behavior and it has Multi-Storefront enabled. Use catalogId to assign price lists if you have not enabled Multi-Storefront.

    This field is read-only for stores using Independent Companies behavior. See Independent Companies Behavior for more information.

  • extraFields
    array[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.

example

{
"companyName": "Great Buys Inc.",
"companyEmail": "admin@greatbuys.com",
"companyPhone": 8001234567,
"customerGroupId": 123,
"addressLine1": "123 Main Street",
"addressLine2": "Building 100",
"city": "Austin",
"state": "Texas",
"country": "`United States` or `US`",
"zipCode": "78726",
"uuid": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"priceListAssign": [
{
"channelId": 10001234,
"priceListId": 123456
}
],
"extraFields": [
{
"fieldName": "Company Tax Code",
"fieldValue": "Code G"
}
]
}

Response

OK

Body

object | application/json
  • code
    number

  • meta
    object

  • data
    object

200 - UPDATED

{
"code": 200,
"data": {
"companyId": 12
},
"meta": {
"message": "SUCCESS"
}
}

Delete a Company

DELETE /companies/{companyId}

Request

Deletes a Company account.

Independent vs. Dependent Companies Behavior

If your store is using Independent Companies behavior, deleting a Company account has no effect on its assigned customer group.

With Dependent Companies behavior, Company accounts and BigCommerce customer groups have a one-to-one relationship. Deleting a Company will also delete the corresponding customer group.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    Unique numeric ID of the Company account.

example

curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/companies/[companyId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    integer

  • data
    object

  • meta
    object

200 - SUCCESS

{
"code": 200,
"data": {},
"meta": {
"message": "SUCCESS"
}
}

Convert a BigCommerce Customer Group into a Company

POST /customer-groups/{customerGroupId}/companies

Request

Creates a Company account that is automatically assigned to a BigCommerce customer group. You cannot create a Company from a customer group that already has an assigned Company account.

Note that this endpoint is not supported if your store:

  • Has Multi-Storefront enabled
  • Is using Independent Companies behavior

If you have configured required information fields in your store’s Extra Fields settings for Company accounts or Company users, you must include the field’s name and value in the extraFields array of the request body. For more information on extra fields, see B2B Edition Settings in the Help Center.

Authentication

  • authToken in header

Parameters

  • customerGroupId in path - string
    required
    The BigCommerce customer group ID associated with the Company account.

Body

object | application/json
Extra Field Values
  • companyName
    string
    required

    The name of the business associated with the Company account.
    <= 200 characters
    Example: Great Buys Inc.
  • companyPhone
    string
    required

    The primary phone number for the Company account.
    <= 50 characters
    Example: 8001234567
  • companyEmail
    string
    required

    The primary email address for the Company account.
    <= 200 characters
    Example: admin@greatbuys.com
  • catalogId
    string

    The ID of the price list assigned to the Company account. This field is read-only for stores using Independent Companies Behavior.

    If your store uses legacy Dependent Companies behavior and it does not have Multi-Storefront enabled, this field is required for creating new Company accounts. If your store has Multi-Storefront enabled, use the priceListAssign array instead.

    Example: 123456
  • acceptCreationEmail
    boolean

    Indicates whether or not the administrator receives a welcome email when the Company account is created.

    true: Sends the welcome email to the admin user

    false: Does not send the email

    Example: true

    Default: false

  • addressLine1
    string

    The first line of the primary address for the Company account.
    <= 200 characters
    Example: 123 Main Street
  • addressLine2
    string

    The second line of the primary address for the Company account.
    <= 200 characters
    Example: Building 100
  • city
    string

    The city of the primary address for the Company account.
    >= 1 characters<= 100 characters
    Example: Austin
  • state
    string

    The state of the primary address for the Company account, if applicable. This must be the full name and not an abbreviation.
    >= 1 characters<= 50 characters
    Example: Texas
  • country
    string
    required

    The country of the primary address for the Company account. This must be either the full name or the ISO2 country code.
    >= 1 characters<= 200 characters
    Example: `United States` or `US`
  • zipCode
    string

    The postal code of the primary address for the Company account.
    <= 50 characters
    Example: 78726
  • adminFirstName
    string

    The first name of the Company account administrator.
    >= 1 characters<= 100 characters
    Example: Marie
  • adminLastName
    string

    The last name of the Company account administrator.
    >= 1 characters<= 100 characters
    Example: Curie
  • adminEmail
    string
    required

    The email address of the Company account administrator. If an existing BigCommerce customer account uses this email address, it is automatically linked to the administrator’s Company user account.
    >= 1 characters<= 100 characters
    Example: m.curie@greatbuys.com
  • adminPhoneNumber
    string
    required

    The phone number of the Company account administrator.
    >= 1 characters<= 100 characters
    Example: 8001234567
  • extraFields
    array[object]

  • userExtraFields
    array[object]

CONVERT GROUP

{
"companyName": "string",
"companyPhone": "string",
"companyEmail": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string",
"adminFirstName": "string",
"adminLastName": "string",
"adminEmail": "string",
"adminPhoneNumber": "string",
"catalogId": 0,
"acceptCreationEmail": false,
"description": "String",
"extraFields": [
{
"fieldName": "string",
"fieldValue": "string"
}
]
}

Response

OK

Body

object | application/json
  • code
    integer

  • data
    object

  • meta
    object

200 - CREATED

{
"code": 200,
"data": {
"companyId": "147340"
},
"meta": {
"message": "SUCCESS"
}
}

Bulk Create Companies

POST /companies/bulk

Request

Creates multiple Company accounts at once. You can create up to 10 Companies in a single request.

See Create a Company for recommendations on formatting individual Companies in the array.

Authentication

  • authToken in header

Body

array | application/json
  • companyName
    string
    required

    Name of this company
    >= 1 characters<= 200 characters
    Example: Tesla
  • addressLine1
    string

    Address line 1 of ths company.
    <= 200 characters
    Example: 1600 Pennsylvania Avenue NW
  • addressLine2
    string

    Address line 2 of ths company.
    <= 200 characters
    Example: Washington, DC 22202
  • city
    string

    City name of the company.
    <= 100 characters
    Example: Detroit
  • state
    string

    State of the company.
    <= 50 characters
    Example: State of Texas
  • zipCode
    string

    Zip code of the company.
    <= 50 characters
    Example: 100000
  • country
    string
    required

    Country of the company.
    <= 200 characters
    Example: US
  • companyEmail
    string
    required

    Contact email of this company.
    <= 200 characters
    Example: dev.b2b@test.net
  • companyPhone
    string
    required

    Phone number of the company.
    <= 50 characters
    Example: 9090980
  • catalogName
    string

    Name of this company's catalog.
    Example: catalog
  • adminFirstName
    string
    required

    First name of the company's administrator.
    >= 1 characters<= 100 characters
    Example: Tom
  • adminLastName
    string
    required

    Last name of the company's administrator.
    >= 1 characters<= 100 characters
    Example: Cat
  • adminEmail
    string
    required

    Email address of the company's administrator.
    >= 1 characters<= 100 characters
    Example: dev.b2b@test.net
  • adminPhoneNumber
    string

    Phone number of the company's administrator.
    >= 1 characters<= 100 characters
    Example: 1223312
  • userExtraFields
    array[object]

  • acceptWelcomeEmail
    boolean

    If user accepts, the system sends a welcome email.
  • extraFields
    object

    Extra fields you want to add to the company fields.
  • channelIds
    array[integer]

    The storefront channel IDs in which buyers can access their Company’s Buyer Portal. Use 1 for your store’s default storefront channel.
    Type: array[integer]
    Example: [1,10001234]
  • originChannelId
    integer

    The storefront channel ID designated as the origin for the Company administrator. Use 1 for your store’s default storefront channel.
    Example: 1
  • customerGroupId
    integer

    The ID of the BigCommerce customer group assigned to the Company account. This field can be static or configurable depending on whether or not your store uses Independent Companies behavior. See Independent Companies Behavior for more information.
    Example: 123

example

[
{
"companyName": "Tesla",
"addressLine1": "1600 Pennsylvania Avenue NW",
"addressLine2": "Washington, DC 22202",
"city": "Detroit ",
"state": "State of Texas",
"zipCode": "100000",
"country": "US",
"companyEmail": "dev.b2b@test.net",
"companyPhone": "9090980",
"catalogName": "catalog",
"adminFirstName": "Tom",
"adminLastName": "Cat",
"adminEmail": "dev.b2b@test.net",
"adminPhoneNumber": "1223312"
}
]

Response

OK

Body

object | application/json
  • code
    integer

  • meta
    array[object]

  • data
    object

200 - SUCCESS

{
"code": 200,
"meta": [
{
"companyId": 1
}
],
"data": {
"id": "string"
}
}

Update Companies (Batch)

PUT /companies/bulk

Request

Updates up to 10 Company accounts at once. See Update a Company for recommendations on formatting individual Companies in the array.

Authentication

  • authToken in header

Body

object | application/json
  • companyId
    integer
    required

    Unique numeric ID of the Company account. This is a read-only field; do not set or modify its value in a POST or PUT request.
    Example: 123456
  • companyName
    string

    The name of the business associated with the Company account.
    >= 1 characters<= 200 characters
    Example: Great Buys Inc.
  • companyEmail
    string

    The primary email address for the Company account.
    >= 1 characters<= 200 characters
    Example: admin@greatbuys.com
  • companyPhone
    string

    The primary phone number for the Company account.
    <= 50 characters
    Example: 8001234567
  • customerGroupId
    integer

    The ID of the BigCommerce customer group assigned to the Company account. This field can be static or configurable depending on whether or not your store uses Independent Companies behavior. See Independent Companies Behavior for more information.
    Example: 123
  • addressLine1
    string

    The first line of the primary address for the Company account.
    <= 200 characters
    Example: 123 Main Street
  • addressLine2
    string

    The second line of the primary address for the Company account.
    <= 200 characters
    Example: Building 100
  • city
    string

    The city of the primary address for the Company account.
    >= 1 characters<= 100 characters
    Example: Austin
  • state
    string

    The state of the primary address for the Company account, if applicable. This must be the full name and not an abbreviation.
    >= 1 characters<= 50 characters
    Example: Texas
  • country
    string

    The country of the primary address for the Company account. This must be either the full name or the ISO2 country code.
    >= 1 characters<= 200 characters
    Example: `United States` or `US`
  • zipCode
    string

    The postal code of the primary address for the Company account.
    <= 50 characters
    Example: 78726
  • priceListAssign
    array[object]

    Use this array to assign a price list to a Company account if your store uses legacy Dependent Companies behavior and it has Multi-Storefront enabled. Use catalogId to assign price lists if you have not enabled Multi-Storefront.

    This field is read-only for stores using Independent Companies behavior. See Independent Companies Behavior for more information.

  • extraFields
    array[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.

example

{
"companyId": "123456",
"companyName": "Great Buys Inc.",
"companyEmail": "admin@greatbuys.com",
"companyPhone": 8001234567,
"customerGroupId": 123,
"addressLine1": "123 Main Street",
"addressLine2": "Building 100",
"city": "Austin",
"state": "Texas",
"country": "`United States` or `US`",
"zipCode": "78726",
"priceListAssign": [
{
"channelId": 10001234,
"priceListId": 123456
}
],
"extraFields": [
{
"fieldName": "Company Tax Code",
"fieldValue": "Code G"
}
]
}

Response

OK

Body

object | application/json
  • code
    number

  • meta
    object

  • data
    object

200 - UPDATED

{
"code": 200,
"data": {
"companyId": 12
},
"meta": {
"message": "SUCCESS"
}
}

Update a Company's Catalog

PUT /companies/{companyId}/catalogs

Request

Updates the price list assigned to the Company account. This endpoint is not supported for stores using Independent Companies behavior.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    Unique numeric ID of the Company account.

Body

object | application/json
  • catalogId
    string
    required

    The ID of the price list assigned to the Company account. This field is read-only for stores using Independent Companies Behavior.

    If your store uses legacy Dependent Companies behavior and it does not have Multi-Storefront enabled, this field is required for creating new Company accounts. If your store has Multi-Storefront enabled, use the priceListAssign array instead.

    Example: 123456

example

{
"catalogId": "123456"
}

Response

OK

Body

object | application/json
  • code
    number

  • meta
    object

  • data
    object

200 - UPDATED

{
"code": 200,
"data": {
"companyId": 12
},
"meta": {
"message": "SUCCESS"
}
}

Update a Company's Status

PUT /companies/{companyId}/status

Request

Updates a Company’s account status. See Company Status Codes for a description of the available statuses.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    Unique numeric ID of the Company account.

Body

object | application/json
  • companyStatus
    integer
    required

    See Company Status Codes to learn about their corresponding statuses.

    Allowed: 0 | 1 | 2 | 3

    Example: 1

example-1

{
"companyStatus": 1
}

Response

OK

Body

object | application/json
  • code
    number

  • meta
    object

  • data
    object

200 - UPDATED

{
"code": 200,
"data": {
"companyId": 12
},
"meta": {
"message": "SUCCESS"
}
}

Get Company Extra Field Configs

GET /companies/extra-fields

Request

Returns a list of available extra fields configs for Company accounts.

Authentication

  • authToken in header

Parameters

  • limit in query with default of 10 - integer
    Determines the number of records to return per page. If left blank, this defaults to 10.
  • offset in query0 - integer
    The number of results to skip before returning the first result. If left blank, this defaults to 0.

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/companies/extra-fields \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
Response for successful request
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

    Used to response pagination information
    Example: {"pagination":{"limit":10,"offset":0,"totalCount":1}}
  • data
    array[object]

example

{
"code": 200,
"meta": {
"pagination": {
"limit": 10,
"offset": 0,
"totalCount": 1
}
},
"data": [
{
"id": 123456,
"uuid": "123456",
"fieldName": "Customer Tax Code",
"fieldType": 1,
"isRequired": true,
"isUnique": true,
"visibleToEnduser": true,
"configType": 1,
"defaultValue": "Code G",
"maximumLength": "100",
"numberOfRows": "5",
"maximumValue": "1000",
"listOfValue": [
"Retail",
"Automotive",
"Manufacturing"
]
}
]
}

Get Company Attachments

GET /companies/{companyId}/attachments

Request

Returns files uploaded to the Company account.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    Unique numeric ID of the Company account.

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/companies/[companyId]/attachments' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number

    Default: 200

  • data
    object

  • meta
    object

Example 1

{
"code": 200,
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"attachmentFile": "https://example.com/example.csv"
},
"meta": {
"message": "SUCCESS"
}
}

Add a Company Attachment

POST /companies/{companyId}/attachments

Request

Attaches a file to a Company account.

The default rate limit for this endpoint is 15 calls/min per store.

Each Company can have a maximum of 10 attachments. The following file types are supported:

- Image files (BMP, GIF, ICO, JPG/JPEG, PNG, SVG, TIF, TIFF, WEBP, WBMP, XBM)
- PDF
- DOC, DOCX
- XLS, XLSX
- CSV

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    Unique numeric ID of the Company account.

Body

object | multipart/form-data
  • attachmentFile
    string
    required

    Attaches a file to the Company account. The file must be a supported type and not exceed 10MB.

Response

OK

Body

object | application/json
  • code
    number

    Default: 200

  • data
    object

  • meta
    object

Example 1

{
"code": 200,
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"attachmentFile": "https://example.com/example.csv"
},
"meta": {
"message": "SUCCESS"
}
}

Delete a Company Attachment

DELETE /companies/{companyId}/attachments/{attachmentId}

Request

Deletes an attached file from a Company account.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    Unique numeric ID of the Company account.
  • attachmentId in path - string
    required
    The ID of a file attached to a Company account.

example

curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/companies/[companyId]/attachments/[attachmentId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    integer

  • data
    object

  • meta
    object

200 - SUCCESS

{
"code": 200,
"data": {},
"meta": {
"message": "SUCCESS"
}
}
Did you find what you were looking for?