(Quick Reference)
Service: Update an item
Description: Returns the updated item in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL:
https://BASE_URL/api/VERSION/items/{id}
URL with external_id:
https://BASE_URL/api/VERSION/items/reference/{id}
Method: POST
Request content type: application/x-www-form-urlencoded or multipart/form-data
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The ID of the desired item | Integer/String | yes | 123 |
reference | | String | yes | |
name | | String | yes | |
description | | String | no | |
categoryId | The ID of the item category. | Long/String | - | |
isActive | By default, it is set to true | Boolean | no | true, false |
isNew | | Boolean | no | true, false |
displayOrder | | Integer | no | |
volumeInLiter | | Double | no | 1.5 |
pdfFile | | pdf | no | |
video | | webm, avi, mpeg , quicktime | no | |
image1 | | jpg, gif, png, bmp | no | |
image2 | | jpg, gif, png, bmp | no | |
image3 | | jpg, gif, png, bmp | no | |
tags | Tags should not contain comma seperator | JSON list | no | ["bracelet","jewelry"] |
similarItems | List of similar items id | JSON list | no | [750,751] |
hasSerialNumbers | By default, it is set to false | Boolean | no | true, false |
hasDeclination | By default, it is set to false | Boolean | no | true, false |
If item has already sold or reserved serial numbers, hasSerialNumbers
parameter will be fixed to true.
Declination parameters (optional):
Parameter name: attributeValues
Parameter type: a json structure
Name | Description | Type | Required | Example values |
---|
itemReference | | String | yes | |
attributeValueId | | Long | yes | |
Success Output
Status: HTTP/1.1 200 OK
{
"id": 706,
"reference": "bracelet-GRP09062",
"name": "Knot Band Bracelet",
"description": null,
"itemCategoryId": 2,
"itemCategory": {
"id": 2,
"reference": "Ref-01",
"name": "Jewelry",
"href": "/api/v1.0/itemCategories/2"
},
"itemImages": null,
"displayOrder": 1,
"volumeInLiter": null,
"isActive": false,
"isNew": true,
"videoUrl": "",
"videoSize": 0,
"formattedVideoSize": "0",
"pdfUrl": "",
"pdfSize": 0,
"formattedPdfSize": "0",
"similarItems": [],
"parentId": null,
"parentItem": null,
"hasDeclination": false,
"relatedItems": [],
"itemAttributes": [],
"tags": [],
"hasSerialNumbers": false,
"serialNumbers": null,
"organization": "entity1",
"dateCreated": "2016-08-11T09:17:30Z",
"lastUpdated": "2016-08-12T10:17:30Z"
}
Failure Output
Status: HTTP/1.1 404 Not Found
{
"error": "not_found",
"error_description": "The item with the id 706 doesn't exist."
}