Skip to main content

reorderFromOrder

Requires a customer (portal or buyer app) session.

Re-add every line from a past order onto the shared cart. Returns a SUMMARY, not a bare cart: reorder re-prices at today's catalogue, so the buyer has to be told which lines changed price and which could not be re-added at all.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation ReorderFromOrder($orderId: ID!) {
reorderFromOrder(orderId: $orderId) {
addedCount
mergedCount
cart {
id
addressId
directions
itemCount
subtotal
updatedAt
}
}
}

Variables:

{
"orderId": "id"
}

Response:

{
"data": {
"reorderFromOrder": {
"addedCount": 0,
"mergedCount": 0,
"cart": {
"id": "id",
"addressId": "id",
"directions": "string",
"itemCount": 0,
"subtotal": 0,
"updatedAt": "2025-01-15T00:00:00Z"
}
}
}
}
reorderFromOrder(
orderId: ID!
): MobileReorderResult!

Arguments​

reorderFromOrder.orderId ● ID! non-null scalar​

The ID of the order.

Type​

MobileReorderResult object​

Result of re-adding a past order to the mobile cart. A summary, not a bare cart: reorder re-prices at today's catalogue and can skip a line, and a buyer who taps once must be told both.