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

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

2.0.0 2023-01-24 12:59 UTC

This package is auto-updated.

Last update: 2023-01-24 13:56:58 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]",
          }
     }'