需要 write_translation 权限点。
接口访问需要令牌,具体如何获取令牌请参考:身份认证
更新资源 ID 下的店铺的翻译语料。你可以基于一个资源 ID 更新对应市场、类型细分下的语料信息。
Arguments
resourceId ● ID!non-null
资源的唯一标识符。
样例:商品 ID 16057169190700063316363001
translations ● [TranslationInput!]!non-null
翻译语料信息。
More
Return
translations ● [Translation!]non-null
语料资源
More
userErrors ● [TranslationUserError!]!non-null
异常信息
More
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
更新店铺下某一资源 ID 在特定市场、语言下的翻译语料。
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": [
{
"key": "title",
"locale": "en",
"market": {
"id": "DEFAULT"
},
"outdated": false,
"value": "Default corpus English - Product title"
}
]
}
}
}
这篇文章对你有帮助吗?