PHPackages                             fond-of-oryx/stock-product-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. fond-of-oryx/stock-product-api

ActiveLibrary[API Development](/categories/api)

fond-of-oryx/stock-product-api
==============================

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

1.0.0.beta.1(3y ago)09.2kMITPHPPHP &gt;=8.0CI passing

Since Feb 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/fond-of-oryx/stock-product-api)[ Packagist](https://packagist.org/packages/fond-of-oryx/stock-product-api)[ RSS](/packages/fond-of-oryx-stock-product-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (3)Used By (0)

Stock Product API Module
========================

[](#stock-product-api-module)

[![license](https://camo.githubusercontent.com/850eae1099d2b05f53383473d7cd51f9bc1ab09b7d0d9e5122f1dd930efdcc6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e737667)](https://packagist.org/packages/fond-of-oryx/stock-product-api)

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

Package ported from `fond-of-spryker/stock-api`

Installation
------------

[](#installation)

```
composer require fond-of-oryx/stock-product-api

```

#### Register Plugins in `ApiDependencyProvider`

[](#register-plugins-in-apidependencyprovider)

```
    /**
     * @return \Spryker\Zed\Api\Dependency\Plugin\ApiResourcePluginInterface[]
     */
    protected function getApiResourcePluginCollection(): array
    {
        return [
            ...
            new StockProductApiResourcePlugin(),
        ];
    }

    /**
     * @return \Spryker\Zed\Api\Dependency\Plugin\ApiValidatorPluginInterface[]
     */
    protected function getApiValidatorPluginCollection(): array
    {
        return [
            ...
            new StockProductApiValidatorPlugin(),
        ];
    }

```

API
---

[](#api)

### Update stock of a concrete product. `sku`, `stock_type`, and `quantity` are mandatory fields.

[](#update-stock-of-a-concrete-product-sku-stock_type-and-quantity-are-mandatory-fields)

##### PATCH /api/rest/stock-products/{id\_stock\_product}

[](#patch-apireststock-productsid_stock_product)

##### Example

[](#example)

```
curl -X PATCH "http://zed.yourdomain.com/api/rest/stock-products/{id_stock_product}" \
     -H 'Content-Type: application/json' \
     -d $'{
          "data": {
            "sku": "SKU",
            "stock_type": "EU",
            "quantity": 10,
            "is_never_out_of_stock": true
          }
     }'
```

### Create stock of a concrete product. `sku`, `stock_type`, and `quantity` are mandatory fields.

[](#create-stock-of-a-concrete-product-sku-stock_type-and-quantity-are-mandatory-fields)

##### POST /api/rest/stock-products

[](#post-apireststock-products)

##### Example

[](#example-1)

```
curl -X POST "http://zed.yourdomain.com/api/rest/stock-products" \
     -H 'Content-Type: application/json' \
     -d $'{
          "data": {
            "sku": "SKU",
            "stock_type": "EU",
            "quantity": 10,
            "is_never_out_of_stock": true
          }
     }'
```

### Find stock concrete product by `sku` and `stock_type` (name)

[](#find-stock-concrete-product-by-sku-and-stock_type-name)

##### GET /api/rest/stock-products?filter={"condition":"AND","rules":\[{"id":"name","field":"name","type":"string","input":"text","operator":"equal","value":"EU"},{"id":"sku","field":"sku","type":"string","input":"text","operator":"equal","value":"SKU"}\]}

[](#get-apireststock-productsfilterconditionandrulesidnamefieldnametypestringinputtextoperatorequalvalueeuidskufieldskutypestringinputtextoperatorequalvaluesku)

##### Example

[](#example-2)

```
curl -X GET "http://zed.yourdomain.com/api/rest/stock-products?filter=$'{"condition":"AND","rules":[{"id":"name","field":"name","type":"string","input":"text","operator":"equal","value":"EU"},{"id":"sku","field":"sku","type":"string","input":"text","operator":"equal","value":"SKU"}]}'" \
     -H 'Content-Type: application/json'
```

### Get stock product by idStockProduct

[](#get-stock-product-by-idstockproduct)

##### GET /api/rest/stock-products/{id\_stock\_product}

[](#get-apireststock-productsid_stock_product)

##### Example

[](#example-3)

```
curl -X GET "http://zed.yourdomain.com/api/rest/stock-products/{id_stock_product}" \
     -H 'Content-Type: application/json'
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~46 days

Total

2

Last Release

1150d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f5bd8b1a3358200680cbaf5d0dce827afb0569cc997877854354cc70bcf5a61?d=identicon)[julianzimmermann](/maintainers/julianzimmermann)

---

Top Contributors

[![julianhyatt](https://avatars.githubusercontent.com/u/54834203?v=4)](https://github.com/julianhyatt "julianhyatt (3 commits)")[![SpiderDan98](https://avatars.githubusercontent.com/u/40319023?v=4)](https://github.com/SpiderDan98 "SpiderDan98 (2 commits)")[![daniel-rose](https://avatars.githubusercontent.com/u/489806?v=4)](https://github.com/daniel-rose "daniel-rose (1 commits)")

### Embed Badge

![Health badge](/badges/fond-of-oryx-stock-product-api/health.svg)

```
[![Health](https://phpackages.com/badges/fond-of-oryx-stock-product-api/health.svg)](https://phpackages.com/packages/fond-of-oryx-stock-product-api)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
