---
title: "Cancel a Shipment"
method: POST
path: "/2024-09/shipments/{easyship_shipment_id}/cancel"
tags: ["Shipments"]
---

# Cancel a Shipment

`POST /2024-09/shipments/{easyship_shipment_id}/cancel`

Cancel a shipment after a label has been requested, as long as the shipment is not yet in transit.

Required authorization scope: `public.shipment:write`

> **Cancel vs Delete:** Use **Delete** to remove a shipment before a label has been requested (`label_state: not_created`). Use **Cancel** after a label has been requested, as long as the shipment is not yet in transit.

**When can you cancel?**

The shipment's `label_state` must be one of: `pending`, `generated`, `printed`, `shipping_document_generated`, `failed`, `technical_failed`, or `reported`.

The shipment's `delivery_state` must be pre-transit: `not_created`, `pending`, `info_received`, or `expired`.

**When can you NOT cancel?**

- `label_state: generating` — the label is actively being generated; wait until it resolves to `generated` or `failed` before retrying
- `label_state: voided` or `void_failed` — the label has already been voided; the shipment cannot be cancelled via this endpoint
- `delivery_state` is `in_transit_to_customer`, `out_for_delivery`, `delivered`, or similar — the shipment has left the origin facility
- The label was generated more than **6 months ago** (pre-paid shipments only)

## Path parameters

- `easyship_shipment_id` string, required

## Response `200`

shipment successfully canceled

- Success — General success response
  - `success` object
    - `message` string
  - `meta` Meta
    - `request_id` string — An unique ID represent the request.

## Other responses

- `404` — record not found
- `422` — failed validations

---

[API](https://skmtc.net/easyship/apis/easyship-public-api.md) · [All operations](https://skmtc.net/easyship/apis/easyship-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/easyship/easyship-public-api/revisions/71d737a5fcbf/schema)
