PHPackages                             spryker/api-platform - 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. spryker/api-platform

ActiveLibrary[API Development](/categories/api)

spryker/api-platform
====================

ApiPlatform module

0.6.0(2mo ago)07.3k↓41.5%2proprietaryPHPPHP &gt;=8.3CI passing

Since Dec 4Pushed 2mo agoCompare

[ Source](https://github.com/spryker/api-platform)[ Packagist](https://packagist.org/packages/spryker/api-platform)[ RSS](/packages/spryker-api-platform/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (71)Versions (11)Used By (2)

ApiPlatform Module
==================

[](#apiplatform-module)

[![Latest Stable Version](https://camo.githubusercontent.com/24c0c9beea26b5d2cedaedd859c2f17e1be5ebcce56fcf2ce64f214669297fba/68747470733a2f2f706f7365722e707567782e6f72672f737072796b65722f6170692d706c6174666f726d2f762f737461626c652e737667)](https://packagist.org/packages/spryker/api-platform)[![Minimum PHP Version](https://camo.githubusercontent.com/9c50dc780fa576f5c39b4feff00c05345c1471be0808881a09e750b91220dc54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e332d3838393242462e737667)](https://php.net/)

Spryker API Platform Module
---------------------------

[](#spryker-api-platform-module)

Use this module to integrate the [API Platform](https://api-platform.com/docs/symfony/) into a Spryker project. A schema-based code generator for API Platform resources in Spryker applications. Define your API resources using YAML schemas and automatically generate PHP classes with full API Platform attribute support.

### Overview

[](#overview)

This module provides a developer-friendly way to define API Platform resources through declarative schema files, similar to Spryker's Transfer object pattern. Resources can be defined across core, feature, and project layers with automatic merging and validation.

### Features

[](#features)

- 📝 **Schema-based Definition**: Define resources using YAML
- 🔄 **Multi-layer Support**: Core, Feature, and Project layer schemas
- 🎯 **ApiType Isolation**: Separate configurations for Storefront, Backend, etc.
- ✅ **Comprehensive Validation**: Post-merge validation with helpful errors
- 🚀 **Efficient Generation**: Generator-based file discovery for memory efficiency
- 💾 **Smart Caching**: Automatic cache invalidation based on file changes
- 🔗 **Relationship System**: Include related resources via `?include=` parameter with JSON:API compliance

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

[](#installation)

```
composer require spryker/api-platform

```

### Configuration

[](#configuration)

Default configuration (can be overridden in the bundle config: '%kernel.project\_dir%/config/Symfony/{APPLICATION}/packages/spryker\_api\_platform.php'):

```
spryker_api_platform:
  source_directories:
    - src/Spryker
    - src/Pyz
  cache_dir: '%kernel.cache_dir%/api-generator'
  generated_dir: '%kernel.project_dir%/src/Generated/Api'
  debug: '%kernel.debug%'
```

Usage
-----

[](#usage)

```
# Generate all ApiTypes
docker/sdk glue api:generate

# Generate specific ApiType
docker/sdk glue api:generate Storefront

# Debug a resource
docker/sdk glue api:debug Customer --api-type=Storefront
```

Relationships
-------------

[](#relationships)

Enable resources to include related resources via the `?include=` query parameter with JSON:API compliance.

### Quick Example

[](#quick-example)

```
# Define relationship in parent resource
includes:
  - relationshipName: addresses
    targetResource: CustomersAddresses
    uriVariableMappings:
      customerReference: customerReference

# Define reverse relationship in child resource
includableIn:
  - resource: Customers
    relationshipName: addresses
```

**Request:**

```
GET /customers/customer--35?include=addresses

```

**Key Features:**

- ✅ Declarative YAML configuration
- ✅ Zero provider changes needed
- ✅ Automatic validation
- ✅ Format agnostic (JSON:API, JSON-LD, XML)
- ✅ Performance optimized (compiled configuration)

For comprehensive documentation, see [Relationships Guide](resources/docs/Relationships.md).

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~10 days

Total

10

Last Release

71d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10738957?v=4)[Spryker Bot](/maintainers/spryker-bot)[@spryker-bot](https://github.com/spryker-bot)

---

Top Contributors

[![stereomon](https://avatars.githubusercontent.com/u/1382877?v=4)](https://github.com/stereomon "stereomon (8 commits)")[![olhalivitchuk](https://avatars.githubusercontent.com/u/77281282?v=4)](https://github.com/olhalivitchuk "olhalivitchuk (6 commits)")[![gechetspr](https://avatars.githubusercontent.com/u/42143273?v=4)](https://github.com/gechetspr "gechetspr (2 commits)")[![vol4onok](https://avatars.githubusercontent.com/u/5063777?v=4)](https://github.com/vol4onok "vol4onok (2 commits)")

---

Tags

apischemacode-generationapi-platformspryker

### Embed Badge

![Health badge](/badges/spryker-api-platform/health.svg)

```
[![Health](https://phpackages.com/badges/spryker-api-platform/health.svg)](https://phpackages.com/packages/spryker-api-platform)
```

###  Alternatives

[api-platform/symfony

Symfony API Platform integration

323.2M67](/packages/api-platform-symfony)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[api-platform/hydra

API Hydra support

223.3M8](/packages/api-platform-hydra)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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