Cancel Trip

Trip Management’s Cancel Trip API lets you cancel a previously generated route. This will mark the trip’s status as “Canceled” and notify CoPilot to stop running the trip.

The following two variations of requests are supported for this functionality:

POST /trip/{tripId}/cancel

Resource URL{tripId}/cancel

Request Fields

tripIdThe alkTripId returned when you planned the trip.integerYes

POST /trip/cancel?tripId={tripId}

Resource URL{tripId}

Request Fields

tripIdThe alkTripId returned when you planned the trip or the tmsTripId in your planning system.
Note: Only one can be used when making a request through the URL. The search logic will check for the user’s trips with matching tmsTripId. If no trips are found with provided tmsTripId, then the check will continue for trips with matching alkTripId. If no trip is found matching with either of the Trip IDs, then no trip found response will be returned.
integer or string

Response Fields

Same response for both the types of requests

successTrue if the route was deleted; false if not.boolean
messageContains the reason the message was not canceled if success = false.string

Sample Response

  "success": true,
  "message": null