API Platform in PrestaShop, a walk in the park?
summary
PrestaShop 9 ships a new admin API built on CQRS and integrated with API Platform (started on 2.7, upgraded toward 3.4/4), using client credentials OAuth2 for server-to-server auth and estimating 97 object models that will produce >500 endpoints. Implementation uses three bridges: a query provider, a command processor (runs commands then queries to return full entities) and a grid-backed paginator; heavy effort goes into serialization, custom mappings, and a delete/empty-body workaround. Module-first resources live in a native PS API resources module and OpenAPI generation works, though edge cases required custom CQS tooling and tweaks.
AI-written summary · about
chapters (12)
- 0:00Introduction and context
- 2:41Why integrate API Platform
- 5:58OAuth2 authentication setup
- 8:36Why choose API Platform
- 11:06Building the API architecture
- 13:36Serialization challenges
- 16:07Custom operations for DX
- 18:37Module integration strategy
- 21:10Handling delete operations
- 23:43Localized values and attributes
- 25:52OpenAPI documentation customization
- 27:16Challenges and conclusion
