Skip to main content
POST
Cancel Operation

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. Create one in the SWITCH Copilot under Settings → API keys (needs the API keys permission in your company), or with POST /auth/api-keys. The key is shown once, at creation.

Path Parameters

route_id
integer
required

Route ID, from the session detail or the route list.

op_id
integer
required

Operation ID, from the route's operations.

Body

application/json

Request body for cancelling an operation.

reason
string
required

Reason for cancelling the operation.

Required string length: 1 - 500

Response

Operation cancelled. Returns the updated operation.

Operation as returned in session detail responses.

id
integer
required

Operation ID.

step
integer
required

Position of the operation in the route.

task_type
string
required

What the operator does at the stop, e.g. pickup.

latitude
number
required

Latitude of the stop (WGS84).

longitude
number
required

Longitude of the stop (WGS84).

provider
string
required

Fleet the vehicle belongs to.

estimated_arrive
string<date-time>
required

Estimated arrival time.

routing_parameters
Routing Parameters · object
required

Free-form data of the stop, as dispatched.

address
string | null

Street address, if known.

vehicle_properties
VehicleWithoutZone · object

Snapshot of the vehicle at planning time.

completed_at
string<date-time> | null

When the operation was completed; absent while open.

cancelled
string | null

Cancellation reason; absent unless cancelled.

additional_notes
string | null

Free-text notes.