Comprehensive REST and GraphQL APIs for seamless e-commerce integration and extensibility.
The fastest way to get started:
composer require bagisto/bagisto-api
php artisan bagisto-api-platform:installYour APIs are now ready! Access them at:
- REST API Docs:
https://your-domain.com/api/docs - GraphQL Playground:
https://your-domain.com/graphql
Use this method if you need more control over the setup.
- Download the BagistoApi package from GitHub
- Extract it to:
packages/Webkul/BagistApi/
Edit bootstrap/providers.php:
<?php
return [
// ...existing providers...
Webkul\BagistApi\Providers\BagistApiServiceProvider::class,
// ...rest of providers...
];Edit composer.json and update the autoload section:
{
"autoload": {
"psr-4": {
"Webkul\\BagistApi\\": "packages/Webkul/BagistApi/src",
}
}
}# Install required packages
composer require api-platform/laravel:^4.1
composer require api-platform/graphql:^4.2php artisan bagisto-api-platform:installSTOREFRONT_DEFAULT_RATE_LIMIT=100
STOREFRONT_CACHE_TTL=60
STOREFRONT_KEY_PREFIX=storefront_key_
STOREFRONT_PLAYGROUND_KEY=pk_storefront_xxxxxxxxxxxxxxxxxxxxxxxxxx
API_PLAYGROUND_AUTO_INJECT_STOREFRONT_KEY=trueOnce verified, access the APIs at:
- REST API (Shop): https://your-domain.com/api/shop/
- REST API (Admin): https://your-domain.com/api/admin/
- GraphQL Endpoint: https://your-domain.com/graphql`
- GraphQL Playground: https://your-domain.com/graphqli
- Bagisto API: Demo Page
- API Documentation: Bagisto API Docs
- GraphQL Playground: Interactive Playground
For issues and questions, please visit:
The Bagisto API Platform is open-source software licensed under the MIT license.