Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Bagisto Api

Bagisto Api Laravel Package

bagisto/bagisto-api

Comprehensive REST and GraphQL APIs for Bagisto e-commerce, exposing shop and admin endpoints via API Platform. Requires PHP 8.3+ and Bagisto 2.4.7. Quick Composer install plus an artisan command gets API docs, GraphiQL playgrounds, and storefront rate limiting running fast.

View on GitHub
Deep Wiki
Context7

Bagisto API Platform adds a comprehensive REST and GraphQL API layer to your Bagisto store, powered by API Platform for Laravel. It exposes separate Shop and Admin endpoints, each with interactive REST documentation and a GraphiQL playground, so integrations can be built and tested quickly.

  • Dual APIs — REST and GraphQL for both storefront and admin
  • Ready-made docs — Swagger UI and GraphiQL playgrounds out of the box
  • One-command install — php artisan bagisto-api-platform:install
  • Built-in security — configurable rate limiting and playground key injection
  • Verified setup — tested against Bagisto v2.4.7 on PHP 8.3+
Frequently asked questions about Bagisto Api
How do I install bagisto/bagisto-api in a Laravel Bagisto app?
Run composer require bagisto/bagisto-api, then php artisan bagisto-api-platform:install. This sets up the API layer and gives you the /api landing page, REST documentation, and GraphQL Playground endpoints. Use the manual installation path only if you need custom API Platform configuration.
What PHP, Bagisto, and Laravel versions are required for bagisto/bagisto-api?
The README lists PHP 8.3+, Composer 2, MySQL 8.0+ or PostgreSQL 14+, and Bagisto v2.4.7 as the CI-tested version; the technical evaluation describes design support for Bagisto v2.3.8+. It depends on api-platform/laravel and api-platform/graphql at ~4.3.8. The evaluation notes Laravel 10+ compatibility, but confirm the exact Laravel version against your Bagisto core before upgrading.
Does bagisto/bagisto-api provide both REST and GraphQL APIs?
Yes. It is an API Platform-based layer for Bagisto with separate shop and admin REST and GraphQL endpoints. REST endpoints are Swagger/OpenAPI documented, while GraphQL is schema-first and Playground-ready.
Where can I find the REST API docs and GraphQL Playground after installation?
REST documentation is available at /api/shop/docs and /api/admin/docs. GraphQL Playground is available at /api/graphiql for shop and /api/admin/graphiql for admin. The API landing page is at /api.
How does authentication differ between shop and admin APIs in bagisto-api?
Shop APIs use key-based storefront authentication with rate limiting and cache optimization. Admin APIs use token-based authentication with RBAC, IP whitelisting, and audit trails. Admin token generation and revocation may be manual in the UI, but the evaluation suggests automating it through an API such as POST /api/admin/integrations.
Can bagisto/bagisto-api be used for headless or composable commerce?
Yes. The package exposes shop and admin REST plus GraphQL endpoints for Bagisto, making it suitable for headless, omnichannel, and composable commerce frontends. Use REST for simpler CRUD flows and GraphQL for complex catalog or order queries, while accounting for frontend caching of nested GraphQL responses.
How do I configure rate limits and caching for storefront APIs?
Set environment values such as STOREFRONT_DEFAULT_RATE_LIMIT, STOREFRONT_CACHE_TTL, STOREFRONT_KEY_PREFIX, and the playground key settings in your .env file. The evaluation references a default storefront rate limit of 100 and a cache TTL of 60 seconds. Use Redis or Memcached for caching and tune limits for high-throughput integrations.
Does bagisto-api support Bagisto features like product variants, bundles, bookings, and multi-channel?
The evaluation states that Bagisto-specific features such as product variants, bundles, bookings, and multi-channel support are natively exposed. Admin CSV exports for datagrids also enable bulk operations without UI dependency. Verify the exact endpoints and schema for your Bagisto version in the shop and admin documentation.
Is bagisto/bagisto-api production-ready and what performance risks should I test?
It can be production-ready for Bagisto API workloads, but benchmark deeply nested GraphQL queries and admin audit log volume before rollout. Storefront rate limits and caching are configurable through STOREFRONT_DEFAULT_RATE_LIMIT and STOREFRONT_CACHE_TTL, while admin APIs lack built-in caching headers. Use Redis or Memcached, prune audits with bagisto-api:prune-audits, and test on a staging clone with a realistic dataset.
What alternatives should I consider to bagisto/bagisto-api?
If you need Bagisto-specific commerce features, bagisto/bagisto-api is the direct fit. If you are not tied to Bagisto, consider spatie/laravel-api-resources or building directly on API Platform for Laravel. Evaluate REST versus GraphQL needs and admin compliance requirements before choosing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels