Recipe: Build an Admin Dashboard
An admin orders dashboard on the Admin API. Every request carries a pre-issued admin Integration token:
Authorization: Bearer <id>|<token>1. List orders
List Orders — GET /api/admin/orders. Returns the { data, meta } envelope:
{
"data": [ /* order rows */ ],
"meta": { "currentPage": 1, "perPage": 10, "lastPage": 14, "total": 137 }
}Drive the table with ?page= and ?per_page= (default 10, cap 50) plus the listing filters (status, channel, customer, email, grand-total range, date range). Read the page-count headers (X-Total-Count, X-Page, X-Per-Page, X-Total-Pages) for pagination UI.
2. Order detail
Order Detail — GET /api/admin/orders/{id}. Returns the full order: customer, addresses, type-aware items, invoices, shipments, refunds, payment, and totals — everything the order-view screen needs, no follow-up calls.
3. Run an action
From the order view, call the action endpoints (each has its own eligibility rules — open the page):
- Cancel Order —
POST /api/admin/orders/{id}/cancel - Create Invoice —
POST /api/admin/orders/{id}/invoices - Create Shipment —
POST /api/admin/orders/{id}/shipments - Create Refund —
POST /api/admin/orders/{id}/refunds - Add Order Comment —
POST /api/admin/orders/{id}/comments
4. Other admin menus
The same list → detail → action pattern (and the { data, meta } envelope) applies across every admin menu — Catalog, Customers, Marketing, CMS, Settings. Browse the Admin API section or /llms.txt for the full set.
GraphQL variant
The same data is available at POST /api/admin/graphql (admin GraphQL is a separate endpoint and takes the admin token). Order actions are mutations — select the result fields they return (orderId, incrementId, status, success, message), not id.
Status codes to handle
200/201 success · 401 unauthenticated · 403 forbidden (permission) · 400 bad input · 404 not found · 422 validation / ineligible action.

