(Quick Reference) Service: Update

Description: This web service is used to update an existing customerTaxList object to the database

Method: PUT

Request content type: application/json

URL:

https://BASE_URL/api/VERSION/customerTaxLists/{id}

Parameters:

NameDescriptionTypeRequiredExample values
idid of the desired record to updateLongYes111
taxListIdthe id of the tax list to be assignedLongYes777
customerIdid of the customer to assignLongYes123

URL with external_id:

https://BASE_URL/api/VERSION/customerTaxLists/reference/{customerId}/{taxListId}

Parameters:

NameDescriptionTypeRequiredExamples values
customerIdreference of the customerStringYesC-002
taxListIdreference of the tax listStringYesTL-001

Success Output

Success case: response.status=201
{
    "id": 164,
    "customerReference": "C-002",
    "taxListReference": "RT-23",
    "customer": {
        "id": 1335,
        "reference": "C-002",
        "name": "cus2",
        "href": "/api/v1/customers/1335"
    },
    "taxList": {
        "id": 14,
        "reference": "RT-23",
        "name": "Tx22",
        "href": "/api/v1/taxLists/14"
    },
    "organization": "Lyon",
    "dateCreated": "2016-08-24T09:33:41Z",
    "lastUpdated": "2016-08-24T09:35:31Z"
}

Failure Output

Failure case:response.status = 400
{
    "error": "missing_param",
    "error_description": "taxListId parameter is missing"
}
{
	"error": "already_assigned",
 	"error_description": "customer 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..."
}