Trips
Cancel trip
Cancel an active trip. Only trips in BOOKED, DRIVER_ASSIGNED, IN_TRANSIT, or ARRIVED_AT_STOP status can be cancelled.
Authorization
authorization AuthorizationBearer <token>
In: header
Path Parameters
id*string
Trip ID
Format
uuidRequest Body
application/json
Cancel trip params
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.parsel.app/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel" \ -H "Content-Type: application/json" \ -d '{ "reason": "Customer requested cancellation" }'{
"data": {
"cancellable": true,
"created_at": "2019-08-24T14:15:22Z",
"customer_amount_cents": 0,
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"legs": [
{
"bol_number": "string",
"bol_url": "string",
"created_at": "2019-08-24T14:15:22Z",
"from_address": {
"city": "Anytown",
"company": "Acme Inc.",
"country": "US",
"email": "john.doe@example.com",
"name": "John Doe",
"phone": "+1234567890",
"state": "CA",
"street1": "123 Main St",
"street2": "Apt 1",
"zip": "12345"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"leg_type": "CUSTOMER_DELIVERY",
"pickup_instructions": "string",
"pickup_window": {
"from": {},
"to": {}
},
"sequence": 0,
"status": "PENDING",
"to_address": {
"city": "Anytown",
"company": "Acme Inc.",
"country": "US",
"email": "john.doe@example.com",
"name": "John Doe",
"phone": "+1234567890",
"state": "CA",
"street1": "123 Main St",
"street2": "Apt 1",
"zip": "12345"
},
"tracking_url": "string"
}
],
"provider": "WARP",
"status": "SCHEDULED"
}
}{
"errors": {
"message": "This action requires the WRITE_SHIPMENTS scope",
"required_scope": "WRITE_SHIPMENTS",
"status": "Forbidden"
}
}{
"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"
}
}