(Quick Reference)
Service: Update
Description: This web service is used to update an existing customerCategoryPriceLists object to the database
Method: PUT
Request content type: application/json
URL:
https://BASE_URL/api/VERSION/customerCategoryPriceLists
Parameters:
Name | Description | Type | Required | Example values |
---|
id | id of the desired record to update | Long | Yes | 123 |
priceListId | the id of the priceList to assign | Long | Yes | 777 |
customerCategoryId | the id of the customerCategoryId to assign | Long | Yes | 111 |
URL with external_id:
https://BASE_URL/api/VERSION/customerCategoryPriceLists/reference/{customerCategoryId}/{priceListId}
Parameters:
Name | Description | Type | Required | Examples values |
---|
customerCategoryId | reference of the customer category | String | Yes | CC-002 |
priceListId | reference of the price list | String | Yes | DL-001 |
Success Output
Success case: response.status=200
{
"id": 11,
"priceListReference": "PL-009",
"customerCategoryReference": "1113",
"customerCategory": {
"id": 62,
"reference": "1113",
"name": "joe",
"href": "/api/v1/customerCategories/62"
},
"priceList": {
"id": 10,
"reference": "PL-009",
"name": "AddedPriceLIst12 new",
"href": "/api/v1/priceLists/10"
},
"organization": "Lyon",
"dateCreated": "2016-08-24T10:43:47Z",
"lastUpdated": "2016-08-24T11:03:26Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "missing_param",
"error_description": "priceListId parameter is missing"
}
{
"error": "already_assigned",
"error_description": "customerCategory is already assigned to priceList."
}
{
"error": "invalid_param_type",
"error_description": "The type of parameter priceListId you provided is not valid for this request."
}
{
"error": "save_failed",
"error_description": "Failed to save instance"
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The priceList with the id 999 doesn't exist."
}
Failure case:response.status = 500
{
"error": "server_error",
"error_description": "Oops! Something went wrong..."
}