Comprehensive REST and GraphQL APIs for seamless e-commerce integration and extensibility.
api-platform/* packages (laravel v4.1.25, graphql v4.2.3, core components v4.3.1) installed automatically via composer requireThe fastest way to get started:
composer require bagisto/bagisto-api:dev-main
php artisan bagisto-api-platform:install
التحديث فقط
composer update bagisto/bagisto-api
Your APIs are now ready! Access them at:
https://your-domain.com/apihttps://your-domain.com/api/shop/docshttps://your-domain.com/api/admin/docshttps://your-domain.com/api/graphiqlhttps://your-domain.com/api/admin/graphiqlUse this method if you need more control over the setup.
packages/Webkul/BagistoApi/Edit bootstrap/providers.php:
<?php
return [
// ...existing providers...
Webkul\BagistoApi\Providers\BagistoApiServiceProvider::class,
// ...rest of providers...
];
Edit composer.json and update the autoload section:
{
"autoload": {
"psr-4": {
"Webkul\\BagistoApi\\": "packages/Webkul/BagistoApi/src"
}
}
}
# Install required packages (pin the API Platform components to a consistent set)
composer require \
api-platform/laravel:v4.1.25 \
api-platform/graphql:v4.2.3 \
api-platform/metadata:v4.3.1 \
api-platform/serializer:v4.3.1 \
api-platform/state:v4.3.1 \
api-platform/jsonld:v4.3.1 \
api-platform/hydra:v4.3.1 \
api-platform/openapi:v4.3.1 \
api-platform/json-schema:v4.3.1 \
api-platform/json-api:v4.3.1 \
api-platform/documentation:v4.3.1
php artisan bagisto-api-platform:install
STOREFRONT_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=true
Once verified, access the APIs at:
Admin endpoints (/api/admin/* and /api/admin/graphql) require an integration-token Bearer header:
Authorization: Bearer id|generated-token
To generate a token:
All, Custom, or Same as Web) / optional IP allowlist / rate limits / expiry, and save as a draft.Each token is scoped to a single admin user and inherits that admin's role permissions — so tokens can never do more than their owner could in the admin UI. To issue tokens to multiple admins, create one token per admin (each admin can hold only one active token at a time).
Tokens can be revoked at any time from the same page or via the signed link in the lifecycle notification email sent to the token owner.
CHANGELOG.mdFor issues and questions, please visit:
The Bagisto API Platform is open-source software licensed under the MIT license.
How can I help you explore Laravel packages today?