prices
Create a price
Changed onCreate a price
post/prices
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/prices
- AuthHTTP bearer
Request body
Example request
{
"data": {
"attributes": {
"sku_code": "TSHIRTMM000000FFFFFFXLXX",
"amount_cents": 10000,
"compare_at_amount_cents": 13000,
"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 created 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 - breaking
the request property
//became required - 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
the request property
//became optional - 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