In this part of the documentation you can learn more about the API's translation resource. With this resource, it is possible to retrieve, delete and update any translation in your shops. We will also have a look at the associated data structures.
This resource supports the following operations:
| Access URL | GET | GET (List) | PUT | PUT (Batch) | POST | DELETE | DELETE (Batch) |
|---|---|---|---|---|---|---|---|
| /api/translations | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
If you want to access this resource, simply query the following URL:
You can retrieve data of translations by providing the specific id
| Field | Type | Original object |
|---|---|---|
| type | string | |
| data | array | |
| key | integer | |
| shopId | integer (foreign key) | Shop |
| shop | object | Shop |
Since this returns a list, the following fields will be added to the array:
| Field | Type | Comment |
|---|---|---|
| total | integer | The total number of translations |
| success | boolean | Indicates if the call was successful or not. |
To post a translation, you need to identify it by the following parameters
| Identifier | Parameter | Database Column | Example Call |
|---|---|---|---|
| Translation Id | id | s_core_translations.id |
/api/translations/2 |
| Element number | - | - | /api/translations/20003?useNumberAsId=true |
You can use this data to add a new translation to the shop
| Field | Type | Original object |
|---|---|---|
| id | integer (primary key) | |
| locale | string | |
| language | string | |
| territory | string | |
| locale | object | |
| type | string | |
| data | array | |
| key | integer | |
| shopId | integer (foreign key) | Shop |
You can post or put data by sending the following data to this URL:
| Field | Type | Original Object |
|---|---|---|
| id | integer (primary key) | |
| name | string | |
| position | integer | |
| comparable | boolean | |
| sortMode | integer |
To delete a shop, simply call this URL with the DELETE request:
Replace the id with the specific translation id.
In order to delete more than one translation at once, it's possible to provide an array of ids to the REST API. Simply pass the array of translation ids to the following URL (example)
without providing an id as seen in the single DELETE request. As data provide the array of ids you wish to delete.
Updating many articles at once requires an array of translation data being provided to the following URL using the PUT request (example):
Simply provide the same data as described in the GET request.
Unlike other batch endpoints, a "key" field is required instead of an "id" field.