bagisto/bagisto-api

Bagisto API Platform package with GraphQL and REST API support

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:laravel-package

pkg:composer/bagisto/bagisto-api

v1.0.0 2026-01-09 19:27 UTC

This package is auto-updated.

Last update: 2026-01-12 07:21:58 UTC


README

Comprehensive REST and GraphQL APIs for seamless e-commerce integration and extensibility.

Installation

Method 1: Quick Start (Composer Installation – Recommended)

The fastest way to get started:

# 1. Install the Bagisto API package
composer require bagisto/bagisto-api

# 2. Run the installer
php artisan bagisto-api:install

# 3. Run database migrations
php artisan migrate

# 4. Clear and rebuild caches
php artisan optimize:clear
php artisan optimize

# 5. Create your first API key
php artisan bagisto-api:generate-key --name="Default Store"

Your APIs are now ready! Access them at:

  • REST API Docs: https://your-domain.com/api/docs
  • GraphQL Playground: https://your-domain.com/graphql

Method 2: Manual Installation

Use this method if you need more control over the setup.

Step 1: Download and Extract

  1. Download the BagistoApi package from GitHub
  2. Extract it to: packages/Webkul/BagistApi/

Step 2: Register Service Provider

Edit bootstrap/providers.php:

<?php

return [
    // ...existing providers...
    Webkul\BagistApi\Providers\BagistApiServiceProvider::class,
    // ...rest of providers...
];

Step 3: Update Autoloading

Edit composer.json and update the autoload section:

{
  "autoload": {
    "psr-4": {
      "Webkul\\BagistApi\\": "packages/Webkul/BagistApi/src",
    }
  }
}

Step 4: Install Dependencies

# Install required packages
composer require api-platform/laravel:^4.1
composer require api-platform/graphql:^4.2

Step 5: Run the installation

php artisan bagisto-api:install

Step 6: Run database migrations

php artisan migrate --path=packages/Webkul/BagistoApi/src/Database/Migrations

Step 7: Clear caches

php artisan optimize:clear
php artisan optimize

Step 8: Create your first API key

php artisan bagisto-api:generate-key --name="Default Store"

Step 9: Environment Setup (Update in the .env)

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

Access Points

Once verified, access the APIs at:

Documentation

Support

For issues and questions, please visit:

📝 License

The Bagisto API Platform is open-source software licensed under the MIT license.