(Quick Reference) Service: Save

Description: This web service is used to add a new customerCategoryPriceLists list object into the database

URL:

https://BASE_URL/api/VERSION/customerCategoryPriceLists

Method: POST

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredExample values
priceListIdthe id of the priceList to assignLong/StringYes777
customerCategoryIdthe id of the customerCategory to assignLong/StringYes111
useExternalIdBy default, it is set to false. set it to true if you want to use external ids.Booleannotrue , false

Success Output

Success case: response.status=201
{
    "id": 12,
    "priceListReference": "PL-009",
    "customerCategoryReference": "11133",
    "customerCategory": {
        "id": 63,
        "reference": "11133",
        "name": "joe",
        "href": "/api/v1/customerCategories/63"
    },
    "priceList": {
        "id": 10,
        "reference": "PL-009",
        "name": "AddedPriceLIst12 new",
        "href": "/api/v1/priceLists/10"
    },
    "organization": "Lyon",
    "dateCreated": "2016-08-24T10:55:26Z",
    "lastUpdated": "2016-08-24T10:55: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..."
}