(Quick Reference)
Service: Show
Description: This web service return an existing customerDiscount object of the specified id in JSON format
Method: GET
URL:
https://BASE_URL/api/VERSION/customerDiscountLists/{id}
Parameters:
Name | Description | Type | Required | Example values |
---|
id | id of the wanted record | Long | Yes | 777 |
URL with external_id:
https://BASE_URL/api/VERSION/customerDiscountLists/reference/{customerId}/{discountListId}
Parameters:
Name | Description | Type | Required | Examples values |
---|
customerId | reference of the customer | String | Yes | C-002 |
discountListId | reference of the discount list | String | Yes | DL-001 |
Success Output
Success case: response.status=200
{
"id": 327,
"customerReference": "C-001",
"discountListReference": "RDis-001",
"customer": {
"id": 1334,
"reference": "C-001",
"name": "cus1",
"href": "/api/v1.0/customers/1334"
},
"discountList": {
"id": 4,
"reference": "RDis-001",
"name": "discount1",
"href": "/api/v1.0/discountLists/4"
},
"organization": "Lyon",
"dateCreated": "2016-08-23T15:29:54Z",
"lastUpdated": "2016-08-23T15:29:54Z"
}
Failure Output
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The customer discount list 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."
}