(Quick Reference)
Service: Show a price
Description: This web service return an existing price of the specified id in JSON format
Method: GET
URL:
https://BASE_URL/api/VERSION/prices/{id}
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The numerical ID of the desired price | Long | Yes | 777 |
URL with external_id:
https://BASE_URL/api/VERSION/prices/reference/{itemId}/{unitId}/{priceListId}
Parameters:
Name | Description | Type | Required | Examples values |
---|
itemId | reference of the item | String | Yes | eliteBook_820 |
unitId | reference of the unit | String | Yes | Piéce |
priceListId | reference of the price list | String | Yes | DL-001 |
Success Output
Success case: response.status=200
{
"id": 1,
"priceList": {
"id": 1,
"reference": "cost_based_pricing",
"name": "Cost-based Pricing",
"href": "/api/v1.0/priceLists/1"
},
"itemReference": "bracelet-GRP09062",
"unitReference": "pcs",
"itemUnit": {
"id": 1,
"href": "/api/v1.0/itemUnits/1"
},
"value": 22,
"unitPrice": 20,
"marginRate": 10,
"organization": "entity1",
"dateCreated": "2015-12-17T08:18:27Z",
"lastUpdated": "2015-12-17T08:18:27Z"
}
Failure Output
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The price with the id 10 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."
}