About Translate ​
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
Translation Service is a core component of the Genstore platform, providing powerful business data translation capabilities. Through translation services, business systems can support multi-language data translation, ensuring that business data is accurately converted into different target languages.
Core Functions
- Translate data: Retrieve the business data, translate it into the target language, and then write the translated data back into the business system.
Usage Scenarios
- Store Language Addition: When a user adds a new language in the store's backend, the system can translate the existing business data into the newly added language.
Endpoints
POST
/api/202412/translate: Translate all data
POST
/api/202412/translate/{domainName}/{bizId}: Translation specified data
PUT
/api/202412/translate/business/{domainName}: Save translated business data
GET
/api/202412/translate/business: Get translatable business types
GET
/api/202412/translate/business/{domainName}: Get translatable business data
GET
/api/202412/translate/languages: Get language list
Translate Object ​
The translate object.
Properties ​
{
"translate": {
"targetLanguage": "en-us",
"completionStatus": "1"
}
}
POST
Translate all data ​
Translate the entire business data, and after translation, the translated results will be written back to the business system for storage.
Access scope
Requires ANY of the following access scopes: write_translate
Endpoint
POST
/api/202412/translate
Request Params
Response Data
curl -X POST \
https://{shop}.genmystore.com/api/202412/translate" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"targetLanguage":"en-us"
}'
HTTP/1.1 200 OK
{
"translate": {
"targetLanguage": "en-us",
"completionStatus": "1"
}
}
POST
Translation specified data ​
Translate the specified business data, and after translation, the translated results will be written back to the business system for storage.
Access scope
Requires ANY of the following access scopes: write_translate
Endpoint
POST
/api/202412/translate/{domainName}/{bizId}
Request Params
Response Data
curl -X POST \
https://{shop}.genmystore.com/api/202412/translate/{domainName}/{bizId}" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"targetLanguage":"en-us",
"bizId":"100001"
}'
HTTP/1.1 200 OK
{
"translate": {
"bizId": "100001",
"bizDataList": [
{
"reference": "苹果",
"fieldName": "goodsName",
"targetVal": "apple"
}
]
}
}
PUT
Save translated business data ​
After the business data is translated into the target language, the translated data is saved through this api.
Access scope
Requires ANY of the following access scopes: write_translate
Endpoint
PUT
/api/202412/translate/business/{domainName}
Request Params
Response Data
curl -X PUT \
https://{shop}.genmystore.com/api/202412/translate/business/{domainName}" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"targetLanguage":"en",
"list":[
{
"bizId":"100001",
"bizDataList":[
{
"reference":"苹果",
"targetVal":"apple",
"extraTransData":"flag1",
"fieldKey":"goodsName",
"subBizDataList":[
{
"targetVal":"blue",
"extraTransData":"flag1",
"fieldKey":"goodsColor"
}
]
}
]
}
]
}'
HTTP/1.1 200 OK
{
"business": [
{
"bizId": "100001",
"bizDataList": [
{
"reference": "苹果",
"fieldName": "goodsName",
"targetVal": "apple"
}
]
}
]
}
GET
Get translatable business types ​
Get the business categories the store supports for translation.
Access scope
Requires ANY of the following access scopes: read_translate
write_translate
Endpoint
GET
/api/202412/translate/business
Request Params
Response Data
curl -X GET \
https://{shop}.genmystore.com/api/202412/translate/business" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"business": [
{
"name": "Settings",
"sort": "0",
"child": [
{
"domainName": "notifactions",
"name": "Notifications",
"sort": "0",
"queryParameter": [
{
"name": "上架",
"value": "active",
"key": "status"
}
]
}
]
}
]
}
GET
Get translatable business data ​
Retrieves a list of data that the business module needs to translate.
Access scope
Requires ANY of the following access scopes: read_translate
write_translate
Endpoint
GET
/api/202412/translate/business/{domainName}
Request Params
Response Data
curl -X GET \
https://{shop}.genmystore.com/api/202412/translate/business/{domainName}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"business": {
"total": "10000",
"list": [
{
"bizName": "Foxconn",
"bizId": "100001",
"bizDataList": [
{
"reference": "苹果",
"groupName": "Product Options",
"fieldName": "goodsName",
"targetVal": "apple",
"titleName": "collection1",
"extraTransData": "flag1",
"richText": "false"
}
],
"bizImg": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEUAAABFCAYAAAAcjSspAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAH2SURBVHhe7ZjNjcIwEEa3Hi5bBRUg0QA1cKIAyoALfbCiEqAQLyQT1iQvXv+QQKTvSXMIINvzMp44fDnRQVIASQEkBZAUQFIASQEkBZAUQFIASQEkBZAUQFIASQEkBZAUQFKA90o5bt3se+7WR7v+EJKk/GzmbrY52dULGEDKdb9ys+XBXe06hwQp59uEdRKL/dk+K2QIKbcxF7cxS27esxRbZGlEJ5kj5XKoky6Krfux4QiQsnK7i12nYgseQ8orq6tNj5Sz2y3JcCDu+3hkKVX/aOaPinCFNCQ12pczRKX0fF8LLJViC46NbvM9uTX8Li+8ZN4vJaa/1MlnPZEKKqUrLi1Ccw5YKRFMc/t8bqW8R8oYZEupb9aIT5+SBpl4xsmR4lVwJaV9pLdKaZ9oG4Exc/VKwe0QKt3o7eaRIaW9Dar3Mb8CmjVubD1Hk9RExHvR5CqlktBK7PGi2lSJjdlUR2q/m1il8NoevYVO1TZHbD+5My0pT3N4ryJ+/8A1er/9hO1T7/mC8BL++z+nThJvXFC05faPmLRKCZFTKUnc19Uzvol4REQ1hAApQlIASQEkBZAUQFIASQEkBZAUQFIASQEkBZAUQFIASQEkBZAUQFIASQEkBZAUQFIASQEkBZAUQFIASQEkBZAUQFIASQEkpYNzv/VNGFHwk0kpAAAAAElFTkSuQmCC"
}
]
}
}
GET
Get language list ​
Get a list of languages supported by the store.
Access scope
Requires ANY of the following access scopes: read_translate
write_translate
Endpoint
GET
/api/202412/translate/languages
Request Params
Response Data
curl -X GET \
https://{shop}.genmystore.com/api/202412/translate/languages" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"languages": {
"publishedList": [
{
"translateStatus": "true",
"isDefault": "true",
"name": "en-us",
"language": "en-us",
"marketNameList": [
"marketA"
]
}
],
"unPublishedList": [
{
"translateStatus": "false",
"isDefault": "false",
"name": "zh-cn",
"language": "zh-cn",
"marketNameList": [
"marketB"
]
}
]
}
}
About Translate
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
Translation Service is a core component of the Genstore platform, providing powerful business data translation capabilities. Through translation services, business systems can support multi-language data translation, ensuring that business data is accurately converted into different target languages.
Core Functions
- Translate data: Retrieve the business data, translate it into the target language, and then write the translated data back into the business system.
Usage Scenarios
- Store Language Addition: When a user adds a new language in the store's backend, the system can translate the existing business data into the newly added language.
Translate Object
The translate object.
Properties
POST
Translate all data
Translate the entire business data, and after translation, the translated results will be written back to the business system for storage.
Access scope
Requires ANY of the following access scopes: write_translate
Endpoint
POST
/api/202412/translate
POST
Translation specified data
Translate the specified business data, and after translation, the translated results will be written back to the business system for storage.
Access scope
Requires ANY of the following access scopes: write_translate
Endpoint
POST
/api/202412/translate/{domainName}/{bizId}
PUT
Save translated business data
After the business data is translated into the target language, the translated data is saved through this api.
Access scope
Requires ANY of the following access scopes: write_translate
Endpoint
PUT
/api/202412/translate/business/{domainName}
GET
Get translatable business types
Get the business categories the store supports for translation.
Access scope
Requires ANY of the following access scopes: read_translate
write_translate
Endpoint
GET
/api/202412/translate/business
GET
Get translatable business data
Retrieves a list of data that the business module needs to translate.
Access scope
Requires ANY of the following access scopes: read_translate
write_translate
Endpoint
GET
/api/202412/translate/business/{domainName}
GET
Get language list
Get a list of languages supported by the store.
Access scope
Requires ANY of the following access scopes: read_translate
write_translate
Endpoint
GET
/api/202412/translate/languages