Skip to content

Orders

The Orders menu is the heart of Sales: browse every order in the store and run every per-order action. From here you can view a single order in full, drive the admin Create Order flow (reorder an existing order, or place a prepared draft cart), run order lifecycle actions (cancel an order, add and list its comments), and generate the documents an order produces — invoices, shipments, and refunds. It mirrors the admin Sales → Orders screen.

Invoices, shipments, and refunds are generated from an order here, but each also has its own store-wide menu listing every such document across all orders: see the Invoices, Shipments, and Refunds overviews.

Creating an order for a customer (admin Create Order)

An admin can place an order on behalf of a customer — the same "Create Order" flow as the admin panel. It works through a draft cart: create a draft cart for the customer, add products, save the billing/shipping addresses, choose a shipping method and a payment method, then place the order. The draft cart is an internal building block of order creation, not a separate menu.

StepOperation
Start a draft cart for a customercreateAdminDraftCart mutation
Get the draft cartadminCart(id:) query
Add an item · update · removeaddItemAdminCart / updateItemsAdminCart / removeItemAdminCart mutations
Save addressessaveAddressAdminCart mutation
List / set shipping methodadminCartShippingRates query / setShippingMethodAdminCart mutation
List / set payment methodadminCartPaymentMethods query / setPaymentMethodAdminCart mutation
Place the ordercreateAdminPlaceOrder mutation

(There's also apply / remove coupon on the draft cart.) Reorder is a shortcut that seeds a fresh draft cart from an existing order's items.

Only saleable products can be added

Add Item accepts only products that are in stock and enabled. Adding an out-of-stock or disabled product returns a clear error and leaves the draft cart intact so you can add a different product — the cart is never lost. Booking products can't be added to an admin order (no admin Create-Order surface for them).

The order lifecycle — which action, in what order

Once an order exists (placed through Create Order above, Reorder, or the storefront), it moves through a lifecycle. Each action has prerequisites — this is the order they run in and what gates each one.

1. Invoice — record payment. Create Invoice records that payment was collected for some or all of the order's items. An order generally can't be refunded until it has been invoiced (you refund money that was billed). You can invoice part of an order now and the rest later. Not available for orders paid via paypal_standard (those are captured by the gateway, not the admin).

2. Ship — fulfil. Create Shipment marks items as dispatched and records the carrier and tracking number. It needs items still awaiting shipment and enough stock at the chosen inventory source. Partial shipments are allowed.

3. Refund — return money. Create Refund returns money for invoiced items and/or an arbitrary adjustment. Call Refund Preview first to see the computed totals without writing anything. Requires something left to refund (an un-refunded invoiced amount or a returnable quantity).

Cancel — abandon early. Cancel Order is only possible while there is still something to cancel (nothing has been fully invoiced or shipped). A closed or fraud-flagged order can't be cancelled.

Comments — any time. Add Comment / List Comments work at any stage; set customerNotified to email the customer the note.

Every action refuses with a clear error when its prerequisite isn't met — nothing left to invoice/ship/refund, the order is already closed or flagged, insufficient stock, or a payment method that can't be invoiced. A typical fulfilled order runs Create → Invoice → Ship (then an optional Refund); an abandoned one runs Create → Cancel.

Operations in this menu

ActionOperation
List OrdersadminOrders query
Order DetailadminOrderDetail query
ReordercreateAdminReorder mutation
Place OrdercreateAdminPlaceOrder mutation
Cancel OrdercreateAdminCancelOrder mutation
Add CommentcreateAdminOrderComment mutation
List CommentsadminOrderComments query
Create InvoicecreateAdminInvoice mutation
Create ShipmentcreateAdminShipment mutation
Create RefundcreateAdminRefund mutation
Refund PreviewpreviewAdminRefund mutation

All Orders endpoints require an admin Bearer token — see Authentication.

Released under the MIT License.