Skip to content

fond-of/spryker-stock-api

Repository files navigation

Stock API Module

Build Status PHP from Travis config license

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            
          }
     }'