Skip to content

Place Order ​

Finalises a fully prepared draft cart into a real order — the same flow as the admin Create-Order screen's place-order step. Items, addresses, shipping and payment must already be set on the draft cart.

Select result fields, not id ​

Select orderId (the new order's id), incrementId, customerId, grandTotal, success, message. Do not select id (or _id): this is an action result with no addressable record, so the auto-generated IRI field is null and selecting it errors out the whole payload.

Prerequisites — The example uses an illustrative cart id. Admin cart endpoints only operate on draft carts (is_active=0) — storefront carts are rejected. Create a draft cart first with the createAdminDraftCart mutation and use the returned cartId.

Operation ​

OperationTypePurpose
createAdminPlaceOrder(input)MutationFinalise a draft cart into an order

Sequence (errors[]) ​

Each missing step surfaces as a distinct GraphQL error (REST counterpart in parentheses):

  • Cart empty (409)
  • Cart total below the store's minimum order amount (422)
  • Addresses missing (409)
  • Shipping method missing (409)
  • Payment method missing (409)
  • Payment method not in [cashondelivery, moneytransfer] (422)

Released under the MIT License.