fond-of-spryker/stock-api

The StockApi module provides a REST API for simple product stock updates.

2.0.0 2018-11-26 15:49 UTC

This package is auto-updated.

Last update: 2024-10-05 18:57:06 UTC


README

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