(Quick Reference) Service: Upsert

Description: This web service is used to insert a tax list object to the database if it does not already exist, or update it.

URL with external_id:


Method: POST

Request content type: application/json


NameDescriptionTypeRequiredExample values
namethe name of the new tax listStringYes 
taxTypeIdid of the tax type usedLongYes 
reference must be unique

Success Output

Success case: response.status=201
    "id": 13,
    "name": "Tx22",
    "reference": "RT-22",
    "organization": "Lyon",
    "taxType": {
        "id": 18,
        "name": "Fixed amount",
        "href": "/api/v1.0/taxTypes/18"
    "dateCreated": "2016-08-18T14:18:23Z",
    "lastUpdated": "2016-08-18T14:18:23Z"

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_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..."