Skip to content

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/update

Authentication Headers

Same as Create Translation Task.

Body

ParamTypeRequiredDescription
termsarrayYesUpdate items, up to 100

terms[] item fields

FieldTypeRequiredDescription
idstringYesThe term row id (from items[].id in the /terms response)
contentstringNoUpdate content; empty string is ignored
categorystringNoUpdate category
picstringNoUpdate image URL
translationsobjectNoPartial map of language → new value; untouched languages keep their value

⚠️ source_language cannot be updated — it is part of the composite unique key. Delete + re-create via /terms/create if 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=1 means at least one field was actually changed, 0 means 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 project
  • invalid_id — id format is invalid
  • error — other exception (details in error)

Error Codes

codeDescription
400terms > 100 / bad shape / any entry missing id / translations contains unknown language
401Signature invalid / timestamp expired
404appKey unknown
500Internal 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}"