---
title: "Cancel a Shipment"
method: POST
path: "/ship/cancel/"
tags: ["Cancel"]
---

# Cancel a Shipment

`POST /ship/cancel/`

Cancel an existing shipment and request a label refund from the carrier. The shipment must not have been picked up or entered the carrier network.

**When to use:** Call this endpoint when you need to void a previously generated label — for example, if the order was cancelled, the address is incorrect, or you need to regenerate the label with different details.

**Prerequisites:**
- Valid JWT authentication token (Bearer)
- The carrier identifier (e.g., `fedex`, `dhl`, `ups`)
- The tracking number of the shipment to cancel

**Key behaviors:**
- Returns a confirmation status indicating whether the cancellation was accepted by the carrier
- Refund processing times vary by carrier
- Some carriers only allow cancellation within a limited time window after label generation
- Labels that have already been scanned by the carrier cannot be cancelled

## Request body

- object
  - `carrier` string, required — Name of the carrier
  - `trackingNumber` string, required — Tracking number of the label
  - `folio` string — Reference id
  - `ecommerce` integer — Ecommerce shop id

## Response `200`

Successful shipment cancellation

- object
  - `meta` string — Name of the action
  - `data` object
    - `carrier` string — Carrier name
    - `service` string — Service name
    - `trackingNumber` string — Tracking number of the shipment
    - `folio` string — Folio of the shipment
    - `ecommerce` object — Only applies if the shipment was created from e-commerce
      - `shop` string — Shop identifier
      - `order` string — Order number
      - `fulfillment` string — Fulfillment identifier
    - `balanceReturned` true | false — Indicates whether the refund was issued after cancellation
    - `balanceReturnDate` string, date-time — Indicates the date of the refund

---

[API](https://skmtc.net/envia/apis/envia-shipping-api-complete-documentation.md) · [All operations](https://skmtc.net/envia/apis/envia-shipping-api-complete-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/envia/envia-shipping-api-complete-documentation/revisions/39f9208959d6/schema)
