translatableResources
query
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.
Get a store's multiple translation data.
Arguments
Returns elements following the specified cursor. The
first argument must also be specified when using this argument.Returns elements preceding the specified cursor. The
last argument must also be specified when using this argument.Returns the first n elements in the list.
Returns the last n elements in the list.
Whether to reverse the order of the list.
● true: reverse
● false: do not reverse
Default value: false
The type of the resource. Valid values are:
COLLECTION: CollectionPRODUCT: ProductPRODUCT_Category: Product categoryPRODUCT_OPTION: Product optionPRODUCT_VARIANT: Product variantSELLING_PLAN: Selling planFILTER: FilterFILTER_GROUP: Filter groupFILTER_VALUE: Filter valueSORT: SortDELIVERY_METHOD: Delivery methodPAYMENT_METHOD: Payment methodTAXES: TaxesSETTLE_CONFIG: Settlement configurationSETTLE_ADDITIONAL_INFO: Settlement additional informationWEBSITE_BLOG: Website blogWEBSITE_BLOG_COLLECTION: Website blog collectionWEBSITE_CUSTOMIZE_PAGE: Website customize pageWEBSITE_NAVIGATION: Website navigationWEBSITE_POLICY_PAGE: Website policy pageLINK: LinkMETAFIELD: Metafield
Return
A list of edges, containing the nodes and their corresponding cursors.
Pagination information for the current page.
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Get a store's multiple translation data
Code
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": {
"resourceId": "gid://shopline/Product/16065881455967920659531950",
"translatableContent": [
{
"locale": "DEFAULT",
"type": "STRING",
"value": "Product title",
"digest": "07ec01a6c4ea382ed6ae7671b7bcf358",
"key": "title"
}
],
"translations": [
{
"key": "title",
"locale": "en",
"market": {
"id": "DEFAULT"
},
"outdated": false,
"value": "Default corpus English - Product title"
}
]
}
}
],
"pageInfo": {
"endCursor": "eyJyZXNvdXJjZUlkIjoiMTYwNjU4ODE0NTU5Njc5MjA2NTk1MzE5NTAifQ==",
"hasNextPage": "true",
"startCursor": "eyJyZXNvdXJjZUlkIjoiMTYwNjU4ODE0NTU5Njc5MjA2NTk1MzE5NTAifQ=="
}
}
}
}
Was this article helpful to you?