stock_items
Create a stock item
Changed onCreate a stock item
post/stock_items
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/stock_items
- AuthHTTP bearer
Request body
Example request
{
"data": {
"attributes": {
"sku_code": "TSHIRTMM000000FFFFFFXLXX",
"quantity": 100,
"low_quantity": 10,
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"metadata": {
"foo": "bar"
}
},
"relationships": {
"stock_location": {
"data": {
"id": "XAyRWNUzyN"
}
},
"sku": {
"data": {
"id": "XAyRWNUzyN"
}
}
}
}
}Response
The created stock item object
Changes
- info
added the new optional request property
// - info
added the optional property
//to the response with the status
- info
- 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
the
request property default valuestock_itemswas removed - info
added the new
stock_itemsenum value to the request property/ - info
added the media type
application/vnd.api+jsonfor the response with the status
- breaking