Attribute Translations
Locale-specific names for attributes. The single endpoint is the destination of the IRI strings emitted in the translations[] array of GET /api/shop/attributes/{id} — for example /api/shop/attribute_translations/23.
⚠️ The URL uses an underscore:
attribute_translations, notattribute-translations.
Most clients won't call this collection directly — they'll either:
- read the inline
translationobject on the parent attribute (current locale only), or - follow a
translations[]IRI for a single non-default locale.
Use these endpoints when you need to bulk-load every translation (e.g. for offline caching) or audit translation completeness.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/shop/attribute_translations | Paginated flat list of every translation |
| GET | /api/shop/attribute_translations/{id} | Single translation by ID |
Request Headers
| Header | Required | Description |
|---|---|---|
Accept | Yes | application/json |
X-STOREFRONT-KEY | Yes | Storefront API key (pk_storefront_…) |
Query Parameters (collection only)
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-based) |
per_page | integer | 10 | Items per page. Max 50. |
Pagination headers are emitted on the collection. See Pagination.
Translation Object Fields
| Field | Type | Description |
|---|---|---|
id | integer | Translation primary key |
attributeId | integer | Owning attribute's ID — fetch via GET /api/shop/attributes/{attributeId} |
locale | string | Locale code (e.g. en, fr, de, ar) |
name | string | Localized attribute name shown to customers in that locale |
Typical Flow
GET /api/shop/attributes/23
└─ response.translations = [
"/api/shop/attribute_translations/23",
"/api/shop/attribute_translations/156",
...
]
GET /api/shop/attribute_translations/156
└─ { "id": 156, "attributeId": 23, "locale": "fr", "name": "Couleur" }You don't need to know the translation ID up front — read the translations[] array on the attribute and dereference any entry you need.
Use Cases
- Pre-populate a localized admin tool that lets store managers review every attribute translation in one view.
- Build an offline cache of all attribute names per locale for an SPA.
- Validate translation completeness — sort/filter by locale and check for empty
namevalues.
Related Resources
- Attributes — returns inline
translationfor the request locale andtranslations[]IRIs for the rest - Attribute Options
- Introduction → IRIs & HATEOAS

