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.
Add social login — sign in or sign up with a Google, Facebook or LinkedIn token the app or web already holds (no redirect), returning a Bearer token. POST /api/shop/customers/social-login and the createSocialLogin mutation.
Add a GraphQL operation map to the export (graphql-operations-shop.json / -admin.json) mapping each root field to its resource tag, so tooling can group GraphQL the way REST is grouped.
Add a re-seed tool that rebuilds the collections from the exported schemas.
Add View permissions for Integration and API Change History, so read access to those screens can be granted or withheld separately from creating, editing and deleting.
bagisto-api-platform:export-schema now writes to schema/generated/ instead of schema/, leaving the hand-maintained collections and environments untouched; --path is unchanged.POST /api/admin/marketing/search-terms (and createAdminMarketingSearchTerm) to create a search term.bagisto-api-platform:export-schema, which writes the REST (OpenAPI JSON) and GraphQL (SDL) schemas to files for Postman and code generators. Defaults to the package's schema/ folder; override with --path.Admin: Customer Order creation in the Swagger docs.Unauthenticated; a visitor can subscribe with the storefront key alone, as on the storefront.POST /api/shop/customer-profile-deletes/{id}) doing nothing over REST, and drop the password field the docs wrongly marked required.bagistoapi::app.graphql.product.not-found instead of "Product not found", on both transports.adminProfile returning roleId and roleName as null over GraphQL.sourceId as null over GraphQL.adminCatalogProduct's superAttributes { options } returning null, and its relatedProducts / upSells / crossSells returning storefront-shaped nodes.createAdminCatalogProduct / updateAdminCatalogProduct returning an unusable id and connections listing unrelated products.GET /api/admin/invoices/{id}/print) returning a 500 (View [sales.invoices.pdf] not found) on Bagisto 2.4.PUT /api/admin/settings/data-transfer/imports/{id} as multipart/form-data failing with "The type field is required"; multipart fields are now read on PUT/PATCH as on POST, and the file stays optional.POST /api/admin/eu-withdrawals/{id}/resend-confirmation returning 422 when a body was sent; it is now a true empty-body action.DELETE /api/admin/rma/custom-fields/{id} returning 204 with no confirmation; it now returns 200 with a message and the deleted record.channelId and customerGroupId null and blocked storefront sign-in.id path parameter that the URL does not contain.400 with "The request body contains invalid JSON."422.first: 0; they now return an empty connection.PUT /api/admin/carts/{id}/items returning 200 without applying a rejected quantity; it now returns 422 with the reason.redirect and redirectUrl to the place-order response so clients can tell when the shopper must be sent to a payment page before the order exists.minPrice and maxPrice to the storefront category response so REST clients can bound a price-range filter, matching what GraphQL already exposed.xls and xlsx to every admin export endpoint (?format=), matching the formats the admin panel offers; exported values are now guarded against spreadsheet formula injection.CACHE_STORE (falling back to file), so no separate cache service or extra configuration is needed.php.ini and the staged-upload lifetime from the session lifetime, instead of package settings.items { edges }) failing with Field "items" of type "Iterable" must not have a sub selection on some production PHP-FPM servers.message; the confirmation message is now returned only on delete.paymentGatewayUrl coming back empty for redirect payment methods (Stripe, Razorpay, PayPal Standard, PhonePe), leaving clients with nowhere to send the shopper.cartToken in cart and checkout responses returning an id instead of the cart's guest token; it is now the guest token, or null for a signed-in customer.method on list payment methods and id on list order comments.config:cache or optimize; playground settings are now read from configuration, so they survive a cached config.API_PLAYGROUND_AUTO_INJECT_STOREFRONT_KEY, so the key was never pre-filled there even when the setting was enabled.API_URL, which produced a doubled host on stores that set it.4.3.x (api-platform/laravel and api-platform/graphql at ~4.3.8), which also resolves the api-platform/json-api security advisory.api-platform/laravel and api-platform/graphql — the other api-platform/* components are pulled in automatically, so the redundant per-component composer require list has been removed./api/shop/compare_items), so no client needs to update a URL.deleteWishlist, deleteCompareItem, deleteGdprRequest) returning only id instead of the deleted record's fields.createCheckoutOrder) returning an empty payload.customerReturn) returning a blank record instead of an error.filterableAttributes missing from the storefront category GraphQL type.POST /api/shop/reviews) failing with a server error.POST /api/shop/customizable-option-files).POST /api/admin/catalog/products/{id}/videos, REST multipart) and delete one (DELETE /api/admin/catalog/products/{id}/videos/{id} / deleteAdminCatalogProductVideo).filterableAttributes price range: maxPrice now reflects the authenticated customer's customer-group pricing, and minPrice now returns the actual lowest product price.POST /api/admin/catalog/products/{id}/downloadable-links/upload and .../downloadable-samples/upload.GET /api/admin/catalog/products/{id}/downloadable/{attributeId}/download.campaignId / cartRuleId / sitemapId and the generated sitemap file paths and timestamp; these fields now resolve. REST was unaffected.customerId is now required, so an address can no longer be changed or removed without identifying its customer.POST /api/admin/transactions + createAdminTransaction): record a full or partial payment against an invoice; the invoice is marked paid and the order advances once payments cover its total.null over GraphQL (REST was unaffected).Major release. Contains breaking changes to the Admin API (some response shapes changed). The Shop (storefront) API is fully backward compatible — storefront integrations need no changes.
adminCustomers / adminCustomer (GET /api/admin/customers) to return the customer group as a nested object instead of the flat customerGroupId / customerGroupName.adminCustomerReviews / adminCustomerReview (GET /api/admin/customers/reviews) to return product, customer, and images as nested objects instead of flat scalars.adminSettingsChannels / adminSettingsChannel (GET /api/admin/settings/channels) to return locales, currencies, and inventory sources as object collections instead of int arrays.adminInvoices / adminInvoice (GET /api/admin/invoices) to return the order as a nested object instead of the flat orderId.adminSettingsTaxCategories / adminSettingsTaxCategory and adminSettingsThemes / adminSettingsTheme to return nested data as field-selectable objects instead of an opaque JSON blob.adminReviews / adminReview (GET /api/admin/reviews); use adminCustomerReviews / adminCustomerReview (GET /api/admin/customers/reviews) instead.bagisto-api-platform:optimize — single post-deploy command that caches config, events, and routes and warms the API Platform metadata + GraphQL schema. Cuts typical response times ~5× (GraphQL list ~1.5s → ~0.3s). Fails loudly if route caching fails and warns when APP_DEBUG is on; pair with APP_DEBUG=false. Run it after every deploy or endpoint change.taxRates, translations) to be field-selectable instead of an opaque JSON blob.id — now returns a snapshot of the deleted record plus a message.isGift), Marketing Campaigns / Search Terms / Subscribers (nested channel / customerGroup / marketingTemplate), Customers (group.isUserDefined), Invoices (nested order).adminMarketingCartRule partial update wrongly demanding couponCode — it now preserves the existing coupon.skipped ids.{ data, meta } envelope — now a plain list of ids.adminCustomer REST detail returning 500 when a date of birth is set.sort / order to the Wishlist and Customer Address listings.Integration menu
bagisto-api:prune-audits command, and a retention config. Sensitive fields are redacted; the feature can be switched off.Sales menu
?format=csv, honours listing filters; REST only).Catalog menu
CMS menu
previewUrl.Settings menu
delete-self, password-confirmed).Reporting menu
Installation
composer require bagisto/bagisto-api failure on a fresh install — the API Platform dependencies are now pinned to a consistent, tested set so installation completes cleanly.Configuration menu
Settings menu
null; REST unchanged).Reporting menu
dateRange now resolves over GraphQL on every reporting query.Sales menu
id was exposed).cartId, orderId, …) instead of the non-selectable id.last_three_months / last_six_months)._from/_to range).adminOrders) now accepts its filter arguments (previously rejected as unknown).422.422 when one is missing.vatId.state: removed the non-existent refunded value from the filter, OpenAPI enum, and docs.Catalog menu
formattedPrice / baseImageUrl / isSaleable (were null).isComparable, enableWysiwyg, and regex (could be set but not read back).CMS menu
pageTitle, urlKey, htmlContent, metaTitle, previewUrl, timestamps) now resolve over GraphQL (were null).GraphQL node ids
ids returned the export path instead of the per-record IRI once a CSV export endpoint was added; corrected.Sales menu
Admin Sales: Orders tag (the former Admin Orders / Admin Order Actions / Admin Carts tags were retired).Catalog menu
adminProducts picker is repositioned as the Create-Order "Add Product" search.Customer REST API (parity with existing GraphQL)
Admin REST + GraphQL API (new surface)
all, custom, same_as_web), configurable expiry, regeneration, and revocation. Lifecycle email notifications on generate / regenerate / revoke, including a signed login-free revoke link sent to the token owner.Admin API endpoints by menu
_warnings array surfacing dropped sub-resource fields); delete; copy; mass-delete; mass-update-status. Sub-resources: images (multipart upload, reorder, delete), inventories (list plus bulk update with meta.totalQty), and customer-group prices (full CRUD with composite uniqueness).Infrastructure
{ data, meta } envelope on every admin paginated collection.X-Total-Count, X-Page, X-Per-Page, X-Total-Pages on every paginated REST endpoint (CORS-exposed so JavaScript clients can read them).application/json request bodies on admin endpoints no longer return 500 — accepted as {} automatically.X-STOREFRONT-KEY is no longer required on admin endpoints. Admin auth is Bearer-only; the storefront key remains required on shop endpoints.success and message fields, matching the other checkout endpoints.1.0.4 in Swagger / API Platform configuration.toggleWishlist mutation no longer fails with "Internal server error" when a downstream listener misbehaves — the toggle completes successfully and listener failures are silently swallowed.removeCartItem, applyCoupon, and removeCoupon GraphQL responses now carry the correct success and message fields. Apply-coupon verifies the code actually applied before reporting success.readCart now returns the applied couponCode (previously always null after applying a coupon).currentPassword for password changes (previously rejected as missing).logoPath and logoUrl (null when unset) so clients can rely on field presence.createNewsletter GraphQL mutation now correctly accepts customerEmail (previously rejected as missing).top-selling-products and reporting top-selling-products-by-revenue / by-quantity no longer return "Internal server error".locales / currencies / inventory_sources when those fields are omitted from the request body.PageProvider for CMS page API resource.InstallApiPlatformCommand.cache(...) → correct artisan command).bagisto-api-platform:install artisan command (installation command for the platform).bootstrap/providers.php.post-autoload-dump composer hook.InstallApiPlatformCommand.bagisto/bagisto-api./api/docs and GraphQL playground at /graphiql.GET /api/admin/menu + getAdminMenu) — permission-filtered sidebar tree with each entry's matching API endpoint.GET /api/admin/permissions + getAdminPermissions) — the token's effective permission set.bagisto-api-platform:optimize after deploy and set APP_DEBUG=false.bagisto-api-platform:optimize now also caches events, fails loudly if route caching fails, and warns when APP_DEBUG is on.sort/order (e.g. ?sort=created_at&order=desc).Customer account APIs
CustomerOrderProvider).CustomerOrderShipmentProvider).CustomerInvoiceProvider) and invoice PDF download (InvoicePdfController).CustomerReviewProvider).CustomerDownloadableProductProvider) and purchased-downloads download endpoint (DownloadablePurchasedController).CancelOrderProcessor + CancelOrderInput DTO).ReorderProcessor + ReorderInput DTO).CustomerProfileOutput) and profile helper.Catalog & storefront APIs
PageProvider, GraphQL PageByUrlKeyResolver tagged as collection query resolver).ChannelProvider).BookingSlotProvider) and mutations for Booking / Event Booking product types.DownloadSampleController).ContactUsProcessor + ContactUsInput/ContactUsOutput DTOs).Cart, wishlist & compare
CartTokenProcessor extended).CompareItemProvider/CompareItemProcessor) + delete-all (DeleteAllCompareItemsProcessor).WishlistProvider/WishlistProcessor) + delete-all (DeleteAllWishlistsProcessor).MoveWishlistToCartProcessor + input/output DTOs).Infrastructure
php artisan bagisto-api-platform:cache:clear (ClearApiPlatformCacheCommand).CursorAwareCollectionProvider for cursor-based pagination.FixedSerializerContextBuilder to patch API Platform serializer context handling.SnakeCaseLinksHandler for consistent snake_case link rendering.en/app.php + 20 locale files: ar, bn, ca, de, es, fa, fr, he, hi_IN, id, it, ja, nl, pl, pt_BR, ru, sin, tr, uk, zh_CN) including Event Booking product type strings.formattedPrice (ShippingRateOutput updated).InstallApiPlatformCommand now publishes vendor config.api-platform/laravel and api-platform/graphql pinned to specific versions in composer.json.info.version bumped to 1.0.3 in config/api-platform.php, config/api-platform-vendor.php, and the SwaggerUIController error fallback.attributeValues key resolved correctly in product query data.formattedPrice field for downloadable and Event Booking product types.api-platform-vendor.php newline hygiene.graphqli → graphiql typo in the GraphQL Playground link.CHANGELOG.md (this file).How can I help you explore Laravel packages today?