Bulk Update Terms
Update project-termbase entries by id. Up to 100 per call; sync response with per-item status.
Endpoint
POST {BASE_URL}/api/open/v1/terms/updateAuthentication Headers
Same as Create Translation Task.
Body
| Param | Type | Required | Description |
|---|---|---|---|
terms | array | Yes | Update items, up to 100 |
terms[] item fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The term row id (from items[].id in the /terms response) |
content | string | No | Update content; empty string is ignored |
category | string | No | Update category |
pic | string | No | Update image URL |
translations | object | No | Partial map of language → new value; untouched languages keep their value |
⚠️
source_languagecannot be updated — it is part of the composite unique key. Delete + re-create via/terms/createif you need to move a term's source language.
Response
json
{
"success": true,
"code": 0,
"msg": "ok",
"trace_id": "...",
"data": {
"requested_count": 3,
"updated_count": 2,
"results": [
{ "id": "69e9b99c04e32e3f20afbbdb", "status": "updated", "modified": 1 },
{ "id": "invalid-id", "status": "invalid_id" },
{ "id": "a0000000000000000000000b", "status": "not_found" }
]
}
}results[].status values:
updated— hit + applied;modified=1means at least one field was actually changed,0means the submitted values matched the current state (no write happened)not_found— id has a valid format but no matching row in the caller's projectinvalid_id— id format is invaliderror— other exception (details inerror)
Error Codes
| code | Description |
|---|---|
| 400 | terms > 100 / bad shape / any entry missing id / translations contains unknown language |
| 401 | Signature invalid / timestamp expired |
| 404 | appKey unknown |
| 500 | Internal error |
Example
bash
APP_KEY="5685414646a54423c891d87194d87f3f"
APP_SECRET="<your App Secret>"
BASE_URL="https://api.loxily.com"
TIMESTAMP=$(date +%s)
BODY=$(cat <<'EOF'
{
"terms": [
{
"id": "69e9b99c04e32e3f20afbbdb",
"category": "Item",
"translations": { "en": "Combat Power", "zh-cn": "战斗力" }
},
{
"id": "69e9b99c04e32e3f20afbbda",
"content": "Rabbit Den Foreman",
"category": "Character"
}
]
}
EOF
)
SIGN=$(printf '%s' "${TIMESTAMP}${BODY}${APP_SECRET}" | md5)
curl -s -X POST "${BASE_URL}/api/open/v1/terms/update" \
-H "Content-Type: application/json" \
-H "X-Loxily-AppKey: ${APP_KEY}" \
-H "X-Loxily-Timestamp: ${TIMESTAMP}" \
-H "X-Loxily-Sign: ${SIGN}" \
--data "${BODY}"