Update a stock item
Changed onUpdate a stock item
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/stock_items/{stockItemId}
- AuthHTTP bearer
Path parameters
The resource's id
Request body
Example request
{
"data": {
"id": "XAyRWNUzyN",
"attributes": {
"sku_code": "TSHIRTMM000000FFFFFFXLXX",
"quantity": 100,
"low_quantity": 10,
"_validate": true,
"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 updated 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
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 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