Update a stock line item
How to update an existing stock line item via API
To update an existing stock line item, send a PATCH
request to the /api/stock_line_items/:id
endpoint, where id
is the ID of the resource that you want to update.
Here below the list of all the possible arguments that you can pass with the request body.
Request
PATCH https://yourdomain.commercelayer.io/api/stock_line_items/:id
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
id |
| Required |
attributes.sku_code |
| Optional |
attributes.quantity |
| Optional |
attributes._reserve_stock |
| Optional |
attributes._release_stock |
| Optional |
attributes._decrement_stock |
| Optional |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.shipment |
| Optional |
relationships.line_item |
| Optional |
relationships.stock_item |
| Optional |
relationships.sku |
| Optional |
Example
The following request updates the stock line item identified by the ID "xYZkjABcde":
Last updated