fond-of-oryx / stock-api
The StockApi module provides a REST API for simple stock operations
1.0.0.beta.0
2023-02-07 12:50 UTC
Requires
- php: >=8.0
- spryker/api: ^0.4.0
- spryker/api-extension: ^0.1.0
- spryker/api-query-builder: ^0.1.0
- spryker/stock: ^8.0.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-27 13:03:08 UTC
README
The StockApi module provides a REST API for simple stock operations.
Package is ported and splitted from fond-of-spryker/stock-api
For creating and updating product stocks, please use fond-of-oryx/stock-product-api
Installation
composer require fond-of-oryx/stock-api
API
Get stock data by id
GET /stocks/{id_stock}
Example
curl -X GET "http://zed.yourdomain.com/api/rest/stocks/{id_stock}" \ -H 'Content-Type: application/json'
find stock data
GET /stocks?filter={"condition":"AND","rules":[{"id":"name","field":"name","type":"string","input":"text","operator":"equal","value":"EU"},{"id":"is_active","field":"is_active","type":"bool","input":"bool","operator":"equal","value":true}]}
Example
curl -X GET "http://zed.yourdomain.com/api/rest/stocks?filter={"condition":"AND","rules":[{"id":"name","field":"name","type":"string","input":"text","operator":"equal","value":"EU"},{"id":"is_active","field":"is_active","type":"bool","input":"bool","operator":"equal","value":true}]}" \ -H 'Content-Type: application/json'