B2B Edition
Company

Company

Create Company From CG

POST /companies/convert-from-customer-group
⚠️
This endpoint is deprecated.

Request

Create company from bigCommerce customer group. This API only enable for non-MSF store.

Authentication

  • authToken in header

Parameters

  • authToken in header - string
    required
    Auth token in header.

Body

object | application/json
Request body
  • acceptWelcomeEmail
    string

    (0=will not receive email 1=will receive email)

    Allowed: 0 | 1

  • addressLine1
    string

    Address string line 1
  • addressLine2
    string

    Address string line 2
  • adminEmail
    string
    required

    Company admin user email
  • adminFirstName
    string
    required

    Company admin user's first name
  • adminLastName
    string
    required

    Company admin user's last name
  • adminPhoneNumber
    string

    Company admin user phone number
  • city
    string

  • companyEmail
    string
    required

  • companyName
    string
    required

  • country
    string

  • customerGroupId
    string
    required

    BC customer group ID
  • 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. eg. 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.
  • phoneNumber
    string
    required

  • state
    string

  • zipCode
    string

  • userExtraFields
    array[object]

example

{
"userExtraFields": [
{
"fieldName": "string",
"fieldValue": "string"
}
]
}

Response

Response Success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"companyId": "2"
},
"message": "Success"
}

Get Company Basic Information

GET /companies/{companyId}/basic-info
⚠️
This endpoint is deprecated.

Request

Get company's basic information

Authentication

  • authToken in header

Parameters

  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header.

example

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

Response

Response Success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"addressLine1": "",
"addressLine2": "",
"catalogId": "1",
"catalogName": "testCatalogName",
"city": "Paris",
"companyEmail": "test@bundleb2b.com",
"companyId": "35",
"companyName": "CropTest1",
"companyStatus": "1",
"country": "French",
"description": "CropTest",
"extraFields": [
{
"dataType": "2",
"fieldName": "extraStr1",
"fieldValue": "extra_text",
"isRequired": "0",
"labelName": "Enter your license"
}
],
"phoneNumber": "10030212001",
"state": "BC",
"updatedAt": "1594192159",
"uuid": "111",

Update Company Basic Information

PUT /companies/{companyId}/basic-info
⚠️
This endpoint is deprecated.

Request

Update a company's basic info, you can update on or more options

Authentication

  • authToken in header

Parameters

  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header.

Body

object | application/json
Request body
  • addressLine1
    string

    Address string line 1
  • addressLine2
    string

    Address string line 2
  • catalogId
    string

    BigCommerce price list Id that company related(If put its 0 will clear the catalog).
  • city
    string

  • companyEmail
    string

  • companyName
    string

  • companyStatus
    string

    Company status:

    0=PENDING 1=APPROVED 2=REJECTED 3=INACTIVE 4=DELETED

  • country
    string

    Country full name or ISO2 country code. For Example:

    A Country full name: Afghanistan

    ISO2 Country code: AF

  • description
    string

  • 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. eg. 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.
  • phoneNumber
    string

  • state
    string

  • zipCode
    string

  • priceListAssign
    array[object]

example

{
"addressLine1": "string",
"addressLine2": "string",
"catalogId": "string",
"city": "string",
"companyEmail": "string",
"companyName": "string",
"companyStatus": "string",
"country": "string",
"description": "string",
"extraFields": [
{
"fieldName": "string",
"fieldValue": "string"
}
],
"phoneNumber": "string",
"state": "string",
"zipCode": "string",
"priceListAssign": [
{
"channelId": 0,
"priceListId": 0
}
]
}

Response

Response Success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"companyId": "2"
},
"message": "Success"
}

Delete Company With Related

DELETE /companies/{companyId}/force-del
⚠️
This endpoint is deprecated.

Request

Force Delete A Company and its Related Information.

Authentication

  • authToken in header

Parameters

  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header

example

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

Response

Deleted successful

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"companyId": "2"
},
"message": "Success"
}

Get BC Order Id List By Company Id

GET /companies/{companyId}/orderBCIds
⚠️
This endpoint is deprecated.

Request

Get bC order ID list by company id

Authentication

  • authToken in header

Parameters

  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header.
  • offset in query - number
    Pagination offset default: 0
  • limit in query - number
    Pagination limit default: 10
  • beginDateAt in query - string
    End date filter, in format '12/31/2019'
  • endDateAt in query - string
    End date filter, in format '12/31/2019'

example

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

Response

Response Success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

  • message
    string

    Response message

example

{
"code": 200,
"data": {
"list": [
{
"orderId": "1"
}
],
"pagination": {
"limit": 10,
"offset": 0,
"totalCount": 3
}
},
"message": "Success"
}

Get Company By CustomerId

GET /users/{customerId}/companies
⚠️
This endpoint is deprecated.

Request

Get company by customer Id, if company not in bigCommerce will delete the company

Authentication

  • authToken in header

Parameters

  • customerId in path - string
    required
    BigCommerce's customer id
  • authToken in header - string
    required
    Auth token in header.

example

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

Response

Response Success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"addressLine1": "",
"addressLine2": "",
"catalogId": "1",
"city": "Paris",
"companyId": "35",
"companyName": "CropTest1",
"companyStatus": "1",
"country": "French",
"description": "CropTest",
"state": "BC",
"zipCode": "1032332"
},
"message": "SUCCESS"
}
Did you find what you were looking for?