(Quick Reference) Service: Show an item-unit

Description: Returns the requested item-unit in json format when successful. Returns a json response, describing the failure condition when unsuccessful.

Method: GET

URL:

https://BASE_URL/api/VERSION/itemUnits/{id}

Parameters:

NameDescriptionTypeRequiredExample values
idThe numerical ID of the desired item unitLongYes777

URL with external_id:

https://BASE_URL/api/VERSION/itemUnits/reference/{itemId}/{unitId}

Parameters:

NameDescriptionTypeRequiredExamples values
itemIdreference of the itemStringYeseliteBook_820
unitIdreference of the unitStringYesPiéce

Success Output

Success case: response.status = 200
{
  "id": 1,
  "itemReference": "bracelet-GRP09062",
  "unitReference": "pcs",
  "item": {
    "id": 497,
    "reference": "bracelet-GRP09062",
    "name": "Knot Band Bracelet",
    "href": "/api/v1.0/items/497"
  },
  "unit": {
    "id": 1,
    "reference": "pcs",
    "name": "pieces",
    "href": "/api/v1.0/units/1"
  },
  "quantity": 1,
  "unpacking": true,
  "salesQuantity": 4,
  "volume" : 5,
  "weight" : 15.33,
  "barcode": "(10)45566(17)161231",
  "expirationDate": "2016-12-31",
  "isDefault": true,
  "defaultDisplay": true,
  "organization": "entity1",
  "dateCreated": "2015-12-17T08:17:07Z",
  "lastUpdated": "2016-01-08T08:10:54Z"
}

Failure Output

Failure case:response.status = 400
{
    "error": "invalid_param_type",
    "error_description": "The type of parameter id you provided is not valid for this request."
}

Failure case:response.status = 404
{
  "error": "not_found",
  "error_description": "The item unit with the id 1000 doesn't exist."
}