skills/api-platform-development/bagisto-api-admin/SKILL.md
ALWAYS use when building an ADMIN app or UI on the Bagisto Admin API — a back-office dashboard, order/catalog/customer/marketing/CMS/settings management screen, an admin mobile app, the Create-Order flow, or ANY admin panel page on the API. Also when the user mentions admin orders, products, customers, cart rules, CMS, settings, reporting, or 'admin panel on the API'. Routes each menu to a reference page; asks the client's platform/stack first; treats the api-docs as the source of truth for exact shapes.
npx skillsauth add bagisto/agent-skills bagisto-api-adminInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Implement any admin/back-office interface on the Bagisto Admin API (/api/admin/* REST + POST /api/admin/graphql). The API mirrors the Bagisto admin panel menu-for-menu, so any admin screen can be rebuilt from it. This skill is a router: it gives the flow and points you at the per-menu reference page; the reference pages carry the endpoints, UI/UX, and checklists.
reference/connecting-to-the-api.md — admin auth (the Integration Bearer token), the {data,meta} listing envelope, the list→detail→action pattern, permissions, errors, and the verify-before-coding protocol.reference/graphql.md — if the client picked GraphQL: the admin endpoint, the result-field/id rule, camelCase inputs + filter args, cursor pagination.The api-docs are the source of truth for exact shapes — https://api-docs.bagisto.com (Admin API section) + its /llms.txt index. The reference pages name the endpoints and flow; open the linked docs page for the precise body/response before writing the call. Never invent a payload from memory.
Confirm, then tailor everything to the answers. Don't assume a stack.
Almost every admin screen is the same shape (detailed in connecting-to-the-api.md):
GET /api/admin/<resource> → { data, meta } envelope; drive tables with ?page= + ?per_page= + the screen's filters.GET /api/admin/<resource>/{id} → full record, relations embedded (no follow-up calls).POST/PUT/DELETE for create/update/delete + per-record actions (cancel order, create invoice, mass-update, …), each with its own eligibility rules.| Page | Build this |
|------|-----------|
| reference/flows/create-order.md | The admin Create-Order flow (place an order for a customer via a draft cart) |
| Page | Covers |
|------|--------|
| reference/menus/sales.md | Orders (list/detail + cancel/comment/invoice/shipment/refund), Invoices, Shipments, Refunds, Transactions, Bookings, CSV exports |
| reference/menus/catalog.md | Products (datagrid + CRUD + images/inventory/customer-group-prices + mass actions), Categories (+tree), Attributes (+options), Attribute Families |
| reference/menus/customers.md | Customers (CRUD + addresses/notes/impersonate), Groups, Reviews, GDPR |
| reference/menus/marketing.md | Cart Rules (+coupons), Catalog Rules, Email Templates, Events, Campaigns, Subscribers, Search Terms/Synonyms, URL Rewrites, Sitemaps |
| reference/menus/cms.md | CMS Pages |
| reference/menus/settings.md | Currencies, Channels, Locales, Exchange Rates, Inventory Sources, Tax Rates/Categories, Roles, Users, Themes, Data-Transfer Imports |
| reference/menus/configuration.md | Store configuration (schema / values / update) |
| reference/menus/dashboard-reporting.md | Dashboard stats + Reporting (sales/customers/products + export) |
Two read-only endpoints (REST + GraphQL) tell you what the current token can do — drive navigation and action-gating from them instead of hardcoding:
GET /api/admin/menu (getAdminMenu) — the admin sidebar as a permission-filtered tree; each node maps to its API endpoint (apiResource: { rest, graphql }, or null for group headers / panel-only screens).GET /api/admin/permissions (getAdminPermissions) — the token's effective { permissionType, permissions } (["*"] = full access).Details in reference/connecting-to-the-api.md.
Authorization: Bearer <id>|<token> (a pre-issued admin Integration token). There's no login endpoint — the token is made in the store's admin panel. The admin GraphQL endpoint is POST /api/admin/graphql (admin token only; not the shop endpoint, no storefront key).{ data, meta } (+ X-Total-* headers); page with ?page=/?per_page= (default 10, cap 50) + the per-screen filters.id; inputs are camelCase; custom filter args are documented per page. See reference/graphql.md.development
Shop theme development in Bagisto. Activates when creating custom storefront themes, modifying shop layouts, building theme packages, or working with Vite-powered assets for the customer-facing side of the application.
development
Shipping method development in Bagisto. Activates when creating shipping methods, integrating shipping carriers like FedEx, UPS, DHL, or any third-party shipping provider; or when the user mentions shipping, shipping method, shipping carrier, delivery, or needs to add a new shipping option to checkout.
development
Product type development in Bagisto. Activates when creating custom product types, defining product behaviors, or implementing specialized product logic. Use references: @config (product type configuration), @abstract (AbstractType methods), @build (complete subscription implementation).
development
Tests applications using the Pest 3 PHP framework in Bagisto. Activates when writing tests, creating unit or feature tests, adding assertions, testing Livewire components, architecture testing, debugging test failures, working with datasets or mocking; or when the user mentions test, spec, TDD, expects, assertion, coverage, or needs to verify functionality works.