> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Translations for Promotions

The following fields are translatable for promotions (all fields are included in responses; values may be null if no translation exists):

* Banner availability as `banner_availability`
* Banner upsell as `banner_upsell`
* Banner eligibility as `banner_eligibility`
* Banner congratulations as `banner_congratulations`

> **Note**
>
> Only the fields above are supported for promotion translations. Requests with other field names will return an error.

## Resource fields

| Entity Type | `resourceType` | `resourceId` Format                 |
| ----------- | -------------- | ----------------------------------- |
| Promotion   | `PROMOTIONS`   | `bc/store/promotion/{promotion_id}` |

## Examples

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

### Query a List of Translations

This query returns up to 50 promotion translations for the specified resource type, channel, and locale.

The request below uses several variables for reusability. Replace `{{channel_id}}` and `{{locale_code}}` with the appropriate values for your use case.

#### Request

**`Example query: Query a list of translations`**

```graphql title="Example query: Query a list of translations" showLineNumbers={false}
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}

query {
  store {
    translations(
      filters: {
        resourceType: PROMOTIONS
        channelId: "bc/store/channel/{{channel_id}}"
        localeId: "bc/store/locale/{{locale_code}}"
      }
      first: 50
    ) {
      edges {
        node {
          resourceId
          fields {
            fieldName
            original
            translation
          }
        }
        cursor
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
    }
  }
}
```

#### Response

**`Example query: Query a list of translations`**

```json title="Example query: Query a list of translations" showLineNumbers={false}
{
  "data": {
    "store": {
      "translations": {
        "edges": [
          {
            "node": {
              "resourceId": "bc/store/promotion/101",
              "fields": [
                { "fieldName": "banner_availability", "original": "Available banner", "translation": "Bannière disponible" },
                { "fieldName": "banner_upsell", "original": "Upsell banner", "translation": "Bannière de montée en gamme" },
                { "fieldName": "banner_eligibility", "original": "Eligibility banner", "translation": "Bannière d'éligibilité" },
                { "fieldName": "banner_congratulations", "original": "Congrats banner", "translation": "Bannière de félicitations" }
              ]
            },
            "cursor": "eyJpZCI6MTAxfQ"
          },
          {
            "node": {
              "resourceId": "bc/store/promotion/102",
              "fields": [
                { "fieldName": "banner_availability", "original": "Available banner", "translation": null },
                { "fieldName": "banner_upsell", "original": "Upsell banner", "translation": null },
                { "fieldName": "banner_eligibility", "original": "Eligibility banner", "translation": null },
                { "fieldName": "banner_congratulations", "original": "Congrats banner", "translation": null }
              ]
            },
            "cursor": "eyJpZCI6MTAyfQ"
          }
        ],
        "pageInfo": {
          "hasNextPage": false,
          "hasPreviousPage": false,
          "startCursor": "eyJpZCI6MTAxfQ",
          "endCursor": "eyJpZCI6MTAyfQ"
        }
      }
    }
  }
}
```

### Query a Translation by Resource ID

This query returns translation(s) by resourceId.

> **Note**
>
> When querying a translation by `resourceId`, you must provide the full `resourceId` in the format `bc/store/promotion/{promotion_id}`.

The request below uses several variables for reusability. Replace `{{resourceId}}`, `{{channel_id}}`, and `{{locale_code}}` with appropriate values for your use case. Make sure `resourceId` follows the format from the [Resource fields](#resource-fields) table.

#### Request

**`Example query: Query a translation by id`**

```graphql title="Example query: Query a translation by id" showLineNumbers={false}
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}

query {
  store {
    translations(
      filters: {
        resourceType: PROMOTIONS
        channelId: "bc/store/channel/{{channel_id}}"
        localeId: "bc/store/locale/{{locale_code}}"
        resourceIds: ["{{resourceId}}"]
      }
    ) {
      edges {
        node {
          resourceId
          fields {
            fieldName
            original
            translation
          }
        }
        cursor
      }
    }
  }
}
```

#### Response

**`Example query: Query a translation by id`**

```json title="Example query: Query a translation by id" showLineNumbers={false}
{
  "data": {
    "store": {
      "translations": {
        "edges": [
          {
            "node": {
              "resourceId": "bc/store/promotion/101",
              "fields": [
                { "fieldName": "banner_availability", "original": "Available banner", "translation": "Bannière disponible" },
                { "fieldName": "banner_upsell", "original": "Upsell banner", "translation": "Bannière de montée en gamme" },
                { "fieldName": "banner_eligibility", "original": "Eligibility banner", "translation": "Bannière d'éligibilité" },
                { "fieldName": "banner_congratulations", "original": "Congrats banner", "translation": "Bannière de félicitations" }
              ]
            },
            "cursor": "eyJpZCI6MTAxfQ"
          }
        ]
      }
    }
  }
}
```

### Update a Translation

This mutation updates translated values for promotions for a specific channel and locale.

#### Request

**`Example mutation: Update a translation`**

```graphql title="Example mutation: Update a translation" showLineNumbers={false}
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}

mutation {
  translation {
    updateTranslations(
      input: {
        resourceType: PROMOTIONS,
        channelId: "bc/store/channel/{{channel_id}}",
        localeId: "bc/store/locale/{{locale_code}}",
        entities: [
          {
            resourceId: "bc/store/promotion/101",
            fields: [
              { fieldName: "banner_availability", value: "Bannière disponible" },
              { fieldName: "banner_upsell", value: "Bannière de montée en gamme" },
              { fieldName: "banner_eligibility", value: "Bannière d'éligibilité" },
              { fieldName: "banner_congratulations", value: "Bannière de félicitations" }
            ]
          },
          {
            resourceId: "bc/store/promotion/102",
            fields: [
              { fieldName: "banner_availability", value: "Bannière disponible" },
              { fieldName: "banner_upsell", value: "Bannière de montée en gamme" },
              { fieldName: "banner_eligibility", value: "Bannière d'éligibilité" },
              { fieldName: "banner_congratulations", value: "Bannière de félicitations" }
            ]
          }
        ]
      }
    ) {
      __typename
      errors {
        __typename
        ... on ValidationError {
          message
        }
        ... on EntityNotFoundError {
          id
          message
        }
        ... on InvalidTranslationEntityFieldsError {
          id
          message
          fields
        }
      }
    }
  }
}
```

#### Response

**`Example mutation: Update a translation`**

```json title="Example mutation: Update a translation" showLineNumbers={false}
{
  "data": {
    "translation": {
      "updateTranslations": {
        "__typename": "UpdateTranslationsResult",
        "errors": []
      }
    }
  }
}
```

> **Note**
>
> The mutation example above shows a successful response. If invalid fields or resource IDs are provided, the API will return error responses. See the [Error Handling Reference](/developer/docs/admin/store-configuration/translations/error-handling) for more details on error responses.

### Delete a Translation

The following mutation removes translated values for specified promotion fields, reverting them to the original values for a specific channel and locale.

#### Request

**`Example mutation: Delete a translation`**

```graphql title="Example mutation: Delete a translation" showLineNumbers={false}
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}

mutation {
  translation {
    deleteTranslations(
      input: {
        resourceType: PROMOTIONS,
        channelId: "bc/store/channel/{{channel_id}}",
        localeId: "bc/store/locale/{{locale_code}}",
        resources: [
          {
            resourceId: "bc/store/promotion/101",
            fields: [
              "banner_availability",
              "banner_upsell",
              "banner_eligibility",
              "banner_congratulations"
            ]
          },
          {
            resourceId: "bc/store/promotion/102",
            fields: [
              "banner_availability",
              "banner_upsell"
            ]
          }
        ]
      }
    ) {
      __typename
      errors {
        __typename
        ... on ValidationError {
          message
        }
        ... on EntityNotFoundError {
          id
          message
        }
        ... on InvalidTranslationEntityFieldsError {
          id
          message
          fields
        }
      }
    }
  }
}
```

#### Response

**`Example mutation: Delete a translation`**

```json title="Example mutation: Delete a translation" showLineNumbers={false}
{
  "data": {
    "translation": {
      "deleteTranslations": {
        "__typename": "DeleteTranslationsResult",
        "errors": []
      }
    }
  }
}
```