Cognis
Commerce Translations

Upsert Many

POST
/org/{orgId}/ecom/translations/batch

Public API endpoint: ecomTranslation.upsertMany

Required scopes: org:ecom:translations:write

Authorization

bearerAuth
AuthorizationBearer <token>

API key (prefix: cogn_) from Account → Developer

In: header

Path Parameters

orgId*string

Organization ID (prefix: org_)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/v1/org/string/ecom/translations/batch" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "entityType": "product",        "entityId": "string",        "tKey": "string",        "locale": "en",        "value": "string",        "format": "plain"      }    ]  }'
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "etx-sample",
        "orgId": "1",
        "entityType": "product",
        "entityId": "prod-sample",
        "namespace": "ecom",
        "tKey": "title",
        "locale": "sv",
        "sourceValue": "English title",
        "value": "Svensk titel",
        "format": "plain",
        "version": 1,
        "createdAt": "2025-01-01T00:00:00.000Z",
        "updatedAt": "2025-01-01T00:00:00.000Z"
      }
    ]
  },
  "message": "Success",
  "traceId": "req_abc123"
}
{
  "success": false,
  "message": "Invalid data",
  "errors": [
    {
      "code": 400,
      "message": "Invalid data"
    }
  ],
  "traceId": "req_xxx"
}
{
  "success": false,
  "message": "Unauthorized",
  "errors": [
    {
      "code": 401,
      "message": "Unauthorized"
    }
  ],
  "traceId": "req_xxx"
}
{
  "success": false,
  "message": "Forbidden",
  "errors": [
    {
      "code": 403,
      "message": "Forbidden"
    }
  ],
  "traceId": "req_xxx"
}
{
  "success": false,
  "message": "Not found",
  "errors": [
    {
      "code": 404,
      "message": "Not found"
    }
  ],
  "traceId": "req_xxx"
}
{
  "success": false,
  "message": "Conflict",
  "errors": [
    {
      "code": 409,
      "message": "Conflict"
    }
  ],
  "traceId": "req_xxx"
}
{
  "success": false,
  "message": "string",
  "errors": [
    {
      "code": 0,
      "message": "string",
      "details": {}
    }
  ],
  "traceId": "string",
  "params": {},
  "readableMessage": "string"
}
{
  "success": false,
  "message": "Rate limit exceeded",
  "errors": [],
  "traceId": "req_xxx"
}
{
  "success": false,
  "message": "Unexpected error",
  "errors": [
    {
      "code": 500,
      "message": "Unexpected error"
    }
  ],
  "traceId": "req_xxx"
}