Before you can display products on a headless storefront, you need to create and configure a sales channel for that storefront using the REST Management Channels API.
You need a primary domain name for your headless storefront and an additional domain for the storefront’s checkout page. Subdomains are permitted. Ensure the domain is not currently associated with existing channels/storefronts, especially the default storefront managed in the control panel account area.
The API calls that associate domains with your store do not verify domain name ownership.
Limits: Every store comes with a default limit of one active storefront that comes for free along with a store. To add additional storefront seats, contact your BigCommerce representative.
You can open a headless storefront seat by setting the status of the default BigCommerce storefront to inactive. This will break a store that’s already transacting on the default storefront, so contact your BigCommerce representative if you have questions about taking this step.
Send a request to the Create a channel endpoint to create a channel for your headless platform. Note the channel ID returned in the response; you’ll use it in successive steps.
To tell BigCommerce the URL of your headless store, use the Create a channel site endpoint, along with your channel ID and primary domain name.
Currently, all checkout pages are hosted. Set the checkout domain for the headless storefront by sending a request to the Upsert a site’s checkout URL endpoint. You can configure the headless checkout url with www_redirect settings using the Settings API.
Optionally, you can add a 3P SSL certificate for the checkout domain by sending a request to the Upsert a site’s SSL/TLS certificate information endpoint.
After setting up the channel, you’re almost ready to authenticate requests to the GraphQL Storefront API. Choose the token type that matches your use case:
allowed_cors_origin.allowed_cors_origin; otherwise, your cross-origin requests will be rejected.You can Create tokens using the REST Management API with your new channel ID.
After you have a token, you’re ready to get started using the GraphQL Storefront API.