The StockApi module provides a REST API for simple product stock updates.
composer require fond-of-spryker/stock-api
Update stock of a concrete product. quantity
and stock_type
are mandatory fields.
curl -X PATCH "http://zed.yourdomain.com/api/rest/stocks/{sku}" \
-H 'Content-Type: application/json' \
-d $'{
"data": {
"quantity": 10,
"stock_type": "Warehouse1",
"is_never_out_of_stock": true
}
}'