B2B APIs
B2B Edition’s APIs allow you to retrieve and manage B2B resources, such as Company accounts and users, sales quotes, and invoice payments. In conjunction with other BigCommerce APIs, you can build integrations and headless solutions for stores using B2B Edition.
This article covers general information about B2B Edition’s APIs and how to use them. See our list of B2B Edition APIs for endpoint-specific requirements, considerations, and use cases.
Available APIs
B2B Edition has different APIs for managing store and Company data, each geared toward specific environments and experiences. See the descriptions below to identify the APIs that best fit your integration.
Rest Management V3 APIs
Base URL — https://api-b2b.bigcommerce.com/api/v3/io/
The Rest Management V3 APIs allow you to manage B2B store data and settings from a server-to-server context. Use these APIs to perform backend actions as a store administrator.
Example use cases include:
- Creating new Company accounts and setting up Company account hierarchies
- Submitting sales quotes to buyers
- Generating payable invoices for purchase orders
- Retrieving B2B order information
- Assigning user roles to B2B buyers
Unlike the other BigCommerce REST Management APIs, the B2B REST Management V3 APIs do not include store-specific data in the request path, such as the store hash. Instead the store specificity is contained within the server to server authToken used to authenticate the request.
GraphQL Storefront APIs
Base URL — https://api-b2b.bigcommerce.com/graphql
B2B Edition’s GraphQL Storefront APIs include queries and mutations for managing records like Company account information, sales quotes, and invoices in native and headless storefronts. It is the recommended environment if you are building storefront integrations for B2B Edition’s Buyer Portal experience.
Example use cases include:
- Adding new Company users
- Taking sales quotes to checkout
- Curating and approving Shopping Lists
- Starting or ending Super Admin Masquerade
Our GraphQL Playground includes documentation and schemas for B2B GraphQL API requests, as well as an environment for testing responses.
REST Storefront APIs
Base URL — https://api-b2b.bigcommerce.com/api/v2/*
The REST Storefront APIs also allow you to manage B2B records from the context of a specific Company user or Super Admin. It is used by the legacy Stencil storefront experience, but the requests are also supported in the Buyer Portal experience. However, we recommend using the GraphQL Storefront API for storefront customization.
* Most REST Storefront API endpoints use https://api-b2b.bigcommerce.com/api/v2/, but the Get a Storefront authToken for a Specific Customer endpoint uses https://api-b2b.bigcommerce.com/api/io/.
REST Management V2 APIs
Base URL — https://api-b2b.bigcommerce.com/api/v2/io/
The REST Management V2 APIs include legacy server-to-server endpoints for managing store information and processes. Like V3 APIs, the V2 APIs do not include store-specific data in the request path.
The V2 API is deprecated, and it does not support many of B2B Edition’s newer features. We recommend building or upgrading your integration to use the V3 Management APIs.
API authentication and context
As of September 30, 2025, the B2B Edition API authToken is deprecated and replaced by the standard BigCommerce API X-Auth-Token used together with a new header X-Store-Hash. This change only applies to Server-to-Server requests. Storefront requests remain unchanged.
While authToken authentication is not expected to be fully sunset in the near future, it is advised to migrate to the new system as soon as possible to prevent disruption of functionality.
The server and path for B2B REST Management API endpoints remains the same.
Requests to the B2B Edition REST Management V3 API are always in the context of the server. To authenticate V3 API requests, create a BigCommerce API authentication token in the control panel with the B2B Edition scope enabled. Alternatively, you can generate a B2B Edition-only server to server authToken via one of the following methods:
- Create an API account from B2B Edition’s settings
- Generate a token via the Create a Server to Server Token endpoint
GraphQL and REST Storefront API authentication tokens are always in the context of a specific storefront user. As a result, you do not need separate tokens for authenticating requests in client and server contexts, unlike the BigCommerce GraphQL Storefront API.
There are several methods for generating storefront authTokens, each with distinct use cases. See Authentication for hosted storefronts to learn more.
Available B2B Resources
B2B Edition’s APIs allow you to manage the following major resources:
Making Requests to B2B Edition APIs
Like other BigCommerce APIs, B2B Edition’s APIs accept requests in JSON. You must encode requests in the UTF-8 character set to ensure valid results.
See the following sections for information on the content and structure of B2B Edition API requests and their responses.
Requests
Request headers
Request structure
B2B Edition REST Management and Storefront APIs use the standard JSON request format of an object containing a set of key-value pairs. For example, this is what the body of a simplified request to the server to server Create a Quote endpoint would look like:
B2B Edition Storefront GraphQL queries and mutations use the same format as BigCommerce’s GraphQL Storefront API, with request fields being defined as variables. Below is an example query for returning store currency information:
Responses
The Accept value provided in the header of your request determines the content type for the response body. Specifying application/json as the Accept value ensures that API responses return as JSON.
Response headers
B2B Edition API response headers provide standard and BigCommerce-specific information about the request. Like response headers for other BigCommerce APIs, they are case-insensitive.
Standard response headers
BigCommerce-specific response headers
Response structure
Management and Storefront REST responses are structured similarly to requests, and include the endpoint’s specific response fields in the data object. The body also includes the HTTP status code, a descriptive message, and pagination data where relevant.
For example, here is a simplified response body for the Get Sales Staff Account Details endpoint:
Storefront GraphQL responses contain all the fields specified in the original query or mutation. Using the example from earlier, this is what the response looks like:
Webhooks
You can use a store-level or app-level API account to register and subscribe to B2B Edition webhook events. Webhooks a resource-efficient alternative to polling the API for keeping your app up-to-date.
See B2B Edition Events for a complete list of supported webhook events.
Resources
- About BigCommerce APIs
- B2B Edition APIs
- Best Practices
- Developer Community
- BigCommerce on Stack Overflow
- Release Notes
Status codes
B2B Edition APIs use standard HTTP response status codes. For a complete reference of status codes, error messages, and troubleshooting tips, see API Status Codes.