fond-of-oryx/company-product-list-api

The CompanyProductListAPI module provides a REST API for company product list relation CRUD.

3.0.0 2023-02-01 10:40 UTC

This package is auto-updated.

Last update: 2024-10-27 12:58:11 UTC


README

license

The CompanyProductListApi module provides a REST API for company product list create/updates.

Installation

composer require fond-of-oryx/company-product-list-api

Register Plugins in ApiDependencyProvider

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

POST /api/rest/company-product-lists
Example
curl -X POST "http://zed.yourdomain.com/api/rest/company-product-lists/" \
     -H 'Content-Type: application/json' \
     -d $'{
          "data": {
            "fk_company": "1",
            "product_list_ids": "[1]",
          }
     }'