(Quick Reference) Service: Show a return detail

Description: Returns the requested return detail in json format when successful. Returns a json response, describing the failure condition when unsuccessful.

URL:

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

Method: GET

Parameters:

NameDescriptionTypeRequiredExample values
idThe numerical ID of the desired return detailLongYes777

Success Output

Success case: response.status=200
{
	"id": 40,
	"returnType": "RETURN",
	"returnReference": "return-1",
	"returnOperation": {
		"id": 44,
		"reference": "return-1",
		"href": "/api/v1.0/returns/44"
	},
	"serialNumber": "serial_number",
	"picture": "BASE_URL/entity1-1450169988465/photoReturn/1476113492480_IMG_2009.PNG",
	"itemUnitId": 2,
	"itemReference": "ref",
	"unitReference": "pcs",
	"item": {
		"id": 497,
		"reference": "ref",
		"name": "item name",
		"href": "/api/v1.0/items/497"
	},
	"unit": {
		"id": 1,
		"reference": "pcs",
		"name": "pieces",
		"href": "/api/v1.0/units/1"
	},
	"quantity": 2,
	"comment": "the deadline is up",
	"organization": "entity1",
	"dateCreated": "2016-09-22T11:12:00Z",
	"lastUpdated": "2016-10-10T15:31:32Z"
}

Failure Output

Failure case:response.status = 404

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