fond-of-spryker / product-api
Extends the Base Spryker Product Api Modulegit initgit init
Installs: 23 527
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/fond-of-spryker/product-api
Requires
- php: >=7.1
 - spryker/product-api: ^0.1
 
Requires (Dev)
- codeception/codeception: ^2.3
 - mikey179/vfsstream: ^1.6
 - phpro/grumphp: ^0.14
 - sebastian/phpcpd: ^4.0
 - spryker/code-sniffer: ^0.11
 - spryker/development: ^3.6
 
This package is auto-updated.
Last update: 2025-10-07 16:27:56 UTC
README
ProductApi extends the Base Spryker Product Api Module:
- the update and get calls are using the SKU of a product instead of the Abstract Product ID
 - touch Abstract Product on create
 
Installation
composer require fond-of-spryker/product-api
use rewritten "ProductApiResourcePlugin" class in Pyz ApiDenpendencyProvider
use FondOfSpryker\Zed\ProductApi\Communication\Plugin\Api\ProductApiResourcePlugin;
instead of "use Spryker\Zed\Api\ApiDependencyProvider as SprykerApiDependencyProvider;"
API
GET /api/rest/products/{sku}
curl -X GET "http://zed.yourdomain.com/api/rest/products/{sku}" \
     -H 'Content-Type: application/json' \
     
POST /api/rest/products/
curl -X POST "http://zed.yourdomain.com/api/rest/products/" \
     -H 'Content-Type: application/json' \
     -d $'{
           "data": {
             "sku": "sku",
             "id_tax_set": 1,
             "name": "Name",
             "fk_locale": "en_US",
             "attributes" : {
                 "attribute": "value"
             },
             "localized_attributes": [
              {
               "name": "Name",
               "description": "Description",
                "meta_description": "Meta Description",
                "attributes": {
                 
                },
                "locale": {
                     "id_locale": 46,
                     "locale_name": "en_US",
                     "is_active": true
                 }
              }
             ]       
           }
          }'
     
PATCH /api/rest/products/{sku}
curl -X PATCH "http://zed.yourdomain.com/api/rest/products/{sku}" \
     -H 'Content-Type: application/json' \
     -d $'{
          "data": {
            "sku": "sku",
            "id_tax_set": 1,
            "name": "Name",
            "fk_locale": "en_US",
            "attributes" : {
                "attribute": "value"
            },
            "localized_attributes": [
             {
              "name": "Name",
              "description": "Description",
               "meta_description": "Meta Description",
               "attributes": {
                
               },
               "locale": {
                    "id_locale": 46,
                    "locale_name": "en_US",
                    "is_active": true
                }
             }
            ]       
          }
     }'