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
          • Overview
          • Products
          • Product Modifiers
          • Product Listings
          • Product Filters
          • Product URLs (Beta)
          • Customer Form Fields
          • Promotions
          • Address Form Fields
          • Checkout Settings
          • Shipping Methods
          • Tax Rates
          • Order Statuses
          • Locations
          • Payment Methods
          • Error Handling
    • Archive
    • Closed Beta Programs
Dev Portal
LogoLogo
On this page
  • Examples
  • Query translations
  • Query a list of translations
  • Query a translation by resourceId
  • Update a translation
  • Delete a translation
DocsAdminStore ConfigurationTranslations

Translations for Locations (Beta)

Was this page helpful?
Previous

Order Statuses

Next

Payment Methods

Built with

The Translations Admin GraphQL API is currently available on Catalyst storefronts only.

The locations translatable fields are:

  • Name
  • Address 1
  • Address 2
  • Description
  • City
  • State (optional)
  • Meta Keywords
  • Name (Special hours)

Examples

Below are examples of GraphQL queries and mutations for retrieving and managing translation settings for locations.

Query translations

Query a list of translations

This query returns a paginated list of translations by resourceType, channel, and locale with a maximum of 50 results per request.

Request
Response
Example query: Query a list of translations
1 GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
2 X-Auth-Token: {{token}}
3
4 query {
5 store {
6 translations(filters: {
7 resourceType: INVENTORY_LOCATIONS,
8 channelId: "bc/store/channel/1",
9 localeId: "bc/store/locale/en"
10 } first: 50) {
11 edges {
12 node {
13 resourceId
14 fields {
15 fieldName
16 original
17 translation
18 }
19 }
20 cursor
21 }
22 }
23 }
24 }

Query a translation by resourceId

When querying a translation by resourceId, you must provide the full resourceId in the format bc/store/inventoryLocation/{location_id}.

This query returns a translation by resourceId.

Request
Response
Example query: Query a translation by resource id
1 GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
2 X-Auth-Token: {{token}}
3
4 query {
5 store {
6 translations(filters: {
7 resourceType: INVENTORY_LOCATIONS,
8 channelId: "bc/store/channel/2",
9 localeId: "bc/store/locale/it",
10 resourceIds: ["bc/store/inventoryLocation/1", "bc/store/inventoryLocation/2"]
11 }) {
12 edges {
13 node {
14 resourceId
15 fields {
16 fieldName
17 original
18 translation
19 }
20 }
21 cursor
22 }
23 }
24 }
25 }

Update a translation

This mutation updates a translation.

Request
Response
Example mutation: Update a translation
1 GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
2 X-Auth-Token: {{token}}
3
4 mutation {
5 translation {
6 updateTranslations(input: {
7 resourceType: INVENTORY_LOCATIONS,
8 channelId: "bc/store/channel/1",
9 localeId: "bc/store/locale/es",
10 entities: [
11 {
12 resourceId: "bc/store/inventoryLocation/1",
13 fields: [
14 {
15 fieldName: "city",
16 value: "Ville (OVR) TEST ES"
17 },
18 {
19 fieldName: "state",
20 value: "État (OVR) TEST ES"
21 }
22 ]
23 },
24 {
25 resourceId: "bc/store/inventoryLocation/2",
26 fields: [
27 {
28 fieldName: "city",
29 value: "Ville (OVR) TEST ES"
30 },
31 {
32 fieldName: "state",
33 value: "État (OVR) TEST ES"
34 }
35 ]
36 }
37 ]
38 }) {
39 __typename
40 errors {
41 __typename
42 ... on Error {
43 message
44 }
45 }
46 }
47}
48
49}

Delete a translation

The following mutation deletes a translation.

Request
Response
Example mutation: Delete a translation
1 GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
2 X-Auth-Token: {{token}}
3
4 mutation {
5 translation {
6 deleteTranslations(input: {
7 resourceType: INVENTORY_LOCATIONS,
8 channelId: "bc/store/channel/1",
9 localeId: "bc/store/locale/en",
10 resources: [
11 {
12 resourceId: "bc/store/inventoryLocation/2",
13 fields: ["city", "state"],
14 }
15 ]
16 }) {
17 __typename
18 errors {
19 __typename
20 ... on Error {
21 message
22 }
23 }
24 }
25}
26}