translationsRegister
mutation
Requires write_translation access scope.
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Create or update the translation data for a store resource.
Arguments
The unique identifier for the resource.
For example, product ID
For example, product ID
16057169190700063316363001.Translation corpus information.
Return
translations
userErrors
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Update the translation data for a specific market and language within a resource
Code
mutation TranslationsRegister {
translationsRegister(
resourceId: "gid://shopline/Product/16065881455967920659531950"
translations: [
{
translatableContentDigest: "07ec01a6c4ea382ed6ae7671b7bcf358"
locale: "DEFAULT"
value: "Product title"
key: "title"
marketId: "2805979406510623080534"
}
]
) {
userErrors {
code
field
message
}
translations {
outdated
locale
value
key
type
updatedAt
market {
id
}
}
}
}
Response
{
"data": {
"translationsRegister": {
"translations": [
{
"outdated": false,
"value": "Default corpus English - Product title",
"key": "title",
"locale": "en",
"market": {
"id": "DEFAULT"
}
}
]
}
}
}
Was this article helpful to you?