Skip to main content

BigCommerce Graph API

BigCommerce GraphQL API provides flexible and efficient access to storefront data, enabling developers to query exactly the data they need with a single request, optimizing performance and reducing complexity for e-commerce applications.

BigCommerce Graph API icon

Power end-to-end data operations for your BigCommerce Graph API API with Nexla. Our bi-directional BigCommerce Graph API connector is purpose-built for BigCommerce Graph API, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to BigCommerce Graph API or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your BigCommerce Graph API workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a BigCommerce Graph API credential in Nexla, you need to create a Store API Credential in your BigCommerce store and obtain your store hash and API key. BigCommerce Graph API uses token-based authentication, where a storefront API token is generated using your Store API credentials.

BigCommerce Store API Credentials Setup

BigCommerce Graph API requires Store API credentials to generate storefront API tokens. These credentials are used to authenticate requests to create tokens, which are then used to access the GraphQL Storefront API.

  1. Access BigCommerce Control Panel: Sign in to your BigCommerce Control Panel.

  2. Navigate to API Settings: Go to Advanced SettingsAPI Accounts (or SettingsAPI Accounts depending on your BigCommerce version).

  3. Create Store API Credential: Click Create API Account or Create V2/V3 API Token to create a new Store API credential. This will generate:

    • API Key: A unique identifier for your API credential
    • Store Hash: A unique identifier for your store (found in the API URL or credential details)
  4. Configure API Scopes: Ensure your Store API credential has the necessary scopes to create storefront API tokens. The credential needs permissions to create tokens for the GraphQL Storefront API.

  5. Identify Channel ID: Determine the channel ID you want to use for the storefront API token. Use 1 for the default store channel, or use a specific channel ID if you have multiple channels configured.

  6. Copy Credentials: Copy your API Key and Store Hash immediately after creation. Keep these credentials secure, as they provide access to your BigCommerce store data.

    BigCommerce Store API credentials provide programmatic access to your BigCommerce store. Keep your API Key and Store Hash secure and do not share them publicly or commit them to version control systems. The credentials are used to generate storefront API tokens, which are then used to authenticate GraphQL queries. For detailed information about creating Store API credentials, see the BigCommerce API documentation.

For additional information about BigCommerce GraphQL Storefront API authentication and credential management, see the BigCommerce GraphQL Storefront API documentation.

Authenticate

Credentials required

FieldRequiredSecretDescription
Store HashYesNoThe store hash generated by BigCommerce when you generated a Store API Credential. Check out the BigCommerce API documentation link for instructions
API KeyYesYesThe API key generated by BigCommerce when you generated a Store API Credential. Check out the BigCommerce API documentation link for instructions
Channel IDYesNoChannel ID for requested token. Must be a valid channel ID on the store. Use 1 for the default store channel.

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – BigCommerce Graph API

BCGraphCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  2. Enter your BigCommerce store hash in the Store Hash field. This should be the store hash generated by BigCommerce when you created your Store API Credential. The store hash is a unique identifier for your store and is used to construct the GraphQL API endpoint URL. You can find your store hash in the API credential details or in the API URL format https://api.bigcommerce.com/stores/{store_hash}/....

  3. Enter your BigCommerce API key in the API Key field. This should be the API key generated by BigCommerce when you created your Store API Credential. The API key is used to authenticate requests to create storefront API tokens, which are then used to access the GraphQL Storefront API.

    The Store Hash and API Key are used to generate storefront API tokens for accessing the BigCommerce GraphQL Storefront API. The API key is sent in the x-auth-token header when creating tokens, and the generated token is then used as a Bearer token (Authorization: Bearer {token}) for GraphQL queries. Keep your API key secure and do not share it publicly or commit it to version control systems. For detailed information about BigCommerce API authentication, see the BigCommerce API documentation.

  4. Enter the channel ID in the Channel ID field. This should be the channel ID for which you want to create the storefront API token. Use 1 for the default store channel, or enter a specific channel ID if you have multiple channels configured. The channel ID determines which channel's data will be accessible through the GraphQL API.

    The Channel ID determines which BigCommerce channel the storefront API token will have access to. Use 1 for the default store channel. If you have multiple channels (e.g., different storefronts or marketplaces), specify the appropriate channel ID. The token will only provide access to data for the specified channel. For detailed information about channels and channel IDs, see the BigCommerce API documentation.

  5. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the BigCommerce Graph API connector tile, then select the credential that will be used to connect to the BigCommerce Graph API instance, and click Next; or, create a new BigCommerce Graph API credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common BigCommerce Graph API endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

Perform GraphQL Query

This endpoint executes a GraphQL query to fetch data from your BigCommerce store. Use this endpoint when you need to retrieve storefront data such as products, categories, customers, orders, or any other data available through the BigCommerce GraphQL Storefront API.

  • Enter your GraphQL query in the Query field. This should be a valid GraphQL query string that follows the BigCommerce GraphQL Storefront API schema. The query can request specific fields and data from your store, such as products, categories, customers, or other storefront entities. Example query: query FetchStoreInfo { site{ settings{ storeName url { vanityUrl } } } }

  • Enter the JSON path to the data in the response in the JSONPath to Data in Response field. This should be the JSON path that points to the relevant data within the GraphQL response. The default value is $.data, which points to the data object in the GraphQL response. Adjust this path based on your query structure and the data you want to extract.

  • Enter the JSON path to the pagination cursor in the response in the JSONPath to Pagination Cursor in Response field. This should be the JSON path that points to the cursor field used for pagination in GraphQL responses. The default value is $.data.pageInfo.endCursor, which is the standard cursor path for GraphQL pagination. Adjust this path if your query uses a different cursor field structure.

  • The endpoint uses POST requests to the BigCommerce GraphQL Storefront API endpoint (https://store-{store_hash}.mybigcommerce.com/graphql). The endpoint URL is automatically constructed based on your credential's store hash configuration.
  • The endpoint sends the GraphQL query in the request body as JSON with the format {"query": "{your_graphql_query}"}. The request body follows the GraphQL API specification.
  • The endpoint uses cursor-based pagination when applicable, automatically fetching additional pages as needed using the cursor mechanism. When a response includes a cursor field, Nexla automatically includes it in the subsequent query to fetch the next page of results.
  • The endpoint will return the data specified in your GraphQL query. The response data is extracted from the specified JSON path, with each record processed individually based on the query structure.

This endpoint requires a valid GraphQL query string that follows the BigCommerce GraphQL Storefront API schema. The query must be properly formatted and include all required fields and fragments. The endpoint uses cursor-based pagination (iteration.type: graphql.cursor) through the cursor mechanism, where the cursor is located at the specified cursor path in the response. The endpoint requires token-based authentication with Bearer token, which is handled automatically by your credential configuration. The Authorization: Bearer {token} header is automatically included in requests. For detailed information about the BigCommerce GraphQL Storefront API, including available queries, schema, and pagination, see the BigCommerce GraphQL Storefront API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

BigCommerce Graph API data sources can also be manually configured to ingest data from any valid BigCommerce GraphQL Storefront API endpoint, including endpoints not covered by the pre-built template, chained GraphQL queries, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, request body, path to data, metadata, and request headers.

The BigCommerce GraphQL Storefront API uses POST requests to the endpoint https://store-{store_hash}.mybigcommerce.com/graphql, where {store_hash} is your store hash. The request body must be JSON formatted as {"query": "{your_graphql_query}"}, and responses use cursor-based pagination with the cursor located at $.data.pageInfo.endCursor by default. Token-based authentication with a Bearer token (Authorization: Bearer {token}) is included automatically based on your credential configuration.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new BigCommerce Graph API data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.