For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
  • Overview
    • Quick Start
    • Sandboxes
    • Tools & SDKs
    • Support
  • Docs
      • Getting Started
        • Products overview
        • Contextual filters
          • Overview
          • Product basic information
          • Product SEO information
          • Product variant options
          • Product modifier options
          • Product URL
          • Product attributes
          • Product custom fields
          • Product images
    • Archive
    • Closed Beta Programs
Dev Portal
LogoLogo
On this page
  • Input fields
  • Set product URL at the global level
  • Set product URL for a locale
  • Remove product URL for a locale
  • Query product URL
DocsAdminCatalog and InventoryMSF International Enhancements

Product URL

Was this page helpful?
Previous

Product modifier options

Next

Product attributes

Built with

International Enhancements for Multi-Storefront

This feature is currently available for Enterprise stores and Partner Sandboxes. If the feature is not working as expected, please contact technical support, as the feature likely needs to be enabled for the individual store. To become an enterprise customer, contact your BigCommerce Customer Service Manager or our support team.

Using the Catalog features of the Admin API, you can set and query product URLs for a store or a locale within a storefront channel.

Perform the following:

  • Set product URLs for the store. Channels inherit these by default.
  • Create overrides for a channel’s locale using the overridesForLocale mutation. The product URL for the locale overrides the global value.
  • Remove overrides for a channel’s locale. The product URL then defaults to its global store value.
  • Query product URL, those set at the global level and the overrides.

For a full schema, see the GraphQL Admin API reference.

Input fields

Setting or removing information requires that you specify ID fields in the input. For more information on how to specify ID fields, see Input fields.

Set product URL at the global level

The following example sets a product’s URL for a store, from which channels inherit by default.

Request
Response
Example mutation: Set product URL at the global level
1POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
2X-Auth-Token: {{ACCESS_TOKEN}}
3Content-Type: application/json
4Accept: application/json
5
6mutation ($input: SetProductUrlPathInput!) {
7 product {
8 setProductUrlPath (input: $input) {
9 product {
10 id
11 urlPath {
12 path
13 }
14 }
15 }
16 }
17}
GraphQL variables
1{
2 "input": {
3 "productId": "bc/store/product/111",
4 "data": {
5 "path": "/global-product-111"
6 }
7 }
8}

Set product URL for a locale

The following example sets a product’s URL for the locale within a storefront channel. These settings override global store information.

Request
Response
Example mutation: Set product URL for a locale
1POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
2X-Auth-Token: {{ACCESS_TOKEN}}
3Content-Type: application/json
4Accept: application/json
5
6mutation ($input: SetProductUrlPathInput!) {
7 product {
8 setProductUrlPath (input: $input) {
9 product {
10 id
11 overridesForLocale (localeContext: { channelId: "bc/store/channel/2", locale: "uk" }) {
12 urlPath {
13 path
14 }
15 }
16 }
17 }
18 }
19}
GraphQL variables
1{
2 "input": {
3 "productId": "bc/store/product/111",
4 "localeContext": {
5 "channelId": "bc/store/channel/2",
6 "locale": "uk"
7 },
8 "data": {
9 "path": "/overrides-product-111"
10 }
11 }
12}

Remove product URL for a locale

The following example removes the overrides for a product’s URL. This mutation removes the overrides for the locale within the storefront channel, and the product URL defaults to its global store value.

Request
Response
Example mutation: Remove product URL for a locale
1POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
2X-Auth-Token: {{ACCESS_TOKEN}}
3Content-Type: application/json
4Accept: application/json
5
6mutation ($input: RemoveProductUrlPathOverrideInput!) {
7 product {
8 removeProductUrlPathOverride (input: $input) {
9 product {
10 id
11 urlPath {
12 path
13 }
14 }
15 }
16 }
17}
GraphQL variables
1{
2 "input": {
3 "productId": "b/store/product/111",
4 "localeContext": {
5 "channelId": "bc/store/channel/2",
6 "locale": "uk"
7 }
8 }
9}

Query product URL

The following example retrieves a product’s URL. You can retrieve global information for the store and overrides for a locale within a storefront channel.

Request
Response
Example query: Get product URL for a product
1POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
2X-Auth-Token: {{ACCESS_TOKEN}}
3Content-Type: application/json
4Accept: application/json
5
6query {
7 store {
8 product (id: "bc/store/product/111") {
9 id
10 urlPath {
11 path
12 }
13 overridesForLocale (localeContext: { channelId: "bc/store/channel/2", locale: "uk" }) {
14 urlPath {
15 path
16 }
17 }
18 }
19 }
20}