---
title: "Cancel an order (refunds if paid and not yet in production)"
method: POST
path: "/v1/orders/{order_id}/cancel"
---

# Cancel an order (refunds if paid and not yet in production)

`POST /v1/orders/{order_id}/cancel`

## Request

- Base URL: `https://pod.agentmade.dev`
- URL: `https://pod.agentmade.dev/v1/orders/{order_id}/cancel`
- Auth: none declared

## Path parameters

- `order_id` string, required

## Request body

- CancelOrder
  - `reason` string

## Response `200`

Order

- Order
  - `order_id` string, required: A bearer key: whoever has it can read and cancel the order. Do not share it publicly.
  - `status` 'AWAITING_PAYMENT' | 'PAID' | 'VALIDATING' | 'SUBMITTING' | 'SUBMITTED' | 'IN_PRODUCTION' | 'SHIPPED' | 'DELIVERED' | 'QUOTE_EXPIRED' | 'PAYMENT_FAILED' | 'REJECTED' | 'SUBMISSION_FAILED' | 'CANCELLED' | 'REFUND_PENDING' | 'REFUNDED' | 'DISPUTED', required
  - `next_step` string, required: What the agent should do next, in plain language.
  - `address_needed` boolean, required: True when purchase had no street address: the person enters it on the order page before paying.
  - `destination` object, nullable, required: While address_needed: the quoted destination.
    - `country_code` string, required
  - `status_reason` string, nullable, required
  - `quote_id` string, required
  - `total` object, required
    - `amount_minor` integer, required: Integer minor units (cents) of `currency`.
    - `currency` string, required
    - `formatted` string, required
  - `order_url` string, required: The order page. The person sees the status there.
  - `payment` object, required
    - `method` string, required
    - `paid` boolean, required: True only after a verified payment.
    - `url` string, nullable, required: While unpaid: the link to give the person who pays.
    - `expires_at` string, nullable, required
    - `instructions` string, nullable, required
    - `note` string, nullable, required
  - `items` object[], required
    - `product_id` string, required
    - `title` string, required
    - `color` string, required
    - `size` string, required
    - `quantity` integer, required
    - `image_url` string, nullable, required
    - `mockups` object[], required: One preview per print side of the ordered design on the product. Show them to the person as the exact print.
      - `placement` string, required
      - `url` string, required
  - `shipments` object[], required
    - `carrier` string, nullable, required
    - `tracking_number` string, nullable, required
    - `tracking_url` string, nullable, required
  - `delivery_estimate_business_days` object, nullable, required: Null when the order ended (cancelled, refunded, rejected, expired or delivered).
    - `min` number, nullable, required
    - `max` number, nullable, required
  - `timeline` object[], required
    - `at` string, required
    - `status` string, nullable, required
    - `note` string, nullable, required

## Other responses

- `4XX`: Error with a machine-readable code and a hint for the next step
- `5XX`: Error with a machine-readable code and a hint for the next step

---

[API](https://skmtc.dev/agentmade/apis/agentmade-print-on-demand-api.md) · [All operations](https://skmtc.dev/agentmade/apis/agentmade-print-on-demand-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentmade/apis/agentmade-print-on-demand-api/revisions/542fad1de43b?raw)
