Shipments
Cancel shipment
Cancel a shipment if no shipping rate has been purchased or its shipping label is not yet in_transit.
Authorization
authorization AuthorizationBearer <token>
In: header
Path Parameters
shipment_id*string
Shipment ID
Format
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X PUT "https://api.parsel.app/shipments/123e4567-e89b-12d3-a456-426614174000/cancel"{
"created_at": {},
"custom_reference_1": "Custom Reference 1",
"custom_reference_2": "Custom Reference 2",
"customs_info": {
"customs_items": [
{
"description": "Cotton T-shirt",
"harmonized_system_code": "6109.10.00",
"origin_country": "US",
"quantity": 3,
"value": 10,
"weight": 5,
"weight_unit": "OZ"
}
],
"customs_signer": "Steve Brule",
"incoterm": "DAP"
},
"destination": {
"city": "Anytown",
"company": "Acme Inc.",
"country": "US",
"email": "jane.doe@example.com",
"name": "Jane Doe",
"phone": "+1234567890",
"state": "CA",
"street1": "123 Main St",
"zip": "12345"
},
"id": "02ef9c5f-29e6-48fc-9ec3-7ed57ed351f6",
"origin": {
"city": "Anytown",
"company": "Acme Inc.",
"country": "US",
"email": "john.doe@example.com",
"name": "John Doe",
"phone": "+1234567890",
"state": "CA",
"street1": "123 Main St",
"zip": "12345"
},
"parcel": {
"height": 10,
"length": 10,
"length_unit": "IN",
"weight": 10,
"weight_unit": "OZ",
"width": 10
},
"shipping_rates": [
{
"carrier": "UPS",
"estimated_delivery_date": {},
"estimated_delivery_days": 3,
"id": "123e4567-e89b-12d3-a456-426614174000",
"price": {
"amount": 10,
"currency": "USD"
},
"service": "Ground",
"rate_metadata": {
"billable_weight": 12,
"surcharge_metadata": {
"surcharge": {
"amount": 2.5,
"currency": "USD"
},
"surcharge_type": "DAS"
},
"surcharges_metadata": [
{
"surcharge": {
"amount": 2.5,
"currency": "USD"
},
"surcharge_type": "DAS"
},
{
"surcharge": {
"amount": 35,
"currency": "USD"
},
"surcharge_type": "HANDLING"
}
],
"usps_zone": 5,
"weight_metadata": {
"actual_oz_weight": 10,
"billable_oz_weight": 12,
"dim_factor": 166,
"dim_threshold": 1728,
"volume": 1000
}
}
},
{
"carrier": "USPS",
"estimated_delivery_date": {},
"estimated_delivery_days": 10,
"id": "123e4567-e89b-12d3-a456-426614174001",
"price": {
"amount": 10,
"currency": "USD"
},
"service": "GroundAdvantage",
"rate_metadata": {
"billable_weight": 12,
"surcharge_metadata": {
"surcharge": {
"amount": 2.5,
"currency": "USD"
},
"surcharge_type": "DAS"
},
"surcharges_metadata": [
{
"surcharge": {
"amount": 2.5,
"currency": "USD"
},
"surcharge_type": "DAS"
},
{
"surcharge": {
"amount": 35,
"currency": "USD"
},
"surcharge_type": "HANDLING"
}
],
"usps_zone": 5,
"weight_metadata": {
"actual_oz_weight": 10,
"billable_oz_weight": 12,
"dim_factor": 166,
"dim_threshold": 1728,
"volume": 1000
}
}
}
],
"status": "OPEN",
"updated_at": {},
"zone": 1
}{
"errors": {
"message": "The requested resource could not be found",
"status": "Not Found"
}
}{
"errors": {
"message": "The request is in conflict with the current state of the resource",
"status": "Conflict"
}
}{
"errors": {
"message": "The request could not be processed",
"reasons": [
{
"carrier": "UniUni",
"message": "Zip code not serviced."
}
],
"status": "Unprocessable Entity"
}
}