Skip to content

Get Cart

Returns the admin draft cart — items, totals, addresses, and the selected shipping / payment method. Identical payload to the REST endpoint (GET /api/admin/carts/{id}).

GraphQL shape notes

  • Scalar fields resolve normally. customerId, isActive, itemsCount, subTotal, grandTotal, formattedGrandTotal, shippingMethod, paymentMethodTitle, and the rest are selected like any field and come back populated over GraphQL (same values as REST).
  • items, billingAddress, and shippingAddress are JSON scalars — request them bare. Write items (not items { id ... }); you receive the complete JSON for each, identical to REST. billingAddress / shippingAddress are null until addresses are saved on the cart.
  • id vs _id. id is the resource IRI (/api/admin/carts/314); _id is the raw integer.
  • Only draft carts (isActive: false) are accessible; customer-owned active carts are rejected.

Operation

OperationTypePurpose
adminCart(id: ID!)QueryRead a draft cart

Released under the MIT License.