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" }
Cancels a shipment by setting its status to cancelled
cancelled
delivery
return
exchange
pending
scheduled