Delete / Cancel Shipment
This endpoint serves dual purpose and will either Delete or Cancel the shipment depending on the shipment state
HTTP Request
DELETE /api/v1/shipments/{shipment_id}
Delete Scenario
If the shipment is in draft state, no label has been purchased, the shipment will be deleted.
Delete Example
{
"message": "Shipment Deleted Successfully"
}
{
"message": "Not Found!"
}
Cancel Scenario
Alternatively if the shipment has had a label purchased, but can still be canceled. Will attempt to cancel it and request a refund.
Cancel Example
{
"message": "Request for refund has been submitted, once it is accepted by the carrier the shipment status will be updated."
}
{
"message": "Unable to request refund. The parcel has been shipped."
}