Update a price
Changed onUpdate a price
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/prices/{priceId}
- AuthHTTP bearer
Path parameters
The resource's id
Request body
Example request
{
"data": {
"id": "XAyRWNUzyN",
"attributes": {
"sku_code": "TSHIRTMM000000FFFFFFXLXX",
"amount_cents": 10000,
"compare_at_amount_cents": 13000,
"processed_at": "2018-01-01T12:00:00.000Z",
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"rules": {},
"metadata": {
"foo": "bar"
}
},
"relationships": {
"price_list": {
"data": {
"id": "XAyRWNUzyN"
}
},
"sku": {
"data": {
"id": "XAyRWNUzyN"
}
},
"price_tiers": {
"data": {
"id": "XAyRWNUzyN"
}
}
}
}
}Response
The updated price object
Changes
- breaking
added the new required request property
/// - breaking
added the new required request property
/// - breaking
request property
/was restricted to a list of enum values - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the request property
//became nullable - info
the
request property default valuepriceswas removed - info
added the new
pricesenum value to the request property/ - info
added the media type
application/vnd.api+jsonfor the response with the status
- breaking