Cancel order - Grasshopper Labs API
Orders

Cancel order

Cancel an order before it's loaded for delivery. Once cancelled, the order is immutable.

POST /api/orders/{order_id}/cancel/

Body parameters

reason
string Optional
Free-text reason for cancellation. Appears in the audit log.
refund
boolean Optional
Whether to issue a refund if payment was already captured. Defaults to false.

Example

curl -X POST https://{licensee-url}/api/orders/22200041771/cancel/ \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Customer requested cancellation" }'
{
  "order_id": "22200041771",
  "status": 6,    // 6 = Cancelled
  "cancelled_at": "2026-05-12T15:30:00.000Z"
}

Errors

Statuserror.codeCause
409order_loadedOrder is already loaded for delivery and cannot be cancelled via API. Contact dispatch.
409order_already_cancelledOrder is already in a terminal state.