Translations for Tax Rates (Beta)

The Translations Admin GraphQL API is available on Catalyst storefronts by default and in early access for Stencil and other headless storefronts. To get early access, reach out to the BigCommerce support team.

The following entities are translatable for tax rates:

  • Tax Rate Name as tax_rate_name

Resource fields

Entity TyperesourceTyperesourceId Format
Tax RateTAX_RATESbc/store/taxRate/{id}

Examples

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

Query a List of Translations

This query returns tax rate translations for the specified resource type, channel, and locale (up to 50).

Example query: Query a list of translations
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}
query {
store {
translations(filters: {
resourceType: TAX_RATES,
channelId: "bc/store/channel/{{channel_id}}",
localeId: "bc/store/locale/{{locale_code}}"
}) {
edges {
node {
resourceId
fields {
fieldName
original
translation
}
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}
}

Query a Translation by Resource ID

This query returns translation(s) by resourceId.

When querying by resourceId, provide the full ID in the format bc/store/taxRate/{id}.

Example query: Query a translation by id
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}
query {
store {
translations(
filters: {
resourceType: TAX_RATES
channelId: "bc/store/channel/{{channel_id}}"
localeId: "bc/store/locale/{{locale_code}}"
resourceIds: ["bc/store/taxRate/1"]
}
) {
edges {
node {
resourceId
fields {
fieldName
original
translation
}
}
cursor
}
}
}
}

Update a Translation

Example mutation: Update a translation
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}
mutation {
translation {
updateTranslations(input: {
resourceType: TAX_RATES,
channelId: "bc/store/channel/{{channel_id}}",
localeId: "bc/store/locale/{{locale_code}}",
entities: [
{
resourceId: "bc/store/taxRate/1",
fields: [
{
fieldName: "tax_rate_name",
value: "Tasa de Impuesto Estándar"
}
]
}
]
}) {
errors {
__typename
... on Error {
message
}
... on EntityNotFoundError {
message
}
... on ValidationError {
message
}
}
}
}
}

Delete a Translation

Example mutation: Delete a translation
GRAPHQL https://api.bigcommerce.com/stores/{{store_hash}}/graphql
X-Auth-Token: {{token}}
mutation {
translation {
deleteTranslations(input: {
resourceType: TAX_RATES,
channelId: "bc/store/channel/{{channel_id}}",
localeId: "bc/store/locale/{{locale_code}}",
resources: [
{
resourceId: "bc/store/taxRate/1",
fields: ["tax_rate_name"]
}
]
}) {
errors {
__typename
... on Error {
message
}
... on EntityNotFoundError {
message
}
... on ValidationError {
message
}
}
}
}
}