Requires read_translation access scope.
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Query a store's multiple translation data.
Arguments
after ● String
Returns elements following the specified cursor. The first argument must also be specified when using this argument.
before ● String
Returns elements preceding the specified cursor. The last argument must also be specified when using this argument.
first ● Int
Returns the first n elements in the list.
last ● Int
Returns the last n elements in the list.
reverse ● Boolean
Whether to reverse the order of the list.
● true: reverse
● false: do not reverse
Default value: false
resourceType ● String!non-null
The type of the resource.
Example: PRODUCT.
Return
edges ● [TranslatableResourceEdge!]non-null
edges
More
pageInfo ● TranslatablePageInfo!non-null
page info
More
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Query original and translated content for a specific resource type, market ID, and language where translation is outdated.
query MyQuery {
translatableResources(resourceType: "PRODUCT", first: 1, reverse: false) {
edges {
cursor
node {
resourceId
translatableContent {
digest
key
locale
type
value
}
translations(locale: "en", outdated: false, marketId: "2805979406510623080534") {
key
locale
outdated
updatedAt
value
market {
id
}
}
}
}
}
}
Response
{
"data": {
"translatableResources": {
"edges": [
{
"cursor": "eyJyZXNvdXJjZUlkIjoiMTYwNjU4ODE0NTU5Njc5MjA2NTk1MzE5NTAifQ==",
"node": {
"translatableContent": [
{
"key": "title",
"locale": "DEFAULT",
"type": "STRING",
"value": "Product title",
"digest": "07ec01a6c4ea382ed6ae7671b7bcf358"
}
],
"translations": [
{
"key": "title",
"locale": "en",
"market": {
"id": "DEFAULT"
},
"outdated": false,
"value": "Default corpus English - Product title"
}
],
"resourceId": "gid://shopline/Product/16065881455967920659531950"
}
}
],
"pageInfo": {
"startCursor": "eyJyZXNvdXJjZUlkIjoiMTYwNjU4ODE0NTU5Njc5MjA2NTk1MzE5NTAifQ==",
"endCursor": "eyJyZXNvdXJjZUlkIjoiMTYwNjU4ODE0NTU5Njc5MjA2NTk1MzE5NTAifQ==",
"hasNextPage": "true"
}
}
}
}
Was this article helpful to you?