BigCommerce
Store Operations
Catalog and Inventory
GraphQL Admin API
Product basic information

Basic Product Information

Using the Catalog features of the Admin API, you can set and query basic product information, for example, product name and description.

You can perform the following:

For a full schema, see the GraphQL Admin API reference (opens in a new tab).

Input fields

Setting or removing information requires that you specify ID fields in the input. These ID fields contain global IDs that you can retrieve from REST API endpoints.

For example, the productId field contains the global product ID. Retrieve the global product ID from the response body of the Get all products endpoint. A product with a global ID of 111 has a productId of "bc/store/product/111".

The following table describes the ID fields that you can use in inputs for mutations:

Field in InputDescriptionGlobal IDExample
productIdProduct IDGet all products"bc/store/product/111"
channelIdChannel IDGet all channels"bc/store/channel/2"
optionIdVariant option IDGet all product variant options"bc/store/productOption/108"
Shared variant option IDNavigate to Products
>Product Options
>OptionName

in the control panel.

Retrieve the global ID from the URL.
"bc/store/sharedProductOption/1"
modifierIdModifier IDGet all product modifiers"bc/store/productModifier/121"
Shared modifier IDNavigate to Products
>Product Options
>Shared Modifiers
>ModifierName

in the control panel.

Retrieve the global ID from the URL.
"bc/store/sharedProductModifier/2"
valueIdVariant option value IDGet all product variant option valuesProduct variant options: "bc/store/productOptionValue/68"

Shared variant options: "bc/store/sharedProductOptionValue/123"
Modifier value IDGet all modifier valuesProduct modifiers: "bc/store/productModifierValue/107"

Shared modifiers: "bc/store/sharedProductModifierValue/107"

Set basic product information at the global level

The following example sets global basic product information for the store, from which channels inherit by default. You can set the product name and description.

Example mutation: Set basic product information at the global level
POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
 
mutation (
  $input: SetProductBasicInformationInput!
) {
  product {
    setProductBasicInformation(input: $input) {
      product {
        id
        basicInformation {
          name
          description
        }
      }
    }
  }
}
GraphQL variables
{
  "input": {
    "productId": "bc/store/product/111",
    "data": {
      "name": "Global Name",
      "description": "Global Description"
    }
  }
}

Set basic product information for a locale

The following example sets basic product information for the specified storefront channel and locale within the channel. These will override global store information. You can set the product name and description.

Example mutation: Set basic product information for a locale
POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
 
mutation (
  $input: SetProductBasicInformationInput!
) {
  product {
    setProductBasicInformation(input: $input) {
      product {
        id
        overridesForLocale (localeContext: { channelId: "bc/store/channel/2", locale: "en" }) {
          basicInformation {
            name
            description
          }
        }
      }
    }
  }
}
GraphQL variables
{                                           
  "input": {                                
    "productId": "bc/store/product/111",    
    "localeContext": {
      "channelId": "bc/store/channel/2",      
      "locale": "fr"
    },                       
    "data": {                               
      "name": "name override",              
      "description": "description override" 
    }                                                       
  }
}

Remove basic product information for a locale

The following example removes basic product information for the specified channel and locale.

Omitting the overridesToRemove field from the input removes all overrides for basic product information from the locale.

Example mutation: Remove basic product information for a locale
POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
 
mutation (
  $input: RemoveProductBasicInformationOverridesInput!
) {
  product {
    removeProductBasicInformationOverrides(input: $input) {
      product {
        id
        overridesForLocale (localeContext: { channelId: "bc/store/channel/2", locale: "fr" }) {
          basicInformation {
            name
          }
        }
      }
    }
  }
}
GraphQL variables
{                                           
  "input": {                                
    "productId": "bc/store/product/111",    
    "localeContext": {
      "channelId": "bc/store/channel/2",      
      "locale": "fr"
    },
    "overridesToRemove": ["PRODUCT_NAME_FIELD"]                                                                    
  }
}  

Query basic product information

The following example retrieves basic product information. You can retrieve global information for the store and overrides for the specified channel and locale.

Example query: Get basic product information
POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
 
query {
  store {
    products (filters: {ids: ["bc/store/product/111"]}) {
      edges {
        node {
          id
          basicInformation {
            name
            description
          }
          overridesForLocale (localeContext: { channelId: "bc/store/channel/2", locale: "fr" }) {
            basicInformation {
              name
              description
            }
          }
        }
      }
    }
  }
}
  • The id field contains the product's global ID that you can retrieve from the Get all products endpoint. For example, a product with a global ID of 111 will have an id of "bc/store/product/111".
  • The channelId field contains the channel's global ID that you can retrieve from the Get all channels endpoint. For example, a channel with a global ID of 2 will have a channelId of "bc/store/channel/2".
Did you find what you were looking for?