(Quick Reference)
Service: Update an item translation
Description: Returns the updated item translation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL:
https://BASE_URL/api/VERSION/itemTranslations/{id}
Method: POST
Request content type: application/json
Parameters:
Name | Description | Type | Required | Example values |
---|
name | | String | yes | |
description | | String | no | |
itemId | | Long/String | yes | |
language | ISO language code | String | yes | fr |
useExternalId | By default, it is set to false. set it to true if you want to use external ids. | Boolean | no | true , false |
Success Output
Success case: response.status=200
{
"id": 519,
"itemReference": "bracelet-GRP09062",
"item": {
"id": 1,
"reference": "bracelet-GRP09062",
"href": "/valomniav2/api/v2.1/items/1"
},
"name": "Knot Band Bracelet",
"description": "",
"language": {
"id": 3,
"code": "en"
},
"organization": "entity1",
"dateCreated": "2015-12-16T16:38:44Z",
"lastUpdated": "2015-12-16T16:38:44Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "save_failed",
"error_description": "Failed to save instance."
}
{
"error": "missing_param",
"error_description": "itemId parameter is missing"
}
{
"error":"invalid_param_type",
"error_description": "The type of parameter itemId you provided is not valid for this request."
}
{
"error": "language_error",
"error_description": "Failed to "+operation+" the item translation : incorrect language code"
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The item with the id 31888 doesn't exist."
}
Failure case:response.status = 500
{
"error": "server_error",
"error_description": "Oops! Something went wrong..."
}