Company
Company refers to a collection of customers. BigCommerce B2B Edition special provided company member management and convenience of company purchasing.
Create A Company
POST https://api-b2b.bigcommerce.com/api/v2/frontend/companiesRequest
Create a company on the storefront.
Equivalent Storefront GraphQL API Mutation: companyCreate
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Body
addressLine1string
requiredCompany address lineaddressLine2string
requiredAnother company address linecitystring
requiredCompany citycompanyEmailstring
requiredCompany emailExample: kobe@bu.comcompanyFirstNamestring
requiredFirst name of company admin managerExample: xxxxcompanyLastNamestring
requiredLast name of company admin managerExample: xxxxxcompanyNamestring
requiredCompany nameExample: KobeTestCropcompanyPhoneNumberstring
requiredCompany phone numberExample: 17316289569customerIdstring
requiredCompany admin manager's customer user ID in BigCommerceextraFieldsarray[object]
statestring
requiredCompany statestoreHashstring
requiredStore HashExample: storeHashzipCodestring
requiredCompany zip codecountrystring
requiredCompany country
example
Response
Body
codenumber
requireddataobject
required
example-1
Get Company Extra Fields
GET https://api-b2b.bigcommerce.com/api/v2/companies/extra-fields/storefrontRequest
Get company extra fields.
Equivalent Storefront GraphQL API Query: companyExtraFields
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- storeHash in query - stringrequiredStore Hash
example
Response
Body
codenumber
requireddataarray[object]
required
example-1
Get Company by User ID
GET https://api-b2b.bigcommerce.com/api/v2/customers/{userId}/companiesRequest
Get company information by user ID.
Equivalent Storefront GraphQL API Query: userCompany
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- userId in path - stringrequiredB2B Edition user ID
example
Response
Body
codenumber
requireddataobject
required
example-1
Create Company User
POST https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/usersRequest
Create company user.
Equivalent Storefront GraphQL API Mutation: userCreate
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique ID of this company
Body
firstNamestring
requiredUser's first name>= 1 characterslastNamestring
requiredUser's last name>= 1 charactersemailstring
requiredUser's email>= 1 charactersphonestring
requiredUser's phone number>= 1 charactersuserRolenumber
requiredUser role
example-1
Response
Body
codenumber
requireddataobject
required
example-1
Get Company User List
GET https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/usersRequest
Query company's user list.
Equivalent Storefront GraphQL API Query: users
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique ID of this company
- minLastModifiedTime in query - stringMinimum last modified time
- maxLastModifiedTime in query - stringMaximum last modified time
- minLastCreatedTime in query - stringMinimum last created time
- maxLastCreatedTime in query - stringMaximum last created time
- offset in query - stringPagination offset
- limit in query - stringPagination limit
- q in query - stringQuery string
- role[] in query - stringUser role, 0: Admin, 1:Senior Buyer, 2: Junior Buyer
Allowed: 0 | 1 | 2
example
Response
Body
codenumber
requireddataobject
required
example-1
Validate Frontend User Email
GET https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/{email}Request
Check if the user email is valid for current company.
Equivalent Storefront GraphQL API Query: userEmailCheck
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- email in path - stringrequiredEmail address of the user
- companyId in query - stringCompany ID
- role in query - stringrequiredUser role , 0: "Admin" 1: "Senior Buyer" 2: "Junior Buyer" 3: "Sales Rep" 4: "UNKNOWN"
Allowed: 0 | 1 | 2 | 3 | 4
- storeHash in query - stringrequiredStore Hash
example
Response
Body
codenumber
requireddataobject
required
example-1
Get Countries List
GET https://api-b2b.bigcommerce.com/api/v2/companies/addresses/countriesRequest
Get countries list.
Equivalent Storefront GraphQL API Query: countries
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- storeHash in query - stringStore hash
example
Response
Body
codenumber
requireddataobject
required
example-1
Get Address Edit Permission
GET https://api-b2b.bigcommerce.com/api/v2/companies/addresses/permissionRequest
Get whether there is the permission to modify addresses(storefront).
Equivalent Storefront GraphQL API Query: addressConfig
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
example
Response
Body
codenumber
requireddataobject
required
example-1
Get Company Address List
GET https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/addressesRequest
Get company address book by company ID.
Equivalent Storefront GraphQL API Query: addresses
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique company ID
example
Response
Body
codenumber
requireddataobject
required
example-1
Create an Address of a Company
POST https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/addressesRequest
Create a new address of a company.
Equivalent Storefront GraphQL API Mutation: addressCreate
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique company ID
Body
addressLine1string
requiredOne address lineaddressLine2string
Another one address linecitystring
requiredAddress citycountryobject
requiredAddress country infofirstNamestring
requiredAddress first nameisBillingstring
Boolean object should be '0' or '1'isDefaultBillingstring
Boolean object should be '0' or '1'isDefaultShippingstring
Boolean object should be '0' or '1'isShippingstring
Boolean object should be '0' or '1'labelstring
phoneNumberstring
Address phone numberstateobject
Address state infozipCodestring
Zipcode of address cityextraFieldsarray[object]
example-1
Response
Body
codenumber
requireddataobject
required
example-1
Search Company Address
GET https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/addresses/searchesRequest
Get company address book by companyId.
Equivalent Storefront GraphQL API Query: addresses
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique company ID
- limit in query with default of 10 - stringrequiredPagination limit
- offset in query with default of 0 - stringrequiredPagination offset
- q in query - stringQuery string
example
Response
Body
codenumber
requireddataobject
required
example-1
Search Address with Multiple Filter
POST https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/addresses/searchesRequest
Get address book by company ID and use this post because of we are creating a multiple search.
Equivalent Storefront GraphQL API Query: addresses
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique company ID
Body
filtersobject
offsetnumber
Pagination offsetlimitnumber
Pagination limitqstring
Query string
Response
Body
codenumber
requireddataobject
required
example-1
Get an Address
GET https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/addresses/{addressId}Request
Get an address info by companyId.
Equivalent Storefront GraphQL API Query: address
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique company ID
- addressId in path - stringrequiredUnique address ID
example
Response
Body
codenumber
requireddataobject
requiredExtra Field ValuesExample: {"extraFields":[{"fieldName":"string","fieldValue":"string"}]}
example-1
Update an address's Info
PUT https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/addresses/{addressId}Request
Update an address's info.
Equivalent Storefront GraphQL API Mutation: addressUpdate
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique company ID
- addressId in path - stringrequiredUnique address ID
Body
labelstring
required>= 1 charactersfirstNamestring
required>= 1 characterslastNamestring
required>= 1 charactersaddressLine1string
required>= 1 charactersaddressLine2string
required>= 1 characterscitystring
required>= 1 characterszipCodestring
required>= 1 charactersphoneNumberstring
required>= 1 characterscountryobject
requiredstateobject
requiredisShippingstring
required>= 1 charactersisBillingstring
required>= 1 charactersisDefaultShippingstring
required>= 1 charactersisDefaultBillingstring
required>= 1 charactersaddressIdstring
required>= 1 charactersextraFieldsarray[object]
example-2
Response
Body
codenumber
requireddataobject
required
example-1
Mark an Address as Active or Inactive
PUT https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/addresses/{addressId}/activationRequest
Mark an address as active or inactive.
Equivalent Storefront GraphQL API Mutation: addressDelete
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique company ID
- addressId in path - stringrequiredUnique address ID
Response
Body
codenumber
requireddataobject
required
example-1
Get Company Default Addresses
GET https://api-b2b.bigcommerce.com/api/v2/companies/{companyId}/default-addressesRequest
Get default addresses by companyId.
Equivalent Storefront GraphQL API Query: defaultBillingAddress
and defaultShippingAddress
. For more information, see the GraphQL Playground.
Authentication
- Authorization in header in the format of Bearer {{token}}
Parameters
- companyId in path - stringrequiredUnique company ID
example
Response
Body
codenumber
requireddataobject
required
example-1
See something you can improve? Edit this file on GitHub