(Quick Reference) Service: Update

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

URL:

https://BASE_URL/api/VERSION/taxLists

URL with external_id:

https://BASE_URL/api/VERSION/taxLists/reference/{id}

Method: PUT

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredExample values
referencethe new reference of the tax listStringYes 
namethe new name of the tax listStringYes 
taxTypeIdthe new id of the used tax typeLongYes17
reference must be unique

Success Output

Success case: response.status=201
{
    "id": 11,
    "name": "new Tx1",
    "reference": "RT-007",
    "organization": "Lyon",
    "taxType": {
        "id": 17,
        "name": "Percentage %",
        "href": "/api/v1.0/taxTypes/17"
    },
    "dateCreated": "2016-08-18T13:44:01Z",
    "lastUpdated": "2016-08-18T14:29:00Z"
}

Failure Output

Failure case:response.status = 400
{
    "error": "missing_param",
    "error_description": "reference parameter is missing"
}
{
    "error": "not_unique",
    "error_description": "reference already used"
}
{
     "error": "save_failed",
     "error_description": "Failed to save instance"
}
{
     "error":"invalid_param_type",
     "error_description": "The type of parameter taxTypeId you provided is not valid for this request."
}

Failure case:response.status = 404
{
    "error": "not_found",
    "error_description": "The tax type with the id 99 doesn't exist."
}

Failure case:response.status = 500
{
    "error": "server_error",
    "error_description": "Oops! Something went wrong..."
}