(Quick Reference)
Service: Update
Description: This web service is used to update an assigned customer category to a tax list object into the database
Method: PUT
Request content type: application/json
URL:
https://BASE_URL/api/VERSION/customerCategoryTaxLists
Parameters:
Name | Description | Type | Required | Example values |
---|
id | id of the desired record to update | Long | Yes | 111 |
taxListId | the id of the tax list to be assigned | Long | Yes | 777 |
customerCategoryId | id of the customer category to assign | Long | Yes | 123 |
URL with external_id:
https://BASE_URL/api/VERSION/customerCategoryTaxLists/reference/{customerCategoryId}/{taxListId}
Parameters:
Name | Description | Type | Required | Examples values |
---|
customerCategoryId | reference of the customer category | String | Yes | CC-002 |
taxListId | reference of the tax list | String | Yes | TL-001 |
Success Output
Success case: response.status=200
{
"id": 11,
"taxListReference": "RT-2",
"customerCategoryReference": "101",
"customerCategory": {
"id": 3,
"reference": "101",
"name": "new Categ",
"href": "/api/v1/customerCategories/3"
},
"taxList": {
"id": 12,
"reference": "RT-2",
"name": "Tx2",
"href": "/api/v1/taxLists/12"
},
"organization": "Lyon",
"dateCreated": "2016-08-25T10:21:09Z",
"lastUpdated": "2016-08-25T10:43:51Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "missing_param",
"error_description": "taxListId parameter is missing"
}
{
"error": "already_assigned",
"error_description": "customer category is already assigned to taxList."
}
{
"error": "save_failed",
"error_description": "Failed to save instance"
}
{
"error":"invalid_param_type",
"error_description": "The type of parameter taxListId you provided is not valid for this request."
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The taxList with the id 999 doesn't exist."
}
Failure case:response.status = 500
{
"error": "server_error",
"error_description": "Oops! Something went wrong..."
}