Mark an operation as done: sets completed_at to now and clears any cancellation. Some operations change the rest of the route, returned in side_effects: completing a recharge_pickup adds a start_charge right after it, and completing a start_charge moves the next open end_charge to the same place. Drivers assigned to the route can complete its operations whatever their company.
Failure Modes:
401: Token is missing or invalid
403: Insufficient permissions, or you cannot manage the route’s company and are not one of its drivers
404: No route with this ID, or no such operation on it
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.
Response
Operation completed. Returns the updated operation and any side-effect operations.
Response for completing an operation, includes any side-effect operations.
Operations added or changed as a consequence, e.g. the start_charge added after a recharge_pickup, or the next end_charge moved to the charging location of a start_charge.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SWITCH","description":"SWITCH API reference and guides: forecasts, fleet operations, routing, analytics, and Myles in your AI assistant.","colors":{"primary":"#131110","light":"#FAFAF4","dark":"#131110"},"logo":{"light":"https://mintcdn.com/switch-srl/xUIjav7hmgWy20q8/logo/switch-wordmark-ink.svg?fit=max\u0026auto=format\u0026n=xUIjav7hmgWy20q8\u0026q=85\u0026s=ea0fa9c069c3f9bc3f7a46ebefad09ff","dark":"https://mintcdn.com/switch-srl/xUIjav7hmgWy20q8/logo/switch-wordmark-white.png?fit=max\u0026auto=format\u0026n=xUIjav7hmgWy20q8\u0026q=85\u0026s=22cc14c4865c858f71fcf9156e145d21","href":"https://getswitch.io"},"favicon":"https://mintcdn.com/switch-srl/xUIjav7hmgWy20q8/favicon.png?fit=max\u0026auto=format\u0026n=xUIjav7hmgWy20q8\u0026q=85\u0026s=e9675c13bba801911f72dd4d0cb792c8","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go"],"prefill":true}},"background":{"color":{"light":"#FFFFFF","dark":"#131110"}},"navbar":{"primary":{"type":"button","label":"Open SWITCH","href":"https://copilot.getswitch.io"}},"footer":{"socials":{"website":"https://getswitch.io","linkedin":"https://www.linkedin.com/company/14072408"}},"fonts":{"family":"Roboto"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"switch-srl","hasAudioNarration":false,"actualSubdomain":"switch-srl","customDomains":[],"gitSource":{"type":"github","owner":"switch-street-witcher","repo":"switch-api","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b055b255cbaba24981e5356"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0d78a6d778254279ac679d","clientVersion":"0.0.4347","searchFilterCounts":[{"language":"default","tag":"API Reference","count":101},{"language":"default","tag":"Fleet Management","count":23},{"language":"default","tag":"Integrations","count":16},{"language":"default","tag":"Station Based Analytics","count":13},{"language":"default","tag":"Routing Sessions","count":11},{"language":"default","tag":"Routing Operations","count":8},{"language":"default","tag":"API Keys","count":5},{"language":"default","tag":"Forecast","count":4},{"language":"default","tag":"Live","count":4},{"language":"default","tag":"Operations","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"api-reference/routing-operations/complete-operation","slug":"/api-reference/routing-operations/complete-operation","pageMetadata":{"title":"Complete Operation","description":"Mark an operation as done: sets `completed_at` to now and clears any cancellation. Some operations change the rest of the route, returned in `side_effects`: completing a `recharge_pickup` adds a `start_charge` right after it, and completing a `start_charge` moves the next open `end_charge` to the same place. Drivers assigned to the route can complete its operations whatever their company.\n\n**Failure Modes:**\n- **401**: Token is missing or invalid\n- **403**: Insufficient permissions, or you cannot manage the route's company and are not one of its drivers\n- **404**: No route with this ID, or no such operation on it\n\n**Required Auth Scopes:**\n- `routing-operations:manage`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/operations/{op_id}/complete","href":"/api-reference/routing-operations/complete-operation","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Mark an operation as done: sets \", _jsx(_components.code, {\n children: \"completed_at\"\n }), \" to now and clears any cancellation. Some operations change the rest of the route, returned in \", _jsx(_components.code, {\n children: \"side_effects\"\n }), \": completing a \", _jsx(_components.code, {\n children: \"recharge_pickup\"\n }), \" adds a \", _jsx(_components.code, {\n children: \"start_charge\"\n }), \" right after it, and completing a \", _jsx(_components.code, {\n children: \"start_charge\"\n }), \" moves the next open \", _jsx(_components.code, {\n children: \"end_charge\"\n }), \" to the same place. Drivers assigned to the route can complete its operations whatever their company.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Failure Modes:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"401\"\n }), \": Token is missing or invalid\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"403\"\n }), \": Insufficient permissions, or you cannot manage the route’s company and are not one of its drivers\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"404\"\n }), \": No route with this ID, or no such operation on it\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Required Auth Scopes:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: _jsx(_components.code, {\n children: \"routing-operations:manage\"\n })\n }), \"\\n\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Complete Operation","description":"Mark an operation as done: sets `completed_at` to now and clears any cancellation. Some operations change the rest of the route, returned in `side_effects`: completing a `recharge_pickup` adds a `start_charge` right after it, and completing a `start_charge` moves the next open `end_charge` to the same place. Drivers assigned to the route can complete its operations whatever their company.\n\n**Failure Modes:**\n- **401**: Token is missing or invalid\n- **403**: Insufficient permissions, or you cannot manage the route's company and are not one of its drivers\n- **404**: No route with this ID, or no such operation on it\n\n**Required Auth Scopes:**\n- `routing-operations:manage`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/operations/{op_id}/complete","href":"/api-reference/routing-operations/complete-operation","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Routing Operations"],"summary":"Complete Operation","description":"Mark an operation as done: sets `completed_at` to now and clears any cancellation. Some operations change the rest of the route, returned in `side_effects`: completing a `recharge_pickup` adds a `start_charge` right after it, and completing a `start_charge` moves the next open `end_charge` to the same place. Drivers assigned to the route can complete its operations whatever their company.\n\n**Failure Modes:**\n- **401**: Token is missing or invalid\n- **403**: Insufficient permissions, or you cannot manage the route's company and are not one of its drivers\n- **404**: No route with this ID, or no such operation on it\n\n**Required Auth Scopes:**\n- `routing-operations:manage`","operationId":"complete_operation","security":["124a6a86-b0d6-4676-b34a-53c7740583f2","a351973c-80a2-405c-abb0-afefe5994cf3"],"parameters":["89f4eed5-4cab-4d5b-8a2d-3e4498d2d1af","6e3aa0ea-3fc2-47af-8bb5-1b795e1a560e"],"responses":{"200":"975fcf49-f1ff-421d-983c-f12101bf2ea3","401":"7f9cf0ce-72ae-4f6b-bd82-1a7611e2f586","403":"c1511a17-ca7c-4889-8b4b-d47431a693cd","404":"791c6719-7568-42be-b8e8-e4548158fa53","422":"99620ab8-a4ce-4baa-8d13-ba572c067280","500":"9ef95f1e-51c8-422b-8b75-b73cc1ecb286"},"method":"post","type":"path","servers":["8722cfe8-7c57-442c-b8ed-766564865e98"],"path":"/operations/routes/{route_id}/operations/{op_id}/complete","baseUrlOptions":["https://api.getswitch.io"],"title":"Complete Operation","codeSamples":[],"requestExampleLanguages":["bash","python","javascript","go"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[]},"dependencies":{"parameters":{"89f4eed5-4cab-4d5b-8a2d-3e4498d2d1af":{"name":"route_id","in":"path","required":true,"schema":{"type":"integer","description":"Route ID, from the session detail or the route list.","title":"Route Id","isRequired":true,"uniqueKey":"","typeLabel":"integer"},"description":"Route ID, from the session detail or the route list."},"6e3aa0ea-3fc2-47af-8bb5-1b795e1a560e":{"name":"op_id","in":"path","required":true,"schema":{"type":"integer","description":"Operation ID, from the route's `operations`.","title":"Op Id","isRequired":true,"uniqueKey":"","typeLabel":"integer"},"description":"Operation ID, from the route's `operations`."}},"responses":{"975fcf49-f1ff-421d-983c-f12101bf2ea3":{"description":"Operation completed. Returns the updated operation and any side-effect operations.","content":{"application/json":{"schema":{"properties":{"operation":{"properties":{"id":{"type":"integer","title":"Id","description":"Operation ID.","isRequired":true,"uniqueKey":"operation.id","typeLabel":"integer"},"step":{"type":"integer","title":"Step","description":"Position of the operation in the route.","isRequired":true,"uniqueKey":"operation.step","typeLabel":"integer"},"task_type":{"type":"string","title":"Task Type","description":"What the operator does at the stop, e.g. `pickup`.","isRequired":true,"uniqueKey":"operation.task_type","typeLabel":"string"},"latitude":{"type":"number","title":"Latitude","description":"Latitude of the stop (WGS84).","isRequired":true,"uniqueKey":"operation.latitude","typeLabel":"number"},"longitude":{"type":"number","title":"Longitude","description":"Longitude of the stop (WGS84).","isRequired":true,"uniqueKey":"operation.longitude","typeLabel":"number"},"provider":{"type":"string","title":"Provider","description":"Fleet the vehicle belongs to.","isRequired":true,"uniqueKey":"operation.provider","typeLabel":"string"},"estimated_arrive":{"type":"string","format":"date-time","title":"Estimated Arrive","description":"Estimated arrival time.","isRequired":true,"uniqueKey":"operation.estimated_arrive","typeLabel":"string\u003cdate-time>"},"routing_parameters":{"additionalProperties":true,"type":"object","title":"Routing Parameters","description":"Free-form data of the stop, as dispatched.","isRequired":true,"uniqueKey":"operation.routing_parameters","typeLabel":"Routing Parameters · object"},"address":{"oneOf":[{"type":"string","title":"Address","description":"Street address, if known.","uniqueKey":"operation.address.oneOf.0","typeLabel":"string"},{"type":"null","title":"Address","description":"Street address, if known.","uniqueKey":"operation.address.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.address","typeLabel":"string | null"},"vehicle_properties":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the vehicle","isRequired":true,"uniqueKey":"operation.vehicle_properties.id","typeLabel":"string"},"battery_level":{"oneOf":[{"type":"integer","title":"Battery Level","description":"Battery level of the vehicle, e.g., 100 for 100%","isRequired":true,"uniqueKey":"operation.vehicle_properties.battery_level.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Battery Level","description":"Battery level of the vehicle, e.g., 100 for 100%","isRequired":true,"uniqueKey":"operation.vehicle_properties.battery_level.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"operation.vehicle_properties.battery_level","typeLabel":"integer | null"},"licence_plate":{"oneOf":[{"type":"string","title":"Licence Plate","description":"Licence plate number of the vehicle","uniqueKey":"operation.vehicle_properties.licence_plate.oneOf.0","typeLabel":"string"},{"type":"null","title":"Licence Plate","description":"Licence plate number of the vehicle","uniqueKey":"operation.vehicle_properties.licence_plate.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.licence_plate","typeLabel":"string | null"},"lat":{"oneOf":[{"type":"number","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"operation.vehicle_properties.lat.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"operation.vehicle_properties.lat.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.lat","typeLabel":"number | null"},"lon":{"oneOf":[{"type":"number","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"operation.vehicle_properties.lon.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"operation.vehicle_properties.lon.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.lon","typeLabel":"number | null"},"vehicle_type":{"oneOf":[{"type":"string","title":"Vehicle Type","description":"Type of the vehicle, e.g., 'scooter', 'bike', 'car'","uniqueKey":"operation.vehicle_properties.vehicle_type.oneOf.0","typeLabel":"string"},{"type":"null","title":"Vehicle Type","description":"Type of the vehicle, e.g., 'scooter', 'bike', 'car'","uniqueKey":"operation.vehicle_properties.vehicle_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.vehicle_type","typeLabel":"string | null"},"vehicle_model":{"oneOf":[{"type":"string","title":"Vehicle Model","description":"Model of the vehicle, e.g., 'Model X', 'Model Y'","uniqueKey":"operation.vehicle_properties.vehicle_model.oneOf.0","typeLabel":"string"},{"type":"null","title":"Vehicle Model","description":"Model of the vehicle, e.g., 'Model X', 'Model Y'","uniqueKey":"operation.vehicle_properties.vehicle_model.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.vehicle_model","typeLabel":"string | null"},"battery_level_master":{"oneOf":[{"type":"integer","title":"Battery Level Master","description":"Master battery level percentage (custom MDS setup only). None when not reported by the provider.","uniqueKey":"operation.vehicle_properties.battery_level_master.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Battery Level Master","description":"Master battery level percentage (custom MDS setup only). None when not reported by the provider.","uniqueKey":"operation.vehicle_properties.battery_level_master.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.battery_level_master","typeLabel":"integer | null"},"last_seen":{"oneOf":[{"type":"string","format":"date-time","title":"Last Seen","description":"Timestamp of the last time the vehicle was seen in the system","uniqueKey":"operation.vehicle_properties.last_seen.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Last Seen","description":"Timestamp of the last time the vehicle was seen in the system","uniqueKey":"operation.vehicle_properties.last_seen.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.last_seen","typeLabel":"string\u003cdate-time> | null"},"last_moved":{"oneOf":[{"type":"string","format":"date-time","title":"Last Moved","description":"Timestamp of the last time the vehicle moved","uniqueKey":"operation.vehicle_properties.last_moved.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Last Moved","description":"Timestamp of the last time the vehicle moved","uniqueKey":"operation.vehicle_properties.last_moved.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.last_moved","typeLabel":"string\u003cdate-time> | null"},"status":{"oneOf":[{"type":"string","title":"Status","description":"Current status of the vehicle, e.g., 'available', 'in-use'","uniqueKey":"operation.vehicle_properties.status.oneOf.0","typeLabel":"string"},{"type":"null","title":"Status","description":"Current status of the vehicle, e.g., 'available', 'in-use'","uniqueKey":"operation.vehicle_properties.status.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.vehicle_properties.status","typeLabel":"string | null"}},"type":"object","required":["id","battery_level"],"title":"VehicleWithoutZone","description":"Snapshot of the vehicle at planning time.","uniqueKey":"operation.vehicle_properties","typeLabel":"VehicleWithoutZone · object"},"completed_at":{"oneOf":[{"type":"string","format":"date-time","title":"Completed At","description":"When the operation was completed; absent while open.","uniqueKey":"operation.completed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Completed At","description":"When the operation was completed; absent while open.","uniqueKey":"operation.completed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.completed_at","typeLabel":"string\u003cdate-time> | null"},"cancelled":{"oneOf":[{"type":"string","title":"Cancelled","description":"Cancellation reason; absent unless cancelled.","uniqueKey":"operation.cancelled.oneOf.0","typeLabel":"string"},{"type":"null","title":"Cancelled","description":"Cancellation reason; absent unless cancelled.","uniqueKey":"operation.cancelled.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.cancelled","typeLabel":"string | null"},"additional_notes":{"oneOf":[{"type":"string","title":"Additional Notes","description":"Free-text notes.","uniqueKey":"operation.additional_notes.oneOf.0","typeLabel":"string"},{"type":"null","title":"Additional Notes","description":"Free-text notes.","uniqueKey":"operation.additional_notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation.additional_notes","typeLabel":"string | null"}},"type":"object","required":["id","step","task_type","latitude","longitude","provider","estimated_arrive","routing_parameters"],"title":"OperationPublic","description":"The completed operation.","examples":[{"additional_notes":"Battery level (12.0%) below threshold (20.0%)","address":"Via Torino 2, 20123 Milano MI","completed_at":"2026-11-30T08:17:42Z","estimated_arrive":"2026-11-30T08:14:00Z","id":9031,"latitude":45.4642,"longitude":9.1856,"provider":"acme-mobility","routing_parameters":{"capacity_delta":{"charged_battery":-1,"empty_battery":1},"profit":2.4},"step":1,"task_type":"battery_swap","vehicle_properties":{"battery_level":12,"id":"acme-sc-0193","last_moved":"2026-11-30T06:41:03Z","last_seen":"2026-11-30T07:50:12Z","lat":45.4642,"licence_plate":"SC0193","lon":9.1856,"status":"available","vehicle_model":"S-200","vehicle_type":"scooter"}}],"isRequired":true,"uniqueKey":"operation","typeLabel":"OperationPublic · object"},"side_effects":{"items":{"properties":{"id":{"type":"integer","title":"Id","description":"Operation ID.","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].id","typeLabel":"integer"},"step":{"type":"integer","title":"Step","description":"Position of the operation in the route.","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].step","typeLabel":"integer"},"task_type":{"type":"string","title":"Task Type","description":"What the operator does at the stop, e.g. `pickup`.","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].task_type","typeLabel":"string"},"latitude":{"type":"number","title":"Latitude","description":"Latitude of the stop (WGS84).","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].latitude","typeLabel":"number"},"longitude":{"type":"number","title":"Longitude","description":"Longitude of the stop (WGS84).","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].longitude","typeLabel":"number"},"provider":{"type":"string","title":"Provider","description":"Fleet the vehicle belongs to.","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].provider","typeLabel":"string"},"estimated_arrive":{"type":"string","format":"date-time","title":"Estimated Arrive","description":"Estimated arrival time.","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].estimated_arrive","typeLabel":"string\u003cdate-time>"},"routing_parameters":{"additionalProperties":true,"type":"object","title":"Routing Parameters","description":"Free-form data of the stop, as dispatched.","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].routing_parameters","typeLabel":"Routing Parameters · object"},"address":{"oneOf":[{"type":"string","title":"Address","description":"Street address, if known.","uniqueKey":"side_effects.items.[INDEX].address.oneOf.0","typeLabel":"string"},{"type":"null","title":"Address","description":"Street address, if known.","uniqueKey":"side_effects.items.[INDEX].address.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].address","typeLabel":"string | null"},"vehicle_properties":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the vehicle","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.id","typeLabel":"string"},"battery_level":{"oneOf":[{"type":"integer","title":"Battery Level","description":"Battery level of the vehicle, e.g., 100 for 100%","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.battery_level.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Battery Level","description":"Battery level of the vehicle, e.g., 100 for 100%","isRequired":true,"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.battery_level.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.battery_level","typeLabel":"integer | null"},"licence_plate":{"oneOf":[{"type":"string","title":"Licence Plate","description":"Licence plate number of the vehicle","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.licence_plate.oneOf.0","typeLabel":"string"},{"type":"null","title":"Licence Plate","description":"Licence plate number of the vehicle","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.licence_plate.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.licence_plate","typeLabel":"string | null"},"lat":{"oneOf":[{"type":"number","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.lat.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.lat.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.lat","typeLabel":"number | null"},"lon":{"oneOf":[{"type":"number","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.lon.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.lon.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.lon","typeLabel":"number | null"},"vehicle_type":{"oneOf":[{"type":"string","title":"Vehicle Type","description":"Type of the vehicle, e.g., 'scooter', 'bike', 'car'","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.vehicle_type.oneOf.0","typeLabel":"string"},{"type":"null","title":"Vehicle Type","description":"Type of the vehicle, e.g., 'scooter', 'bike', 'car'","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.vehicle_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.vehicle_type","typeLabel":"string | null"},"vehicle_model":{"oneOf":[{"type":"string","title":"Vehicle Model","description":"Model of the vehicle, e.g., 'Model X', 'Model Y'","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.vehicle_model.oneOf.0","typeLabel":"string"},{"type":"null","title":"Vehicle Model","description":"Model of the vehicle, e.g., 'Model X', 'Model Y'","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.vehicle_model.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.vehicle_model","typeLabel":"string | null"},"battery_level_master":{"oneOf":[{"type":"integer","title":"Battery Level Master","description":"Master battery level percentage (custom MDS setup only). None when not reported by the provider.","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.battery_level_master.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Battery Level Master","description":"Master battery level percentage (custom MDS setup only). None when not reported by the provider.","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.battery_level_master.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.battery_level_master","typeLabel":"integer | null"},"last_seen":{"oneOf":[{"type":"string","format":"date-time","title":"Last Seen","description":"Timestamp of the last time the vehicle was seen in the system","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.last_seen.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Last Seen","description":"Timestamp of the last time the vehicle was seen in the system","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.last_seen.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.last_seen","typeLabel":"string\u003cdate-time> | null"},"last_moved":{"oneOf":[{"type":"string","format":"date-time","title":"Last Moved","description":"Timestamp of the last time the vehicle moved","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.last_moved.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Last Moved","description":"Timestamp of the last time the vehicle moved","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.last_moved.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.last_moved","typeLabel":"string\u003cdate-time> | null"},"status":{"oneOf":[{"type":"string","title":"Status","description":"Current status of the vehicle, e.g., 'available', 'in-use'","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.status.oneOf.0","typeLabel":"string"},{"type":"null","title":"Status","description":"Current status of the vehicle, e.g., 'available', 'in-use'","uniqueKey":"side_effects.items.[INDEX].vehicle_properties.status.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].vehicle_properties.status","typeLabel":"string | null"}},"type":"object","required":["id","battery_level"],"title":"VehicleWithoutZone","description":"Snapshot of the vehicle at planning time.","uniqueKey":"side_effects.items.[INDEX].vehicle_properties","typeLabel":"VehicleWithoutZone · object"},"completed_at":{"oneOf":[{"type":"string","format":"date-time","title":"Completed At","description":"When the operation was completed; absent while open.","uniqueKey":"side_effects.items.[INDEX].completed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Completed At","description":"When the operation was completed; absent while open.","uniqueKey":"side_effects.items.[INDEX].completed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].completed_at","typeLabel":"string\u003cdate-time> | null"},"cancelled":{"oneOf":[{"type":"string","title":"Cancelled","description":"Cancellation reason; absent unless cancelled.","uniqueKey":"side_effects.items.[INDEX].cancelled.oneOf.0","typeLabel":"string"},{"type":"null","title":"Cancelled","description":"Cancellation reason; absent unless cancelled.","uniqueKey":"side_effects.items.[INDEX].cancelled.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].cancelled","typeLabel":"string | null"},"additional_notes":{"oneOf":[{"type":"string","title":"Additional Notes","description":"Free-text notes.","uniqueKey":"side_effects.items.[INDEX].additional_notes.oneOf.0","typeLabel":"string"},{"type":"null","title":"Additional Notes","description":"Free-text notes.","uniqueKey":"side_effects.items.[INDEX].additional_notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"side_effects.items.[INDEX].additional_notes","typeLabel":"string | null"}},"type":"object","required":["id","step","task_type","latitude","longitude","provider","estimated_arrive","routing_parameters"],"title":"OperationPublic","description":"Operation as returned in session detail responses.","examples":[{"additional_notes":"Battery level (12.0%) below threshold (20.0%)","address":"Via Torino 2, 20123 Milano MI","completed_at":"2026-11-30T08:17:42Z","estimated_arrive":"2026-11-30T08:14:00Z","id":9031,"latitude":45.4642,"longitude":9.1856,"provider":"acme-mobility","routing_parameters":{"capacity_delta":{"charged_battery":-1,"empty_battery":1},"profit":2.4},"step":1,"task_type":"battery_swap","vehicle_properties":{"battery_level":12,"id":"acme-sc-0193","last_moved":"2026-11-30T06:41:03Z","last_seen":"2026-11-30T07:50:12Z","lat":45.4642,"licence_plate":"SC0193","lon":9.1856,"status":"available","vehicle_model":"S-200","vehicle_type":"scooter"}}],"uniqueKey":"side_effects.items.[INDEX]","typeLabel":"OperationPublic · object"},"type":"array","title":"Side Effects","description":"Operations added or changed as a consequence, e.g. the `start_charge` added after a `recharge_pickup`, or the next `end_charge` moved to the charging location of a `start_charge`.","uniqueKey":"side_effects","typeLabel":"OperationPublic · object[]"}},"type":"object","required":["operation"],"title":"CompleteOperationResponse","description":"Response for completing an operation, includes any side-effect operations.","examples":[{"operation":{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","address":"Via Mazzini 9, 20123 Milano MI","completed_at":"2026-11-30T08:25:10Z","estimated_arrive":"2026-11-30T08:23:00Z","id":9032,"latitude":45.4671,"longitude":9.1883,"provider":"acme-mobility","routing_parameters":{"capacity_delta":{"vehicles":1},"profit":3},"step":2,"task_type":"recharge_pickup"},"side_effects":[{"address":"Via Mazzini 9, 20123 Milano MI","estimated_arrive":"2026-11-30T08:25:10Z","id":9033,"latitude":45.4671,"longitude":9.1883,"provider":"acme-mobility","routing_parameters":{},"step":3,"task_type":"start_charge"}]}],"uniqueKey":"","typeLabel":"CompleteOperationResponse · object"},"examples":{"Example":{"title":"Example","value":{"operation":{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","address":"Via Mazzini 9, 20123 Milano MI","completed_at":"2026-11-30T08:25:10Z","estimated_arrive":"2026-11-30T08:23:00Z","id":9032,"latitude":45.4671,"longitude":9.1883,"provider":"acme-mobility","routing_parameters":{"capacity_delta":{"vehicles":1},"profit":3},"step":2,"task_type":"recharge_pickup"},"side_effects":[{"address":"Via Mazzini 9, 20123 Milano MI","estimated_arrive":"2026-11-30T08:25:10Z","id":9033,"latitude":45.4671,"longitude":9.1883,"provider":"acme-mobility","routing_parameters":{},"step":3,"task_type":"start_charge"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"7f9cf0ce-72ae-4f6b-bd82-1a7611e2f586":{"description":"Unauthorized. Token is missing or invalid.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"c1511a17-ca7c-4889-8b4b-d47431a693cd":{"description":"Forbidden. Insufficient permissions.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"791c6719-7568-42be-b8e8-e4548158fa53":{"description":"Not Found. Route or operation not found.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"99620ab8-a4ce-4baa-8d13-ba572c067280":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"9ef95f1e-51c8-422b-8b75-b73cc1ecb286":{"description":"Internal Server Error.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"124a6a86-b0d6-4676-b34a-53c7740583f2":{"HTTPBearer":{"type":"http","scheme":"bearer","description":"An API key, sent as `Authorization: Bearer \u003ckey>`. 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.","scopes":[],"schemeName":"HTTPBearer"}},"a351973c-80a2-405c-abb0-afefe5994cf3":{"HTTPBearer":{"type":"http","scheme":"bearer","description":"An API key, sent as `Authorization: Bearer \u003ckey>`. 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.","scopes":[],"schemeName":"HTTPBearer"}}},"servers":{"8722cfe8-7c57-442c-b8ed-766564865e98":{"url":"https://api.getswitch.io","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An API key, sent as `Authorization: Bearer \u003ckey>`. 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.","scopes":[],"schemeName":"HTTPBearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key, sent as `Authorization: Bearer \u003ckey>`. 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.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"HTTPBearer","name":"Authorization"}],"title":"HTTPBearer"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An API key, sent as `Authorization: Bearer \u003ckey>`. 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.","scopes":[],"schemeName":"HTTPBearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key, sent as `Authorization: Bearer \u003ckey>`. 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.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"HTTPBearer","name":"Authorization"}],"title":"HTTPBearer"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"switch-srl","siteName":"SWITCH","title":"Complete Operation - SWITCH","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-30T13:22:52.086Z","originalFileLocation":"api-reference/routing-operations/complete-operation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Mark an operation as done: sets completed_at to now and clears any cancellation. Some operations change the rest of the route, returned in side_effects: completing a recharge_pickup adds a start_charge right after it, and completing a start_charge moves the next open end_charge to the same place. Drivers assigned to the route can complete its operations whatever their company. Failure Modes: - 401: Token is missing or invalid - 403: Insufficient permissions, or you cannot manage the route\u0026#x27;s company and are not one of its drivers - 404: No route with this ID, or no such operation on it Required Auth Scopes: - routing-operations:manage\">\u003cmeta data-mint-head name=\"application-name\" content=\"SWITCH\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Complete Operation - SWITCH\">\u003cmeta data-mint-head property=\"og:description\" content=\"Mark an operation as done: sets completed_at to now and clears any cancellation. Some operations change the rest of the route, returned in side_effects: completing a recharge_pickup adds a start_charge right after it, and completing a start_charge moves the next open end_charge to the same place. Drivers assigned to the route can complete its operations whatever their company. Failure Modes: - 401: Token is missing or invalid - 403: Insufficient permissions, or you cannot manage the route\u0026#x27;s company and are not one of its drivers - 404: No route with this ID, or no such operation on it Required Auth Scopes: - routing-operations:manage\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SWITCH\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://switch-srl.mintlify.site/_mintlify/api/og/v2?division=Routing+Operations\u0026amp;title=Complete+Operation\u0026amp;description=Mark+an+operation+as+done%3A+sets+%60completed_at%60+to+now+and+clears+any+cancellation.+Some+operations+change+the+rest+of+the+route%2C+returned+in+%60side_effects%60%3A+com\u0026amp;theme=532c2210b81102e1993bdf91\u0026amp;signature=31f35ad3ed78a2df27cdb84c564603e0440f8ba416ed854ba10e59134a138ea8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Complete Operation - SWITCH\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Mark an operation as done: sets completed_at to now and clears any cancellation. Some operations change the rest of the route, returned in side_effects: completing a recharge_pickup adds a start_charge right after it, and completing a start_charge moves the next open end_charge to the same place. Drivers assigned to the route can complete its operations whatever their company. Failure Modes: - 401: Token is missing or invalid - 403: Insufficient permissions, or you cannot manage the route\u0026#x27;s company and are not one of its drivers - 404: No route with this ID, or no such operation on it Required Auth Scopes: - routing-operations:manage\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://switch-srl.mintlify.site/_mintlify/api/og/v2?division=Routing+Operations\u0026amp;title=Complete+Operation\u0026amp;description=Mark+an+operation+as+done%3A+sets+%60completed_at%60+to+now+and+clears+any+cancellation.+Some+operations+change+the+rest+of+the+route%2C+returned+in+%60side_effects%60%3A+com\u0026amp;theme=532c2210b81102e1993bdf91\u0026amp;signature=31f35ad3ed78a2df27cdb84c564603e0440f8ba416ed854ba10e59134a138ea8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/switch-srl/u7l7JRBUtAMz_jDT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SWITCH\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#131110\">\u003clink data-mint-head rel=\"canonical\" href=\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/routing-operations/complete-operation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://switch-srl.mintlify.app/#organization\",\"name\":\"SWITCH\",\"url\":\"https://switch-srl.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/switch-srl/xUIjav7hmgWy20q8/logo/switch-wordmark-ink.svg?fit=max\u0026auto=format\u0026n=xUIjav7hmgWy20q8\u0026q=85\u0026s=ea0fa9c069c3f9bc3f7a46ebefad09ff\"}},{\"@type\":\"WebSite\",\"@id\":\"https://switch-srl.mintlify.app#website\",\"name\":\"SWITCH\",\"url\":\"https://switch-srl.mintlify.app\",\"publisher\":{\"@id\":\"https://switch-srl.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation#webpage\",\"url\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation\",\"name\":\"Complete Operation\",\"description\":\"Mark an operation as done: sets completed_at to now and clears any cancellation. Some operations change the rest of the route, returned in side_effects: completing a recharge_pickup adds a start_charge right after it, and completing a start_charge moves the next open end_charge to the same place. Drivers assigned to the route can complete its operations whatever their company. Failure Modes: - 401: Token is missing or invalid - 403: Insufficient permissions, or you cannot manage the route's company and are not one of its drivers - 404: No route with this ID, or no such operation on it Required Auth Scopes: - routing-operations:manage\",\"dateModified\":\"2026-11-30T13:22:52.086Z\",\"isPartOf\":{\"@id\":\"https://switch-srl.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Routing Operations\",\"item\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/list-operations-in-route\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Complete Operation\",\"item\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation#apireference\",\"headline\":\"Complete Operation\",\"name\":\"Complete Operation\",\"description\":\"Mark an operation as done: sets completed_at to now and clears any cancellation. Some operations change the rest of the route, returned in side_effects: completing a recharge_pickup adds a start_charge right after it, and completing a start_charge moves the next open end_charge to the same place. Drivers assigned to the route can complete its operations whatever their company. Failure Modes: - 401: Token is missing or invalid - 403: Insufficient permissions, or you cannot manage the route's company and are not one of its drivers - 404: No route with this ID, or no such operation on it Required Auth Scopes: - routing-operations:manage\",\"url\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation\",\"mainEntityOfPage\":{\"@id\":\"https://switch-srl.mintlify.app/api-reference/routing-operations/complete-operation#webpage\"},\"dateModified\":\"2026-11-30T13:22:52.086Z\",\"publisher\":{\"@id\":\"https://switch-srl.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://switch-srl.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SWITCH\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"SWITCH\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/routing-operations/complete-operation.md","siteName":"SWITCH","nav":{"global":null,"tabs":[{"tab":"API Reference","groups":[{"group":"Get started","pages":[{"title":"Introduction","href":""}]},{"group":"API Keys","pages":[{"title":"List API Keys","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /auth/api-keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create API Key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /auth/api-keys","href":"/api-reference/api-keys/create-api-key"},{"title":"Get API Key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /auth/api-keys/{uuid}","href":"/api-reference/api-keys/get-api-key"},{"title":"Delete API Key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /auth/api-keys/{uuid}","href":"/api-reference/api-keys/delete-api-key"},{"title":"Get Current User Profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /auth/me","href":"/api-reference/api-keys/get-current-user-profile"}]},{"group":"Grids","pages":[{"title":"Download Grid File For Single Data Scenario","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /grids/stream","href":"/api-reference/grids/download-grid-file-for-single-data-scenario"},{"title":"Download Grid File For Specific Data Scenario","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /grids/stream/{data_scenario_id}","href":"/api-reference/grids/download-grid-file-for-specific-data-scenario"}]},{"group":"Forecast","pages":[{"title":"Get Forecasted Demand","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /forecast","href":"/api-reference/forecast/get-forecasted-demand"},{"title":"Get Forecasted Demand as GeoJSON","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /forecast/geojson","href":"/api-reference/forecast/get-forecasted-demand-as-geojson"},{"title":"Get Forecasted Demand by Type","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /forecast/{forecast_type}","href":"/api-reference/forecast/get-forecasted-demand-by-type"},{"title":"Get Forecasted Demand by Type as GeoJSON","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /forecast/{forecast_type}/geojson","href":"/api-reference/forecast/get-forecasted-demand-by-type-as-geojson"}]},{"group":"Operations","pages":[{"title":"Get Imbalance Snapshot","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/imbalance","href":"/api-reference/operations/get-imbalance-snapshot"},{"title":"Get Imbalance Snapshot as GeoJSON","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/imbalance/geojson","href":"/api-reference/operations/get-imbalance-snapshot-as-geojson"},{"title":"Get Rebalancing Suggestions","deprecated":true,"version":null,"openapi":"/api-reference/openapi.json post /operations/rebalance","href":"/api-reference/operations/get-rebalancing-suggestions"},{"title":"Generate Operations Based on Strategies","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/suggest","href":"/api-reference/operations/generate-operations-based-on-strategies"}]},{"group":"Routing","pages":[{"title":"Solve Routing Optimization","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routing","href":"/api-reference/routing/solve-routing-optimization"},{"title":"Solve Multi-Fleet Routing (Two-Phase Greedy)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routing/multi-fleet","href":"/api-reference/routing/solve-multi-fleet-routing-two-phase-greedy"}]},{"group":"Routing Sessions","pages":[{"title":"List Sessions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/sessions","href":"/api-reference/routing-sessions/list-sessions"},{"title":"Dispatch Session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/sessions","href":"/api-reference/routing-sessions/dispatch-session"},{"title":"Get Session Detail","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/sessions/{slug}","href":"/api-reference/routing-sessions/get-session-detail"},{"title":"Update Session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /operations/sessions/{slug}","href":"/api-reference/routing-sessions/update-session"},{"title":"Delete Session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /operations/sessions/{slug}","href":"/api-reference/routing-sessions/delete-session"},{"title":"List Routes in Session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/sessions/{slug}/routes","href":"/api-reference/routing-sessions/list-routes-in-session"},{"title":"List Routes (Cross-Session)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/routes","href":"/api-reference/routing-sessions/list-routes-cross-session"},{"title":"Get Route Detail","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/routes/{route_id}","href":"/api-reference/routing-sessions/get-route-detail"},{"title":"Update Route","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /operations/routes/{route_id}","href":"/api-reference/routing-sessions/update-route"},{"title":"Assign Drivers to Route","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/drivers","href":"/api-reference/routing-sessions/assign-drivers-to-route"},{"title":"Remove Driver from Route","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /operations/routes/{route_id}/drivers/{user_id}","href":"/api-reference/routing-sessions/remove-driver-from-route"}]},{"group":"Routing Operations","pages":[{"title":"List Operations in Route","description":"List all operations of a route, ordered by step. Drivers assigned to the route can read it whatever their company.\n\n**Failure Modes:**\n- **401**: Token is missing or invalid\n- **403**: Insufficient permissions, or the route belongs to a company you cannot access\n- **404**: No route with this ID\n\n**Required Auth Scopes:**\n- `routing-operations:read`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/routes/{route_id}/operations","href":"/api-reference/routing-operations/list-operations-in-route"},{"title":"Complete Operation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/operations/{op_id}/complete","href":"/api-reference/routing-operations/complete-operation"},{"title":"Undo Operation","description":"Reopen a completed or cancelled operation: clears `completed_at` and `cancelled`. Operations added by completing it are not removed.\n\n**Failure Modes:**\n- **401**: Token is missing or invalid\n- **403**: Insufficient permissions, or you cannot manage the route's company and are not one of its drivers\n- **404**: No route with this ID, or no such operation on it\n\n**Required Auth Scopes:**\n- `routing-operations:manage`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/operations/{op_id}/undo","href":"/api-reference/routing-operations/undo-operation"},{"title":"Cancel Operation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/operations/{op_id}/cancel","href":"/api-reference/routing-operations/cancel-operation"},{"title":"Restore Operation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/operations/{op_id}/restore","href":"/api-reference/routing-operations/restore-operation"},{"title":"Generate Reroute Preview","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/reroute/generate","href":"/api-reference/routing-operations/generate-reroute-preview"},{"title":"Optimize Reroute","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/reroute/optimize","href":"/api-reference/routing-operations/optimize-reroute"},{"title":"Apply Rerouted Operations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routes/{route_id}/reroute/apply","href":"/api-reference/routing-operations/apply-rerouted-operations"}]},{"group":"Fleet Management","pages":[{"title":"List Cargo Vehicles","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/cargo-vehicles","href":"/api-reference/fleet-management/list-cargo-vehicles"},{"title":"Create Cargo Vehicle","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/cargo-vehicles","href":"/api-reference/fleet-management/create-cargo-vehicle"},{"title":"Get Cargo Vehicle by ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/cargo-vehicles/{vehicle_id}","href":"/api-reference/fleet-management/get-cargo-vehicle-by-id"},{"title":"Update Cargo Vehicle","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /operations/cargo-vehicles/{vehicle_id}","href":"/api-reference/fleet-management/update-cargo-vehicle"},{"title":"Delete Cargo Vehicle","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /operations/cargo-vehicles/{vehicle_id}","href":"/api-reference/fleet-management/delete-cargo-vehicle"},{"title":"List Depots","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/depots","href":"/api-reference/fleet-management/list-depots"},{"title":"Create Depot","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/depots","href":"/api-reference/fleet-management/create-depot"},{"title":"Get Depot by ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/depots/{depot_id}","href":"/api-reference/fleet-management/get-depot-by-id"},{"title":"Update Depot","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /operations/depots/{depot_id}","href":"/api-reference/fleet-management/update-depot"},{"title":"Delete Depot","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /operations/depots/{depot_id}","href":"/api-reference/fleet-management/delete-depot"},{"title":"Synchronize Company Stations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/stations/sync","href":"/api-reference/fleet-management/synchronize-company-stations"},{"title":"List Stations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/stations","href":"/api-reference/fleet-management/list-stations"},{"title":"Create Station","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/stations","href":"/api-reference/fleet-management/create-station"},{"title":"Get Station by ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/stations/{station_id}","href":"/api-reference/fleet-management/get-station-by-id"},{"title":"Update Station","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /operations/stations/{station_id}","href":"/api-reference/fleet-management/update-station"},{"title":"Delete Station","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /operations/stations/{station_id}","href":"/api-reference/fleet-management/delete-station"},{"title":"List Drivers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/drivers","href":"/api-reference/fleet-management/list-drivers"},{"title":"Create Driver","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/drivers","href":"/api-reference/fleet-management/create-driver"},{"title":"Get Driver by ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/drivers/{driver_id}","href":"/api-reference/fleet-management/get-driver-by-id"},{"title":"Update Driver","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /operations/drivers/{driver_id}","href":"/api-reference/fleet-management/update-driver"},{"title":"Delete Driver","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /operations/drivers/{driver_id}","href":"/api-reference/fleet-management/delete-driver"},{"title":"Get Fleet Settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /operations/fleet-settings","href":"/api-reference/fleet-management/get-fleet-settings"},{"title":"Update Fleet Settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /operations/fleet-settings","href":"/api-reference/fleet-management/update-fleet-settings"}]},{"group":"Free Float Analytics","pages":[{"title":"Get Free-Float Trip History","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/free-float/{provider}/trip_history","href":"/api-reference/free-float-analytics/get-free-float-trip-history"}]},{"group":"Live","pages":[{"title":"Get Live Fleet Status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/live/fleet-status","href":"/api-reference/live/get-live-fleet-status"},{"title":"List Live Deliveries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/live/deliveries","href":"/api-reference/live/list-live-deliveries"},{"title":"Get Live Transit Status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/live/transit/status","href":"/api-reference/live/get-live-transit-status"},{"title":"Get Live Transit Line","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/live/transit/lines/{route_id}","href":"/api-reference/live/get-live-transit-line"}]},{"group":"Station Based Analytics","pages":[{"title":"Get Station Summary Metrics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/summary_metrics","href":"/api-reference/station-based-analytics/get-station-summary-metrics"},{"title":"Get Vehicle Shortage Mapping","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/vehicle_shortage_mapping","href":"/api-reference/station-based-analytics/get-vehicle-shortage-mapping"},{"title":"Get Commuting Station Analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/commuting_stations","href":"/api-reference/station-based-analytics/get-commuting-station-analysis"},{"title":"Get Missed Demand Estimation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/missed_demand","href":"/api-reference/station-based-analytics/get-missed-demand-estimation"},{"title":"Get Station Refill Time Analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/refill_times","href":"/api-reference/station-based-analytics/get-station-refill-time-analysis"},{"title":"Get Competitor Opportunity Analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/competitor_opportunities","href":"/api-reference/station-based-analytics/get-competitor-opportunity-analysis"},{"title":"Get Deployment Window Optimization","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/deployment_windows","href":"/api-reference/station-based-analytics/get-deployment-window-optimization"},{"title":"Get Station Trip Volume Analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/trip_volume","href":"/api-reference/station-based-analytics/get-station-trip-volume-analysis"},{"title":"Get Demand Growth Trends","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/growth_trends","href":"/api-reference/station-based-analytics/get-demand-growth-trends"},{"title":"Get Calendar Event Impact Analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/calendar_events","href":"/api-reference/station-based-analytics/get-calendar-event-impact-analysis"},{"title":"Get Station Capacity Alerts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/capacity_alerts","href":"/api-reference/station-based-analytics/get-station-capacity-alerts"},{"title":"Get E-Bike Usage Pattern Analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/ebike_patterns","href":"/api-reference/station-based-analytics/get-e-bike-usage-pattern-analysis"},{"title":"Get After-Hours Demand Analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/station-based/{provider}/after_hours_demand","href":"/api-reference/station-based-analytics/get-after-hours-demand-analysis"}]},{"group":"Zone Based Analytics","pages":[{"title":"Get Zone Trip Volume","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/zone-based/{provider}/trip_volume","href":"/api-reference/zone-based-analytics/get-zone-trip-volume"},{"title":"Get Commuting Zone Analysis","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/zone-based/{provider}/commuting_zones","href":"/api-reference/zone-based-analytics/get-commuting-zone-analysis"},{"title":"Get Zone Shortage Mapping","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/zone-based/{provider}/shortage_mapping","href":"/api-reference/zone-based-analytics/get-zone-shortage-mapping"},{"title":"Get Zone Growth Trends","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/zone-based/{provider}/growth_trends","href":"/api-reference/zone-based-analytics/get-zone-growth-trends"}]},{"group":"Transit Analytics","pages":[{"title":"Get Transit Punctuality","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/analytics/transit/punctuality","href":"/api-reference/transit-analytics/get-transit-punctuality"},{"title":"Get Transit Line Details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/analytics/transit/lines/{route_id}","href":"/api-reference/transit-analytics/get-transit-line-details"},{"title":"Get Transit Service Delivery","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /copilot/analytics/transit/service-delivery","href":"/api-reference/transit-analytics/get-transit-service-delivery"}]},{"group":"Integrations","pages":[{"title":"List Fleet Vehicles","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/vehicles","href":"/api-reference/integrations/list-fleet-vehicles"},{"title":"Get Fleet Vehicle","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/vehicles/{vehicle_id}","href":"/api-reference/integrations/get-fleet-vehicle"},{"title":"List Fleet Stations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/stations","href":"/api-reference/integrations/list-fleet-stations"},{"title":"List Fleet Tasks","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/tasks","href":"/api-reference/integrations/list-fleet-tasks"},{"title":"List Vehicle Statuses","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/statuses","href":"/api-reference/integrations/list-vehicle-statuses"},{"title":"List Allowed Actions by Vehicle Type","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/actions/allowed","href":"/api-reference/integrations/list-allowed-actions-by-vehicle-type"},{"title":"List Vehicle Actions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/actions/{vehicle_id}","href":"/api-reference/integrations/list-vehicle-actions"},{"title":"List Remote Operations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/remote-operations","href":"/api-reference/integrations/list-remote-operations"},{"title":"List Custom Vehicle States","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/custom-states","href":"/api-reference/integrations/list-custom-vehicle-states"},{"title":"Set Vehicle Status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /integrations/statuses/{vehicle_id}/set","href":"/api-reference/integrations/set-vehicle-status"},{"title":"Trigger Vehicle Action","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /integrations/actions/{vehicle_id}/trigger","href":"/api-reference/integrations/trigger-vehicle-action"},{"title":"Complete Remote Operation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /integrations/remote-operations/{operation_id}/complete","href":"/api-reference/integrations/complete-remote-operation"},{"title":"Reopen Remote Operation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /integrations/remote-operations/{operation_id}/undo","href":"/api-reference/integrations/reopen-remote-operation"},{"title":"Delete Remote Operation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /integrations/remote-operations/{operation_id}","href":"/api-reference/integrations/delete-remote-operation"},{"title":"Set Vehicle Custom State","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /integrations/custom-states/{vehicle_id}/set","href":"/api-reference/integrations/set-vehicle-custom-state"},{"title":"Get Integration Availability","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /integrations/availability","href":"/api-reference/integrations/get-integration-availability"}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/myles-mcp"}]}]},"basePath":"","title":"Complete Operation - SWITCH","deploymentId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","buildId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BMn8tSe3.js","snippetPresets-Dl5ZrD9W.js","utils-CddEzDcs.js","style-to-object-BY3JEAdk.js","utils-Dym31Pnf.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-ZiqR8hPK.js","conditional-requirements-CFM0id0Q.js","cloneDeep-D3fPbylz.js","_Uint8Array-BcNtDki0.js","isObject-FP1Yky1u.js","ApiExamples-4Sf3CFhl.js","usePlaygroundInputsStore-Ck91l6q0.js","shallow-DapBSR9G.js","isEqual-Clu_sGzx.js","CodeSnippets-DAVHdSX2.js","CodeSnippet-Be6AcO_D.js","use-playground-group-access-CteWws2O.js","Page-_aL_PM_2.js","api-description-markdown-BPoPkVJQ.js","DynamicMarkdown-QJ7LkRm3.js","SectionHeading-DyxPTJti.js","MethodPill-CGjK-dNY.js","getPastedJson-C4YIGTOJ.js","Check2Icon-B7COpIZE.js","axios-CsQoIw0U.js","Markdown-Bquzb4Gw.js","AssistantPageLink-wSgGy_i5.js","dist-Bg48sGSz.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}