Skip to content

Generated Reference

Generated Reference

Shopware generates schemas for both HTTP APIs that can be interpreted by API client libraries and documentation tools, such as Stoplight.io.

These schemas are generated using PHP annotations based on the swagger-php library. When building API extensions, you can also leverage these annotations to let Shopware generate standardized endpoint documentation for your custom endpoints on the fly.

WARNING

Due to security restrictions, your APP_ENV environment variable must be set to dev to access the specifications described below.

Stoplight

The easiest way to access the generated schema is to use Stoplight. Stoplight is a collaborative platform that equips your team with tooling across the API lifecycle to help them build high-quality APIs efficiently. Shopware already ships with these user interfaces. They are accessible at the following endpoint relative to each base path:

text
/(api|store-api)/_info/stoplightio.html

INFO

The above path is relative and contains api (Admin API) and store-api separated by a pipe. Please choose the appropriate option.

You will find a list of all generic endpoints (entity endpoints like product, category, etc.) for the Admin API here api/_info/stoplightio.html?type=jsonapi#/ or access it via the top navigation bar.

OpenAPI schema

If you do not need the UI and only want to fetch the schema definition, use the following endpoint:

text
/(api|store-api)/_info/openapi3.json

Entity schema

If you want schema definitions for all available entities rather than an endpoint reference, use one of the following schema endpoints:

text
/(api|store-api)/_info/open-api-schema.json
Was this page helpful?
UnsatisfiedSatisfied
Be the first to vote!
0.0 / 5  (0 votes)