(Quick Reference) Service: Show

Description: This web service return an existing unit details of the specified id in JSON format

URL:

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

URL with external_id:

https://BASE_URL/api/VERSION/units/reference/{id}

Method: GET

Parameters:

NameDescriptionTypeRequiredExample values
idid of the wanted unitsLong/StringYes777

Success Output

Success case: response.status=200
{
    "id": 14,
    "name": "piece",
    "reference": "PC",
    "organization": "Lyon",
    "dateCreated": "2016-08-18T11:19:40Z",
    "lastUpdated": "2016-08-18T11:19:40Z"
}

Failure Output

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

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