fond-of-spryker / stock-api
The StockApi module provides a REST API for simple product stock updates.
Installs: 11 747
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 1
Requires
- php: >=7.1
- spryker/api: ^0.1
- spryker/api-query-builder: ^0.1
- spryker/kernel: ^3.0.0
- spryker/stock: ^5.0.0
Requires (Dev)
- codeception/codeception: ^2.3
- mikey179/vfsstream: ^1.6
- php-coveralls/php-coveralls: ^2.0
- phpro/grumphp: ^0.14
- sebastian/phpcpd: ^4.0
- spryker/code-sniffer: ^0.11
This package is auto-updated.
Last update: 2024-11-05 19:12:32 UTC
README
The StockApi module provides a REST API for simple product stock updates.
Installation
composer require fond-of-spryker/stock-api
API
Update stock of a concrete product. quantity
and stock_type
are mandatory fields.
PATCH /api/rest/stocks/{sku}
Example
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 } }'