(Quick Reference)
Service: Show an operation (exchange, cancellation or return)
Description: Returns the requested operation in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL:
https://BASE_URL/api/VERSION/returns/{id}
URL with external_id:
https://BASE_URL/api/VERSION/returns/reference/{id}
Method: GET
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The ID of the desired operation | Long/String | yes | 123 |
Success Output
Success case: response.status=200
{
"id": 5,
"reference": "R-E-005",
"latitude": null,
"longitude": null,
"checkinDate": null,
"type": "RETURN",
"userId": 3,
"user": {
"id": 3,
"reference": "RE-002",
"href": "/api/v1.0/users/3"
},
"customerId": 1,
"customer": {
"id": 1,
"reference": "R001",
"name": "CUS1",
"href": "/api/v1.0/customers/1"
},
"returnLines": [],
"organization": "entity1",
"dateCreated": "2016-09-27T14:08:09Z"
}
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 returnOperation with the id 7065 doesn't exist."
}