Translations

Manage storefront and content translations

GET /admin/api/translations

List all translation keys (built-in and custom) with their default and override values per locale, with pagination and filtering.

Parameters

Name Type Required Description
page integer optional Page number, 1-indexed (default: 1)
per_page integer optional Items per page, 1-100 (default: 20)
search string optional Case-insensitive text search on key name
key_type string optional Filter by type: "builtin" or "custom"

Response 200

{
  "data": [
    {
      "key": "product_add_to_cart",
      "is_builtin": true,
      "defaults": {
        "en": "Add to cart",
        "de": "In den Warenkorb"
      },
      "custom": {
        "en": "Buy now"
      }
    },
    {
      "key": "home_custom_banner",
      "is_builtin": false,
      "defaults": {},
      "custom": {
        "en": "Free shipping on orders over $50",
        "de": "Kostenloser Versand ab 50 EUR"
      }
    }
  ],
  "page": 1,
  "per_page": 20,
  "total": 85,
  "total_pages": 5,
  "locales": [
    "en",
    "de"
  ]
}

Example

curl "https://yourshop.zeroshop.io/admin/api/translations?page=1&per_page=20&search=cart" \
  -H "Authorization: Bearer zspat_..."
PUT /admin/api/translations

Bulk upsert custom translation overrides. Each entry specifies a key, locale, and value. An empty value deletes the override (reverts to built-in default). Custom keys not in the built-in set are also supported.

Request Body

{
  "translations": [
    {
      "key": "product_add_to_cart",
      "locale": "en",
      "value": "Buy now"
    },
    {
      "key": "product_add_to_cart",
      "locale": "de",
      "value": "Jetzt kaufen"
    },
    {
      "key": "home_custom_banner",
      "locale": "en",
      "value": "Free shipping on orders over $50"
    }
  ]
}

Response 204

Example

curl -X PUT "https://yourshop.zeroshop.io/admin/api/translations" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "translations": [
      {"key": "product_add_to_cart", "locale": "en", "value": "Buy now"},
      {"key": "product_add_to_cart", "locale": "de", "value": "Jetzt kaufen"}
    ]
  }'
DELETE /admin/api/translations/{key}/{locale}

Delete a single custom translation override, reverting to the built-in default for that key and locale.

Response 204

Example

curl -X DELETE "https://yourshop.zeroshop.io/admin/api/translations/product_add_to_cart/en" \
  -H "Authorization: Bearer zspat_..."
PUT /admin/api/content-translations

Replace all content translations for a catalogue entity. Supports entity types: product, category, option, option_value. Translatable fields depend on the entity type (e.g. name, description for products). An empty translations array clears all translations for that entity.

Request Body

{
  "entity_type": "product",
  "entity_id": 1,
  "translations": [
    {
      "locale": "de",
      "field": "name",
      "value": "Klassisches Baumwoll-T-Shirt"
    },
    {
      "locale": "de",
      "field": "description",
      "value": "Ein bequemes T-Shirt aus 100% Baumwolle."
    },
    {
      "locale": "fr",
      "field": "name",
      "value": "T-shirt classique en coton"
    }
  ]
}

Response 204

Example

curl -X PUT "https://yourshop.zeroshop.io/admin/api/content-translations" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "entity_type": "product",
    "entity_id": 1,
    "translations": [
      {"locale": "de", "field": "name", "value": "Klassisches Baumwoll-T-Shirt"},
      {"locale": "de", "field": "description", "value": "Ein bequemes T-Shirt aus 100% Baumwolle."}
    ]
  }'

We value your privacy

We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.