Cancel Shipment

This operation cancels or voids a shipment label that has not been processed by the carrier. When you cancel an unused prepaid shipment label, the API initiates a request for an electronic refund.

Key Considerations

  • Cancelation must occur before the shipment is picked up or processed by the carrier.
  • Refunds are only applicable for unused labels. Voiding a used label may result in penalties or billing.
  • USPS:
    • Cancel unused USPS prepaid labels within 30 days of printing to start the refund process.
    • Refund requests are processed within 14 business days from the date the refund was requested, provided the label has not been used.
    • Approved refunds are automatically credited to the account you used to pay for the label.
    • Note: USPS considers it a federal offense to induct a label that has already been refunded.
    • Note: Refunds are not available for First-Class Mail letters and flats.
    • Note: Refunds are subject to the policies of the applicable carrier.
  • For unused post-paid labels, you must void them. Voiding avoids billing for the label and allows the carrier to maintain an accurate count for pickups.
  • Always destroy voided labels to prevent accidental use. If a voided label is shipped, you will be billed for the label.
  • Once a refund has been claimed, you cannot use the shipping label for sending packages. It will be rejected.
SecuritybearerAuth
Request
path Parameters
shipmentId
required
string

The shipmentId, a unique identifier assigned for the Shipment.

header Parameters
X-PB-Developer-Partner-Id
string

This is the Developer Partner ID. When the developer is the only partner, this field is not required.

Responses
200

The Shipment has been cancelled.

400

Invalid request.

401

The request could not be authorized.

404

The requested resource was not found.

500

The request could not be completed due to an internal error.

put/api/v1/shipments/{shipmentId}/cancel
Request samples
Response samples
application/json
{
  • "carrier": "USPS",
  • "totalCarrierCharge": 0,
  • "parcelTrackingNumber": "9471309105156000624885",
  • "status": "INITIATED"
}