Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations.
Failure Modes:
401: Invalid or missing authentication credentials
403: Insufficient permissions, or routing is not enabled for your company
422: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.)
500: Internal server error during routing optimization
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.
Body
application/json
Single-vehicle routing request: the operations and the vehicle's limits.
operation_pool
Operation · object[]
required
List of operations to be considered in the routing solution
Show child attributes
start_point
Point · object
required
Starting point for the routing solution
Show child attributes
end_point
Point · object
required
Ending point for the routing solution
Show child attributes
max_duration
number
default:60
Maximum duration in minutes for the routing solution, default is 60 minutes (1 hour)
max_capacities
Max Capacities · object
Maximum capacities for the routing solution
Show child attributes
start_capacities
Start Capacities · object
Starting capacities for the routing solution
Show child attributes
start_time
string<date-time>
Starting time for the routing solution, default is the current time
must_include_vehicles
string[] | null
Optional list of vehicle IDs whose operations should be heavily prioritized. Operations targeting a vehicle in this list have their profit multiplied by 1000, making them very likely to be included in the optimized route.
refill_capacities
Refill Capacities · object | null
Total depot stock available for refilling across all stops. Positive values represent the total number of items at the depot; each refill loads the vehicle up to max_capacities, drawing from this stock until it is exhausted. Negative values mark capacities that are unloaded (dumped to 0) at the depot with no limit. Keys not present are left untouched.
Show child attributes
Example:
{ "charged_battery": 68, "empty_battery": -1 }
depot_service_time
number
default:5
Time in minutes the vehicle spends at depot per refill stop. Only used when refill_capacities is set.
max_depot_refills
integer | null
Maximum number of depot refill stops allowed. None means unlimited (bounded by max_duration). 0 disables the feature.
Response
Routing plan generated successfully with optimized sequence of operations and timing.
Represents the response structure for a redistribution request.
This schema includes a list of steps in the redistribution plan.
plan
RoutingStep · object[]
required
list of redistribution steps
Show child attributes
total_profit
number
required
Total profit achieved by the route
total_duration
number
required
Total duration of the route in minutes, including travel to/from depot
total_distance
number
required
Total distance of the route in kilometers, including travel to/from depot
unassigned_operations
Operation · object[]
Operations that couldn't be assigned to the route
Show child attributes
utilization
Utilization · object
Maximum capacity usage for each capacity type during the route
{"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/switchsrl-stage/q2Qy6e_N_m85PgIF/logo/switch-wordmark-ink.svg?fit=max\u0026auto=format\u0026n=q2Qy6e_N_m85PgIF\u0026q=85\u0026s=83a9625c685d993be0e8a51c68c0aee6","dark":"https://mintcdn.com/switchsrl-stage/q2Qy6e_N_m85PgIF/logo/switch-wordmark-white.png?fit=max\u0026auto=format\u0026n=q2Qy6e_N_m85PgIF\u0026q=85\u0026s=cb194173a9e2bccf4640045f35a2a87f","href":"https://getswitch.io"},"favicon":"https://mintcdn.com/switchsrl-stage/q2Qy6e_N_m85PgIF/favicon.png?fit=max\u0026auto=format\u0026n=q2Qy6e_N_m85PgIF\u0026q=85\u0026s=594ed1f74ed3ae7cef44edc0e0f34df4","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":"switchsrl-stage","hasAudioNarration":false,"actualSubdomain":"switchsrl-stage","customDomains":[],"gitSource":{"type":"github","owner":"switch-street-witcher","repo":"switch-api","deployBranch":"stage","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b0d7bf4d778254279acca0f"},"entitlements":{},"buildId":"6b0d7c46d778254279acd4e8","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":false,"hasWebMcpPermissions":false,"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/solve-routing-optimization","slug":"/api-reference/routing/solve-routing-optimization","pageMetadata":{"title":"Solve Routing Optimization","description":"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations.\n\n**Failure Modes:**\n- **401**: Invalid or missing authentication credentials\n- **403**: Insufficient permissions, or routing is not enabled for your company\n- **422**: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.)\n- **500**: Internal server error during routing optimization\n\n**Required Auth Scopes:**\n- `redistribution:read`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routing","href":"/api-reference/routing/solve-routing-optimization","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: [_jsx(_components.p, {\n children: \"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations.\"\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 }), \": Invalid or missing authentication credentials\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"403\"\n }), \": Insufficient permissions, or routing is not enabled for your company\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"422\"\n }), \": Invalid request data that fails validation (invalid coordinates, negative capacities, etc.)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"500\"\n }), \": Internal server error during routing optimization\"]\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: \"redistribution:read\"\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":"Solve Routing Optimization","description":"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations.\n\n**Failure Modes:**\n- **401**: Invalid or missing authentication credentials\n- **403**: Insufficient permissions, or routing is not enabled for your company\n- **422**: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.)\n- **500**: Internal server error during routing optimization\n\n**Required Auth Scopes:**\n- `redistribution:read`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /operations/routing","href":"/api-reference/routing/solve-routing-optimization","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Routing"],"summary":"Solve Routing Optimization","description":"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations.\n\n**Failure Modes:**\n- **401**: Invalid or missing authentication credentials\n- **403**: Insufficient permissions, or routing is not enabled for your company\n- **422**: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.)\n- **500**: Internal server error during routing optimization\n\n**Required Auth Scopes:**\n- `redistribution:read`","operationId":"solve_routing","requestBody":"400b91e9-1207-43ae-aa54-fab8cf0bf8f7","responses":{"200":"7d031174-e201-41d9-9c3c-cf0aed47d5a9","401":"66d11124-84c5-437b-b7f4-90e961510201","403":"fc9cc7d6-90b1-48f0-a077-be774fe4448e","422":"a1d942dc-4b4c-4fc9-9773-32fb17683499","500":"fb80cffb-a8c9-4ece-8d8a-f6e63faee302"},"security":["9855a745-a119-4fb9-9c42-87908551ea96","bfb6b03b-176a-400a-b60e-e724e4a65732"],"method":"post","type":"path","servers":["3e069aac-8807-4f2b-8fbd-901b66759f89"],"path":"/operations/routing","baseUrlOptions":["https://stage-api.getswitch.io"],"title":"Solve Routing Optimization","codeSamples":[],"requestExampleLanguages":["bash","python","javascript","go"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.operation_pool.items.0.vehicle_id.oneOf.0":"acme-sc-0193","body.operation_pool.items.0.latitude":45.4642,"body.operation_pool.items.0.longitude":9.1856,"body.operation_pool.items.0.zone_id":"1042","body.operation_pool.items.0.operation_type":"battery_swap","body.operation_pool.items.0.priority":"high","body.operation_pool.items.0.priority_value":2.4,"body.operation_pool.items.0.generated_at":"2026-11-30T07:55:00Z","body.operation_pool.items.0.additional_notes.oneOf.0":"Battery level (12.0%) below threshold (20.0%)","body.operation_pool.items.0.vehicle_properties.id":"acme-sc-0193","body.operation_pool.items.0.vehicle_properties.battery_level.oneOf.0":12,"body.operation_pool.items.0.vehicle_properties.licence_plate.oneOf.0":"SC0193","body.operation_pool.items.0.vehicle_properties.lat.oneOf.0":45.4642,"body.operation_pool.items.0.vehicle_properties.lon.oneOf.0":9.1856,"body.operation_pool.items.0.vehicle_properties.vehicle_type.oneOf.0":"scooter","body.operation_pool.items.0.vehicle_properties.vehicle_model.oneOf.0":"S-200","body.operation_pool.items.0.vehicle_properties.last_seen.oneOf.0":"2026-11-30T07:50:12Z","body.operation_pool.items.0.vehicle_properties.last_moved.oneOf.0":"2026-11-30T06:41:03Z","body.operation_pool.items.0.vehicle_properties.status.oneOf.0":"available","body.operation_pool.items.1.vehicle_id.oneOf.0":"acme-sc-0457","body.operation_pool.items.1.latitude":45.4671,"body.operation_pool.items.1.longitude":9.1883,"body.operation_pool.items.1.zone_id":"1042","body.operation_pool.items.1.operation_type":"pickup","body.operation_pool.items.1.priority":"medium","body.operation_pool.items.1.priority_value":2.1,"body.operation_pool.items.1.generated_at":"2026-11-30T07:55:00Z","body.operation_pool.items.1.additional_notes.oneOf.0":"Zone surplus 1.0 vehicles (threshold: 1.5)","body.operation_pool.items.1.valid_from.oneOf.0":"2026-11-30T08:00:00Z","body.operation_pool.items.1.valid_until.oneOf.0":"2026-11-30T09:00:00Z","body.operation_pool.items.2.vehicle_id.oneOf.0":"acme-sc-0457","body.operation_pool.items.2.latitude":45.4645,"body.operation_pool.items.2.longitude":9.1992,"body.operation_pool.items.2.zone_id":"1043","body.operation_pool.items.2.operation_type":"dropoff","body.operation_pool.items.2.priority":"high","body.operation_pool.items.2.priority_value":4.8,"body.operation_pool.items.2.generated_at":"2026-11-30T07:55:00Z","body.operation_pool.items.2.additional_notes.oneOf.0":"Zone deficit 1.2 vehicles (threshold: -2.0)","body.operation_pool.items.2.valid_from.oneOf.0":"2026-11-30T09:00:00Z","body.start_point.latitude":45.4781,"body.start_point.longitude":9.2272,"body.end_point.latitude":45.4781,"body.end_point.longitude":9.2272,"body.max_duration":120,"body.max_capacities.charged_battery":10,"body.max_capacities.empty_battery":10,"body.max_capacities.vehicles":4,"body.start_capacities.charged_battery":10,"body.start_capacities.empty_battery":0,"body.start_capacities.vehicles":0,"body.start_time":"2026-11-30T08:00:00Z"}]},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"operation_pool":{"items":{"properties":{"vehicle_id":{"oneOf":[{"type":"string","title":"Vehicle Id","description":"Vehicle ID associated with the operation. Null for dropoffs generated by the suggestion strategies: a dropoff targets a zone, not a vehicle.","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].vehicle_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Vehicle Id","description":"Vehicle ID associated with the operation. Null for dropoffs generated by the suggestion strategies: a dropoff targets a zone, not a vehicle.","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].vehicle_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].vehicle_id","typeLabel":"string | null"},"latitude":{"type":"number","title":"Latitude","description":"Latitude of the operation's location","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].latitude","typeLabel":"number"},"longitude":{"type":"number","title":"Longitude","description":"Longitude of the operation's location","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].longitude","typeLabel":"number"},"zone_id":{"type":"string","title":"Zone Id","description":"Zone ID where the operation is located","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].zone_id","typeLabel":"string"},"operation_type":{"type":"string","title":"Operation Type","description":"Type of operation, e.g., pickup, dropoff, or battery swap","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].operation_type","typeLabel":"string"},"priority":{"type":"string","enum":["low","medium","high","must"],"title":"Priority","description":"Priority level of the operation, e.g., low, medium, or high","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].priority","typeLabel":"enum\u003cstring>"},"priority_value":{"type":"number","minimum":0,"title":"Priority Value","description":"Continuous profit value used by the routing solver. Computed by suggest strategies as base_profit_for_op_type * urgency_factor (urgency in [1.0, 2.0]). The 'priority' enum is metadata only, except 'must' which still triggers hard-include.","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].priority_value","typeLabel":"number"},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"Timestamp when the operation was generated","isRequired":true,"uniqueKey":"operation_pool.items.[INDEX].generated_at","typeLabel":"string\u003cdate-time>"},"additional_notes":{"oneOf":[{"type":"string","title":"Additional Notes","description":"Free-text notes about the operation, e.g. imbalance deficit or idle time.","uniqueKey":"operation_pool.items.[INDEX].additional_notes.oneOf.0","typeLabel":"string"},{"type":"null","title":"Additional Notes","description":"Free-text notes about the operation, e.g. imbalance deficit or idle time.","uniqueKey":"operation_pool.items.[INDEX].additional_notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.items.[INDEX].additional_notes","typeLabel":"string | null"},"battery_level":{"oneOf":[{"type":"number","title":"Battery Level","description":"Current battery level of the vehicle, if applicable","uniqueKey":"operation_pool.items.[INDEX].battery_level.oneOf.0","typeLabel":"number"},{"type":"null","title":"Battery Level","description":"Current battery level of the vehicle, if applicable","uniqueKey":"operation_pool.items.[INDEX].battery_level.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.items.[INDEX].battery_level","typeLabel":"number | null"},"valid_from":{"oneOf":[{"type":"string","format":"date-time","title":"Valid From","description":"Start of the validity window for this operation","uniqueKey":"operation_pool.items.[INDEX].valid_from.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Valid From","description":"Start of the validity window for this operation","uniqueKey":"operation_pool.items.[INDEX].valid_from.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.items.[INDEX].valid_from","typeLabel":"string\u003cdate-time> | null"},"valid_until":{"oneOf":[{"type":"string","format":"date-time","title":"Valid Until","description":"End of the validity window for this operation","uniqueKey":"operation_pool.items.[INDEX].valid_until.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Valid Until","description":"End of the validity window for this operation","uniqueKey":"operation_pool.items.[INDEX].valid_until.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.items.[INDEX].valid_until","typeLabel":"string\u003cdate-time> | null"},"vehicle_properties":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the vehicle","isRequired":true,"uniqueKey":"operation_pool.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":"operation_pool.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":"operation_pool.items.[INDEX].vehicle_properties.battery_level.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"operation_pool.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":"operation_pool.items.[INDEX].vehicle_properties.licence_plate.oneOf.0","typeLabel":"string"},{"type":"null","title":"Licence Plate","description":"Licence plate number of the vehicle","uniqueKey":"operation_pool.items.[INDEX].vehicle_properties.licence_plate.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.items.[INDEX].vehicle_properties.licence_plate","typeLabel":"string | null"},"lat":{"oneOf":[{"type":"number","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"operation_pool.items.[INDEX].vehicle_properties.lat.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"operation_pool.items.[INDEX].vehicle_properties.lat.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.items.[INDEX].vehicle_properties.lat","typeLabel":"number | null"},"lon":{"oneOf":[{"type":"number","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"operation_pool.items.[INDEX].vehicle_properties.lon.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"operation_pool.items.[INDEX].vehicle_properties.lon.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.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":"operation_pool.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":"operation_pool.items.[INDEX].vehicle_properties.vehicle_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.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":"operation_pool.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":"operation_pool.items.[INDEX].vehicle_properties.vehicle_model.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.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":"operation_pool.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":"operation_pool.items.[INDEX].vehicle_properties.battery_level_master.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.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":"operation_pool.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":"operation_pool.items.[INDEX].vehicle_properties.last_seen.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.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":"operation_pool.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":"operation_pool.items.[INDEX].vehicle_properties.last_moved.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.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":"operation_pool.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":"operation_pool.items.[INDEX].vehicle_properties.status.oneOf.1","typeLabel":"null"}],"uniqueKey":"operation_pool.items.[INDEX].vehicle_properties.status","typeLabel":"string | null"}},"type":"object","required":["id","battery_level"],"title":"VehicleWithoutZone","description":"Full vehicle snapshot at the time the operation was generated. Serializable to VehicleWithoutZone. Populated by suggest strategies and preserved through the routing response so callers can persist it to the DB.","uniqueKey":"operation_pool.items.[INDEX].vehicle_properties","typeLabel":"VehicleWithoutZone · object"}},"type":"object","required":["vehicle_id","latitude","longitude","zone_id","operation_type","priority","priority_value","generated_at"],"title":"Operation","description":"Represents an operation to be performed.\n\nThis schema includes details such as the operation's location, type,\npriority, and associated vehicle.","examples":[{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4671,"longitude":9.1883,"operation_type":"pickup","priority":"medium","priority_value":2.1,"valid_from":"2026-11-30T08:00:00Z","valid_until":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1042"}],"uniqueKey":"operation_pool.items.[INDEX]","typeLabel":"Operation · object"},"type":"array","title":"Operation Pool","description":"List of operations to be considered in the routing solution","isRequired":true,"uniqueKey":"operation_pool","typeLabel":"Operation · object[]"},"start_point":{"properties":{"latitude":{"type":"number","title":"Latitude","isRequired":true,"uniqueKey":"start_point.latitude","typeLabel":"number"},"longitude":{"type":"number","title":"Longitude","isRequired":true,"uniqueKey":"start_point.longitude","typeLabel":"number"}},"type":"object","required":["latitude","longitude"],"title":"Point","description":"Starting point for the routing solution","isRequired":true,"uniqueKey":"start_point","typeLabel":"Point · object"},"end_point":{"properties":{"latitude":{"type":"number","title":"Latitude","isRequired":true,"uniqueKey":"end_point.latitude","typeLabel":"number"},"longitude":{"type":"number","title":"Longitude","isRequired":true,"uniqueKey":"end_point.longitude","typeLabel":"number"}},"type":"object","required":["latitude","longitude"],"title":"Point","description":"Ending point for the routing solution","isRequired":true,"uniqueKey":"end_point","typeLabel":"Point · object"},"max_duration":{"type":"number","title":"Max Duration","description":"Maximum duration in minutes for the routing solution, default is 60 minutes (1 hour)","default":60,"uniqueKey":"max_duration","typeLabel":"number"},"max_capacities":{"additionalProperties":{"type":"integer","uniqueKey":"max_capacities.additionalProperties","typeLabel":"integer"},"propertyNames":{"enum":["vehicles","charged_battery","empty_battery","space"]},"type":"object","title":"Max Capacities","description":"Maximum capacities for the routing solution","default":{"vehicles":1,"charged_battery":10,"empty_battery":10},"uniqueKey":"max_capacities","typeLabel":"Max Capacities · object"},"start_capacities":{"additionalProperties":{"type":"integer","uniqueKey":"start_capacities.additionalProperties","typeLabel":"integer"},"propertyNames":{"enum":["vehicles","charged_battery","empty_battery","space"]},"type":"object","title":"Start Capacities","description":"Starting capacities for the routing solution","default":{"vehicles":0,"charged_battery":10,"empty_battery":0},"uniqueKey":"start_capacities","typeLabel":"Start Capacities · object"},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"Starting time for the routing solution, default is the current time","uniqueKey":"start_time","typeLabel":"string\u003cdate-time>"},"must_include_vehicles":{"oneOf":[{"items":{"type":"string","uniqueKey":"must_include_vehicles.oneOf.0.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Must Include Vehicles","description":"Optional list of vehicle IDs whose operations should be heavily prioritized. Operations targeting a vehicle in this list have their profit multiplied by 1000, making them very likely to be included in the optimized route.","uniqueKey":"must_include_vehicles.oneOf.0","typeLabel":"string[]"},{"items":{"type":"string"},"type":"null","title":"Must Include Vehicles","description":"Optional list of vehicle IDs whose operations should be heavily prioritized. Operations targeting a vehicle in this list have their profit multiplied by 1000, making them very likely to be included in the optimized route.","uniqueKey":"must_include_vehicles.oneOf.1","typeLabel":"null"}],"uniqueKey":"must_include_vehicles","typeLabel":"string[] | null"},"refill_capacities":{"oneOf":[{"additionalProperties":{"type":"integer","uniqueKey":"refill_capacities.oneOf.0.additionalProperties","typeLabel":"integer"},"propertyNames":{"enum":["vehicles","charged_battery","empty_battery","space"]},"type":"object","title":"Refill Capacities","description":"Total depot stock available for refilling across all stops. Positive values represent the total number of items at the depot; each refill loads the vehicle up to max_capacities, drawing from this stock until it is exhausted. Negative values mark capacities that are unloaded (dumped to 0) at the depot with no limit. Keys not present are left untouched.","examples":[{"charged_battery":68,"empty_battery":-1}],"uniqueKey":"refill_capacities.oneOf.0","typeLabel":"Refill Capacities · object"},{"additionalProperties":{"type":"integer","uniqueKey":"refill_capacities.oneOf.1.additionalProperties","typeLabel":"integer"},"propertyNames":{"enum":["vehicles","charged_battery","empty_battery","space"]},"type":"null","title":"Refill Capacities","description":"Total depot stock available for refilling across all stops. Positive values represent the total number of items at the depot; each refill loads the vehicle up to max_capacities, drawing from this stock until it is exhausted. Negative values mark capacities that are unloaded (dumped to 0) at the depot with no limit. Keys not present are left untouched.","examples":[{"charged_battery":68,"empty_battery":-1}],"uniqueKey":"refill_capacities.oneOf.1","typeLabel":"null"}],"uniqueKey":"refill_capacities","typeLabel":"Refill Capacities · object | null"},"depot_service_time":{"type":"number","title":"Depot Service Time","description":"Time in minutes the vehicle spends at depot per refill stop. Only used when refill_capacities is set.","default":5,"uniqueKey":"depot_service_time","typeLabel":"number"},"max_depot_refills":{"oneOf":[{"type":"integer","title":"Max Depot Refills","description":"Maximum number of depot refill stops allowed. None means unlimited (bounded by max_duration). 0 disables the feature.","uniqueKey":"max_depot_refills.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Depot Refills","description":"Maximum number of depot refill stops allowed. None means unlimited (bounded by max_duration). 0 disables the feature.","uniqueKey":"max_depot_refills.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_depot_refills","typeLabel":"integer | null"}},"type":"object","required":["operation_pool","start_point","end_point"],"title":"RoutingPayload","description":"Single-vehicle routing request: the operations and the vehicle's limits.","examples":[{"end_point":{"latitude":45.4781,"longitude":9.2272},"max_capacities":{"charged_battery":10,"empty_battery":10,"vehicles":4},"max_duration":120,"operation_pool":[{"additional_notes":"Battery level (12.0%) below threshold (20.0%)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4642,"longitude":9.1856,"operation_type":"battery_swap","priority":"high","priority_value":2.4,"vehicle_id":"acme-sc-0193","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"},"zone_id":"1042"},{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4671,"longitude":9.1883,"operation_type":"pickup","priority":"medium","priority_value":2.1,"valid_from":"2026-11-30T08:00:00Z","valid_until":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1042"},{"additional_notes":"Zone deficit 1.2 vehicles (threshold: -2.0)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4645,"longitude":9.1992,"operation_type":"dropoff","priority":"high","priority_value":4.8,"valid_from":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1043"}],"start_capacities":{"charged_battery":10,"empty_battery":0,"vehicles":0},"start_point":{"latitude":45.4781,"longitude":9.2272},"start_time":"2026-11-30T08:00:00Z"}],"uniqueKey":"","typeLabel":"RoutingPayload · object"},"examples":{"Example":{"title":"Example","value":{"end_point":{"latitude":45.4781,"longitude":9.2272},"max_capacities":{"charged_battery":10,"empty_battery":10,"vehicles":4},"max_duration":120,"operation_pool":[{"additional_notes":"Battery level (12.0%) below threshold (20.0%)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4642,"longitude":9.1856,"operation_type":"battery_swap","priority":"high","priority_value":2.4,"vehicle_id":"acme-sc-0193","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"},"zone_id":"1042"},{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4671,"longitude":9.1883,"operation_type":"pickup","priority":"medium","priority_value":2.1,"valid_from":"2026-11-30T08:00:00Z","valid_until":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1042"},{"additional_notes":"Zone deficit 1.2 vehicles (threshold: -2.0)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4645,"longitude":9.1992,"operation_type":"dropoff","priority":"high","priority_value":4.8,"valid_from":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1043"}],"start_capacities":{"charged_battery":10,"empty_battery":0,"vehicles":0},"start_point":{"latitude":45.4781,"longitude":9.2272},"start_time":"2026-11-30T08:00:00Z"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"7d031174-e201-41d9-9c3c-cf0aed47d5a9":{"description":"Routing plan generated successfully with optimized sequence of operations and timing.","content":{"application/json":{"schema":{"properties":{"plan":{"items":{"properties":{"operation":{"properties":{"vehicle_id":{"oneOf":[{"type":"string","title":"Vehicle Id","description":"Vehicle ID associated with the operation. Null for dropoffs generated by the suggestion strategies: a dropoff targets a zone, not a vehicle.","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.vehicle_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Vehicle Id","description":"Vehicle ID associated with the operation. Null for dropoffs generated by the suggestion strategies: a dropoff targets a zone, not a vehicle.","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.vehicle_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.vehicle_id","typeLabel":"string | null"},"latitude":{"type":"number","title":"Latitude","description":"Latitude of the operation's location","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.latitude","typeLabel":"number"},"longitude":{"type":"number","title":"Longitude","description":"Longitude of the operation's location","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.longitude","typeLabel":"number"},"zone_id":{"type":"string","title":"Zone Id","description":"Zone ID where the operation is located","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.zone_id","typeLabel":"string"},"operation_type":{"type":"string","title":"Operation Type","description":"Type of operation, e.g., pickup, dropoff, or battery swap","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.operation_type","typeLabel":"string"},"priority":{"type":"string","enum":["low","medium","high","must"],"title":"Priority","description":"Priority level of the operation, e.g., low, medium, or high","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.priority","typeLabel":"enum\u003cstring>"},"priority_value":{"type":"number","minimum":0,"title":"Priority Value","description":"Continuous profit value used by the routing solver. Computed by suggest strategies as base_profit_for_op_type * urgency_factor (urgency in [1.0, 2.0]). The 'priority' enum is metadata only, except 'must' which still triggers hard-include.","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.priority_value","typeLabel":"number"},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"Timestamp when the operation was generated","isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.generated_at","typeLabel":"string\u003cdate-time>"},"additional_notes":{"oneOf":[{"type":"string","title":"Additional Notes","description":"Free-text notes about the operation, e.g. imbalance deficit or idle time.","uniqueKey":"plan.items.[INDEX].operation.additional_notes.oneOf.0","typeLabel":"string"},{"type":"null","title":"Additional Notes","description":"Free-text notes about the operation, e.g. imbalance deficit or idle time.","uniqueKey":"plan.items.[INDEX].operation.additional_notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].operation.additional_notes","typeLabel":"string | null"},"battery_level":{"oneOf":[{"type":"number","title":"Battery Level","description":"Current battery level of the vehicle, if applicable","uniqueKey":"plan.items.[INDEX].operation.battery_level.oneOf.0","typeLabel":"number"},{"type":"null","title":"Battery Level","description":"Current battery level of the vehicle, if applicable","uniqueKey":"plan.items.[INDEX].operation.battery_level.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].operation.battery_level","typeLabel":"number | null"},"valid_from":{"oneOf":[{"type":"string","format":"date-time","title":"Valid From","description":"Start of the validity window for this operation","uniqueKey":"plan.items.[INDEX].operation.valid_from.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Valid From","description":"Start of the validity window for this operation","uniqueKey":"plan.items.[INDEX].operation.valid_from.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].operation.valid_from","typeLabel":"string\u003cdate-time> | null"},"valid_until":{"oneOf":[{"type":"string","format":"date-time","title":"Valid Until","description":"End of the validity window for this operation","uniqueKey":"plan.items.[INDEX].operation.valid_until.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Valid Until","description":"End of the validity window for this operation","uniqueKey":"plan.items.[INDEX].operation.valid_until.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].operation.valid_until","typeLabel":"string\u003cdate-time> | null"},"vehicle_properties":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the vehicle","isRequired":true,"uniqueKey":"plan.items.[INDEX].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":"plan.items.[INDEX].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":"plan.items.[INDEX].operation.vehicle_properties.battery_level.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.battery_level","typeLabel":"integer | null"},"licence_plate":{"oneOf":[{"type":"string","title":"Licence Plate","description":"Licence plate number of the vehicle","uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.licence_plate.oneOf.0","typeLabel":"string"},{"type":"null","title":"Licence Plate","description":"Licence plate number of the vehicle","uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.licence_plate.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.licence_plate","typeLabel":"string | null"},"lat":{"oneOf":[{"type":"number","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.lat.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.lat.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.lat","typeLabel":"number | null"},"lon":{"oneOf":[{"type":"number","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.lon.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.lon.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].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":"plan.items.[INDEX].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":"plan.items.[INDEX].operation.vehicle_properties.vehicle_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].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":"plan.items.[INDEX].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":"plan.items.[INDEX].operation.vehicle_properties.vehicle_model.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].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":"plan.items.[INDEX].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":"plan.items.[INDEX].operation.vehicle_properties.battery_level_master.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].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":"plan.items.[INDEX].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":"plan.items.[INDEX].operation.vehicle_properties.last_seen.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].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":"plan.items.[INDEX].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":"plan.items.[INDEX].operation.vehicle_properties.last_moved.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].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":"plan.items.[INDEX].operation.vehicle_properties.status.oneOf.0","typeLabel":"string"},{"type":"null","title":"Status","description":"Current status of the vehicle, e.g., 'available', 'in-use'","uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.status.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.items.[INDEX].operation.vehicle_properties.status","typeLabel":"string | null"}},"type":"object","required":["id","battery_level"],"title":"VehicleWithoutZone","description":"Full vehicle snapshot at the time the operation was generated. Serializable to VehicleWithoutZone. Populated by suggest strategies and preserved through the routing response so callers can persist it to the DB.","uniqueKey":"plan.items.[INDEX].operation.vehicle_properties","typeLabel":"VehicleWithoutZone · object"}},"type":"object","required":["vehicle_id","latitude","longitude","zone_id","operation_type","priority","priority_value","generated_at"],"title":"Operation","description":"Operation to be performed in this step","examples":[{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4671,"longitude":9.1883,"operation_type":"pickup","priority":"medium","priority_value":2.1,"valid_from":"2026-11-30T08:00:00Z","valid_until":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1042"}],"isRequired":true,"uniqueKey":"plan.items.[INDEX].operation","typeLabel":"Operation · object"},"step":{"type":"integer","title":"Step","description":"Step number in the redistribution plan","isRequired":true,"uniqueKey":"plan.items.[INDEX].step","typeLabel":"integer"},"expected_arrival":{"type":"string","format":"date-time","title":"Expected Arrival","description":"Expected arrival time at the operation location","isRequired":true,"uniqueKey":"plan.items.[INDEX].expected_arrival","typeLabel":"string\u003cdate-time>"},"routing_parameters":{"additionalProperties":true,"type":"object","title":"Routing Parameters","description":"Routing parameters for this step","examples":[{"capacity_delta":{"charged_battery":0,"empty_battery":0,"vehicles":1},"profit":3}],"isRequired":true,"uniqueKey":"plan.items.[INDEX].routing_parameters","typeLabel":"Routing Parameters · object"}},"type":"object","required":["operation","step","expected_arrival","routing_parameters"],"title":"RoutingStep","description":"Represents a single step in a redistribution plan.\n\nThis schema includes details about the vehicle, its target zone, and\nthe operation to be performed.","uniqueKey":"plan.items.[INDEX]","typeLabel":"RoutingStep · object"},"type":"array","title":"Plan","description":"list of redistribution steps","isRequired":true,"uniqueKey":"plan","typeLabel":"RoutingStep · object[]"},"total_profit":{"type":"number","title":"Total Profit","description":"Total profit achieved by the route","isRequired":true,"uniqueKey":"total_profit","typeLabel":"number"},"total_duration":{"type":"number","title":"Total Duration","description":"Total duration of the route in minutes, including travel to/from depot","isRequired":true,"uniqueKey":"total_duration","typeLabel":"number"},"total_distance":{"type":"number","title":"Total Distance","description":"Total distance of the route in kilometers, including travel to/from depot","isRequired":true,"uniqueKey":"total_distance","typeLabel":"number"},"unassigned_operations":{"items":{"properties":{"vehicle_id":{"oneOf":[{"type":"string","title":"Vehicle Id","description":"Vehicle ID associated with the operation. Null for dropoffs generated by the suggestion strategies: a dropoff targets a zone, not a vehicle.","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].vehicle_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Vehicle Id","description":"Vehicle ID associated with the operation. Null for dropoffs generated by the suggestion strategies: a dropoff targets a zone, not a vehicle.","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].vehicle_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].vehicle_id","typeLabel":"string | null"},"latitude":{"type":"number","title":"Latitude","description":"Latitude of the operation's location","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].latitude","typeLabel":"number"},"longitude":{"type":"number","title":"Longitude","description":"Longitude of the operation's location","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].longitude","typeLabel":"number"},"zone_id":{"type":"string","title":"Zone Id","description":"Zone ID where the operation is located","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].zone_id","typeLabel":"string"},"operation_type":{"type":"string","title":"Operation Type","description":"Type of operation, e.g., pickup, dropoff, or battery swap","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].operation_type","typeLabel":"string"},"priority":{"type":"string","enum":["low","medium","high","must"],"title":"Priority","description":"Priority level of the operation, e.g., low, medium, or high","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].priority","typeLabel":"enum\u003cstring>"},"priority_value":{"type":"number","minimum":0,"title":"Priority Value","description":"Continuous profit value used by the routing solver. Computed by suggest strategies as base_profit_for_op_type * urgency_factor (urgency in [1.0, 2.0]). The 'priority' enum is metadata only, except 'must' which still triggers hard-include.","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].priority_value","typeLabel":"number"},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"Timestamp when the operation was generated","isRequired":true,"uniqueKey":"unassigned_operations.items.[INDEX].generated_at","typeLabel":"string\u003cdate-time>"},"additional_notes":{"oneOf":[{"type":"string","title":"Additional Notes","description":"Free-text notes about the operation, e.g. imbalance deficit or idle time.","uniqueKey":"unassigned_operations.items.[INDEX].additional_notes.oneOf.0","typeLabel":"string"},{"type":"null","title":"Additional Notes","description":"Free-text notes about the operation, e.g. imbalance deficit or idle time.","uniqueKey":"unassigned_operations.items.[INDEX].additional_notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.items.[INDEX].additional_notes","typeLabel":"string | null"},"battery_level":{"oneOf":[{"type":"number","title":"Battery Level","description":"Current battery level of the vehicle, if applicable","uniqueKey":"unassigned_operations.items.[INDEX].battery_level.oneOf.0","typeLabel":"number"},{"type":"null","title":"Battery Level","description":"Current battery level of the vehicle, if applicable","uniqueKey":"unassigned_operations.items.[INDEX].battery_level.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.items.[INDEX].battery_level","typeLabel":"number | null"},"valid_from":{"oneOf":[{"type":"string","format":"date-time","title":"Valid From","description":"Start of the validity window for this operation","uniqueKey":"unassigned_operations.items.[INDEX].valid_from.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Valid From","description":"Start of the validity window for this operation","uniqueKey":"unassigned_operations.items.[INDEX].valid_from.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.items.[INDEX].valid_from","typeLabel":"string\u003cdate-time> | null"},"valid_until":{"oneOf":[{"type":"string","format":"date-time","title":"Valid Until","description":"End of the validity window for this operation","uniqueKey":"unassigned_operations.items.[INDEX].valid_until.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","title":"Valid Until","description":"End of the validity window for this operation","uniqueKey":"unassigned_operations.items.[INDEX].valid_until.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.items.[INDEX].valid_until","typeLabel":"string\u003cdate-time> | null"},"vehicle_properties":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the vehicle","isRequired":true,"uniqueKey":"unassigned_operations.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":"unassigned_operations.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":"unassigned_operations.items.[INDEX].vehicle_properties.battery_level.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"unassigned_operations.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":"unassigned_operations.items.[INDEX].vehicle_properties.licence_plate.oneOf.0","typeLabel":"string"},{"type":"null","title":"Licence Plate","description":"Licence plate number of the vehicle","uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties.licence_plate.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties.licence_plate","typeLabel":"string | null"},"lat":{"oneOf":[{"type":"number","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties.lat.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lat","description":"Latitude of the vehicle's current location","uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties.lat.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties.lat","typeLabel":"number | null"},"lon":{"oneOf":[{"type":"number","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties.lon.oneOf.0","typeLabel":"number"},{"type":"null","title":"Lon","description":"Longitude of the vehicle's current location","uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties.lon.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.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":"unassigned_operations.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":"unassigned_operations.items.[INDEX].vehicle_properties.vehicle_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.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":"unassigned_operations.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":"unassigned_operations.items.[INDEX].vehicle_properties.vehicle_model.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.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":"unassigned_operations.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":"unassigned_operations.items.[INDEX].vehicle_properties.battery_level_master.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.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":"unassigned_operations.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":"unassigned_operations.items.[INDEX].vehicle_properties.last_seen.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.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":"unassigned_operations.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":"unassigned_operations.items.[INDEX].vehicle_properties.last_moved.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.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":"unassigned_operations.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":"unassigned_operations.items.[INDEX].vehicle_properties.status.oneOf.1","typeLabel":"null"}],"uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties.status","typeLabel":"string | null"}},"type":"object","required":["id","battery_level"],"title":"VehicleWithoutZone","description":"Full vehicle snapshot at the time the operation was generated. Serializable to VehicleWithoutZone. Populated by suggest strategies and preserved through the routing response so callers can persist it to the DB.","uniqueKey":"unassigned_operations.items.[INDEX].vehicle_properties","typeLabel":"VehicleWithoutZone · object"}},"type":"object","required":["vehicle_id","latitude","longitude","zone_id","operation_type","priority","priority_value","generated_at"],"title":"Operation","description":"Represents an operation to be performed.\n\nThis schema includes details such as the operation's location, type,\npriority, and associated vehicle.","examples":[{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4671,"longitude":9.1883,"operation_type":"pickup","priority":"medium","priority_value":2.1,"valid_from":"2026-11-30T08:00:00Z","valid_until":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1042"}],"uniqueKey":"unassigned_operations.items.[INDEX]","typeLabel":"Operation · object"},"type":"array","title":"Unassigned Operations","description":"Operations that couldn't be assigned to the route","uniqueKey":"unassigned_operations","typeLabel":"Operation · object[]"},"utilization":{"additionalProperties":{"type":"integer","uniqueKey":"utilization.additionalProperties","typeLabel":"integer"},"propertyNames":{"enum":["vehicles","charged_battery","empty_battery","space"]},"type":"object","title":"Utilization","description":"Maximum capacity usage for each capacity type during the route","examples":[{"charged_battery":6,"empty_battery":4,"vehicles":8}],"uniqueKey":"utilization","typeLabel":"Utilization · object"}},"type":"object","required":["plan","total_profit","total_duration","total_distance"],"title":"RoutingResponse","description":"Represents the response structure for a redistribution request.\n\nThis schema includes a list of steps in the redistribution plan.","examples":[{"plan":[{"expected_arrival":"2026-11-30T08:14:00Z","operation":{"additional_notes":"Battery level (12.0%) below threshold (20.0%)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4642,"longitude":9.1856,"operation_type":"battery_swap","priority":"high","priority_value":2.4,"vehicle_id":"acme-sc-0193","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"},"zone_id":"1042"},"routing_parameters":{"capacity_delta":{"charged_battery":-1,"empty_battery":1},"profit":2.4},"step":0},{"expected_arrival":"2026-11-30T08:23:00Z","operation":{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4671,"longitude":9.1883,"operation_type":"pickup","priority":"medium","priority_value":2.1,"valid_from":"2026-11-30T08:00:00Z","valid_until":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1042"},"routing_parameters":{"capacity_delta":{"vehicles":1},"profit":2.1},"step":1},{"expected_arrival":"2026-11-30T09:02:00Z","operation":{"additional_notes":"Zone deficit 1.2 vehicles (threshold: -2.0)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4645,"longitude":9.1992,"operation_type":"dropoff","priority":"high","priority_value":4.8,"valid_from":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1043"},"routing_parameters":{"capacity_delta":{"vehicles":-1},"profit":4.8},"step":2}],"total_distance":14.2,"total_duration":78.5,"total_profit":9.3,"unassigned_operations":[],"utilization":{"charged_battery":10,"empty_battery":1,"vehicles":1}}],"uniqueKey":"","typeLabel":"RoutingResponse · object"},"examples":{"Example":{"title":"Example","value":{"plan":[{"expected_arrival":"2026-11-30T08:14:00Z","operation":{"additional_notes":"Battery level (12.0%) below threshold (20.0%)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4642,"longitude":9.1856,"operation_type":"battery_swap","priority":"high","priority_value":2.4,"vehicle_id":"acme-sc-0193","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"},"zone_id":"1042"},"routing_parameters":{"capacity_delta":{"charged_battery":-1,"empty_battery":1},"profit":2.4},"step":0},{"expected_arrival":"2026-11-30T08:23:00Z","operation":{"additional_notes":"Zone surplus 1.0 vehicles (threshold: 1.5)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4671,"longitude":9.1883,"operation_type":"pickup","priority":"medium","priority_value":2.1,"valid_from":"2026-11-30T08:00:00Z","valid_until":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1042"},"routing_parameters":{"capacity_delta":{"vehicles":1},"profit":2.1},"step":1},{"expected_arrival":"2026-11-30T09:02:00Z","operation":{"additional_notes":"Zone deficit 1.2 vehicles (threshold: -2.0)","generated_at":"2026-11-30T07:55:00Z","latitude":45.4645,"longitude":9.1992,"operation_type":"dropoff","priority":"high","priority_value":4.8,"valid_from":"2026-11-30T09:00:00Z","vehicle_id":"acme-sc-0457","zone_id":"1043"},"routing_parameters":{"capacity_delta":{"vehicles":-1},"profit":4.8},"step":2}],"total_distance":14.2,"total_duration":78.5,"total_profit":9.3,"unassigned_operations":[],"utilization":{"charged_battery":10,"empty_battery":1,"vehicles":1}}}},"exampleType":"generated"}},"exampleType":"generated"},"66d11124-84c5-437b-b7f4-90e961510201":{"description":"Unauthorized. Invalid or missing credentials.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"fc9cc7d6-90b1-48f0-a077-be774fe4448e":{"description":"Forbidden. Insufficient permissions, or routing is not enabled for your company.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"a1d942dc-4b4c-4fc9-9773-32fb17683499":{"description":"Unprocessable Entity. Invalid request data such as invalid coordinates, negative capacities, or malformed operations.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"fb80cffb-a8c9-4ece-8d8a-f6e63faee302":{"description":"Internal Server Error. Unexpected error during routing optimization or system failure.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"9855a745-a119-4fb9-9c42-87908551ea96":{"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"}},"bfb6b03b-176a-400a-b60e-e724e4a65732":{"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":{"3e069aac-8807-4f2b-8fbd-901b66759f89":{"url":"https://stage-api.getswitch.io","description":"Stage"}},"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":"switchsrl-stage","siteName":"SWITCH","title":"Solve Routing Optimization - SWITCH","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-30T13:38:23.059Z","originalFileLocation":"api-reference/routing/solve-routing-optimization.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=\"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations. Failure Modes: - 401: Invalid or missing authentication credentials - 403: Insufficient permissions, or routing is not enabled for your company - 422: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.) - 500: Internal server error during routing optimization Required Auth Scopes: - redistribution:read\">\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/switchsrl-stage/JTXLLi80I0McEXEm/_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/switchsrl-stage/JTXLLi80I0McEXEm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/switchsrl-stage/JTXLLi80I0McEXEm/_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/switchsrl-stage/JTXLLi80I0McEXEm/_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/switchsrl-stage/JTXLLi80I0McEXEm/_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/switchsrl-stage/JTXLLi80I0McEXEm/_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/switchsrl-stage/JTXLLi80I0McEXEm/_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/switchsrl-stage/JTXLLi80I0McEXEm/_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/switchsrl-stage/JTXLLi80I0McEXEm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Solve Routing Optimization - SWITCH\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations. Failure Modes: - 401: Invalid or missing authentication credentials - 403: Insufficient permissions, or routing is not enabled for your company - 422: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.) - 500: Internal server error during routing optimization Required Auth Scopes: - redistribution:read\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SWITCH\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://switchsrl-stage.mintlify.site/_mintlify/api/og/v2?division=Routing\u0026amp;title=Solve+Routing+Optimization\u0026amp;description=Generate+an+optimized+routing+plan+for+a+vehicle+to+efficiently+execute+a+pool+of+operations+within+specified+constraints.+This+endpoint+uses+vehicle+routing+al\u0026amp;theme=18a078e79863f23e2770fc78\u0026amp;signature=9670411e01d0d0ecbd450a59bdc19cee1bbab72d77d26947b3fc3051318571ec\">\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=\"Solve Routing Optimization - SWITCH\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations. Failure Modes: - 401: Invalid or missing authentication credentials - 403: Insufficient permissions, or routing is not enabled for your company - 422: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.) - 500: Internal server error during routing optimization Required Auth Scopes: - redistribution:read\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://switchsrl-stage.mintlify.site/_mintlify/api/og/v2?division=Routing\u0026amp;title=Solve+Routing+Optimization\u0026amp;description=Generate+an+optimized+routing+plan+for+a+vehicle+to+efficiently+execute+a+pool+of+operations+within+specified+constraints.+This+endpoint+uses+vehicle+routing+al\u0026amp;theme=18a078e79863f23e2770fc78\u0026amp;signature=9670411e01d0d0ecbd450a59bdc19cee1bbab72d77d26947b3fc3051318571ec\">\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/switchsrl-stage/JTXLLi80I0McEXEm/_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://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization\">\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/solve-routing-optimization.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://switchsrl-stage.mintlify.app/#organization\",\"name\":\"SWITCH\",\"url\":\"https://switchsrl-stage.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/switchsrl-stage/q2Qy6e_N_m85PgIF/logo/switch-wordmark-ink.svg?fit=max\u0026auto=format\u0026n=q2Qy6e_N_m85PgIF\u0026q=85\u0026s=83a9625c685d993be0e8a51c68c0aee6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://switchsrl-stage.mintlify.app#website\",\"name\":\"SWITCH\",\"url\":\"https://switchsrl-stage.mintlify.app\",\"publisher\":{\"@id\":\"https://switchsrl-stage.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization#webpage\",\"url\":\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization\",\"name\":\"Solve Routing Optimization\",\"description\":\"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations. Failure Modes: - 401: Invalid or missing authentication credentials - 403: Insufficient permissions, or routing is not enabled for your company - 422: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.) - 500: Internal server error during routing optimization Required Auth Scopes: - redistribution:read\",\"dateModified\":\"2026-11-30T13:38:23.059Z\",\"isPartOf\":{\"@id\":\"https://switchsrl-stage.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SWITCH\",\"item\":\"https://switchsrl-stage.mintlify.app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Solve Routing Optimization\",\"item\":\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization#apireference\",\"headline\":\"Solve Routing Optimization\",\"name\":\"Solve Routing Optimization\",\"description\":\"Generate an optimized routing plan for a vehicle to efficiently execute a pool of operations within specified constraints. This endpoint uses vehicle routing algorithms to determine the best sequence of operations considering capacity limits, time constraints, and geographic locations. Failure Modes: - 401: Invalid or missing authentication credentials - 403: Insufficient permissions, or routing is not enabled for your company - 422: Invalid request data that fails validation (invalid coordinates, negative capacities, etc.) - 500: Internal server error during routing optimization Required Auth Scopes: - redistribution:read\",\"url\":\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization\",\"mainEntityOfPage\":{\"@id\":\"https://switchsrl-stage.mintlify.app/api-reference/routing/solve-routing-optimization#webpage\"},\"dateModified\":\"2026-11-30T13:38:23.059Z\",\"publisher\":{\"@id\":\"https://switchsrl-stage.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://switchsrl-stage.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/solve-routing-optimization.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","description":"Generate a list of tasks based on provided strategies, sorting criteria, and filtering conditions. This endpoint processes multiple strategies to create actionable tasks for vehicle operations and zone management.\n\nEach strategy can define:\n- Zone filtering with whitelist/blacklist\n- Vehicle and zone conditions using logical operators\n- Custom sorting criteria\n- Strategy-specific parameters\n\n**Failure Modes:**\n- **400**: Location, granularity or grid not enabled for your company\n- **401**: Invalid or missing authentication credentials\n- **403**: Insufficient permissions\n- **404**: Your company has no fleet or forecasts configured\n- **422**: Invalid request data that fails validation\n- **500**: Internal server error during task generation\n\n**Required Auth Scopes:**\n- `rebalance:read`","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)","description":"Distribute a pool of operations across multiple vehicles (fleets) and compute an optimized route for each vehicle using a two-phase greedy approach:\n\n1) Greedy assignment of tasks to vehicles with an affinity score\n2) Single-vehicle route optimization reusing the existing solver\n\nConstraints on capacities, time and space are preserved per-vehicle.\n\n**Failure Modes:**\n- **401**: Missing or invalid authentication credentials\n- **403**: Insufficient permissions\n- **422**: Invalid request data (coordinates, capacities, fleet config)\n- **500**: Routing optimization failure or internal error\n\n**Required Auth Scopes:**\n- `redistribution:read`","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","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","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":"Solve Routing Optimization - 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"]}