Request Parameters
Path Parameters
curl -X DELETE \
'https://platform.returnqueen.dev/api/shipments/123e4567-e89b-12d3-a456-426614174000' \
-H 'X-API-KEY: your-api-key'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"order_number": "ORDER-123",
"status": "cancelled",
"cancelled_at": "2024-01-15T10:30:00Z",
"cancelled_by_id": "api-key-uuid",
"cancelled_reason": "Partner requested cancellation via API",
"shipment_type": "delivery",
"shipment_date": "2023-11-07T10:00:00Z",
"complete_at_start": "2023-11-07T14:00:00Z",
"complete_at_end": "2023-11-07T18:00:00Z",
"carrier_id": "660e8400-e29b-41d4-a716-446655440000",
"carrier_service_level_id": "550e8400-e29b-41d4-a716-446655440000",
"pickup_id": "770e8400-e29b-41d4-a716-446655440000",
"timezone": "America/New_York",
"inserted_at": "2023-11-07T10:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Response Fields
Unique identifier for the shipment (UUID format)
Shipment status (will be cancelled)
When the shipment was cancelled (ISO 8601 format)
ID of the entity that cancelled the shipment
Type of shipment: delivery, return, or exchange
Original shipment date in ISO 8601 format
Start of pickup window in ISO 8601 format
End of pickup window in ISO 8601 format
Carrier identifier (UUID format)
Carrier service level identifier (UUID format)
Pickup identifier (UUID format)
URL to the shipping label
Additional shipment metadata
When the shipment was created (ISO 8601 format)
When the shipment was last updated (ISO 8601 format)
Only shipments in pending or scheduled status can be cancelled. Attempting to cancel a shipment in any other state will result in a 409 Conflict error.