(Quick Reference) Service: Upsert

Description: This web service is used to insert an item translation object to the database if it does not already exist, or update it.

URL with external_id:

https://BASE_URL/api/VERSION/itemTranslations/reference/{itemId}/{languageId}

Method: POST

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredExample values
namethe name of the item translatedStringYes 
descriptiondescription of the item translatedStringNo 

Success Output

Success case: response.status=201
{
  "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"
}

Failure case:response.status = 500
{
    "error": "server_error",
    "error_description": "Oops! Something went wrong..."
}