Replaces the plan’s data for this id, keeping the same id. The version is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same version, and isn’t billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a 404 if no plan exists with this id — use POST /plans to create one instead.
Modelling pitfall.force=true on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don’t set it by default.
JWT bearer token, sent as Authorization: Bearer <token>. Two kinds of token are accepted:
A session token (1 hour), obtained through the interactive Console login flow. Used to sign in to the Console; not meant to be used against this API.
A long-term API token (366 days), obtained once via the Console and meant to be stored by your integration. It is the credential recommended for backend use, since it does not depend on repeating the interactive login flow.
If true, on an archived item, the requested action is forced and the item is unarchived. Without it, an archived plan refuses an update, a stop and a restart with a 403NOT_ALLOWED. On a plan that isn't archived, force has no effect.
Modelling pitfall. On an archived plan, force=true bills every stop again, on an update as on a restart. An update with force=true always creates a new version, even if its content is identical. Don't set force by default. See Pricing and credits.
Example:
true
Body
application/json
The complete plan, replacing the current one.
A full plan for a date and agency, with its associated resources, orders, constraints, and so on.
resources
object[]
required
Resources (vehicles, drivers, or vehicle-and-driver pairs) available to serve this plan's orders.
Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.
Extra constraints layered on top of resources' and orders' own fields, such as forbidden assignments or capacity ceilings shared across a group of stops.
additionalConstraints scope. At every stop of the tour, at least one of the listed capacities must be at or below its given threshold — an OR across the listed capacities, checked at each stop, not a requirement that they all hold together.
When to use. For sequencing stop types or validating multi-compartment configurations. If the tour has not, at each stop, one of its capacities lower than or equal to the given limit, the tour is invalid.
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Show child attributes
globalConstraints
object[]
List of global constraints to be satisfied by the returned solution.
Show child attributes
accessDurationsByStopTag
object
Fixed extra duration charged once, before the first of a group of consecutive stops sharing a tag, in ISO 8601 duration format.
When to use. For a cost paid once per visit to a tagged location, such as a 30-minute dock access time. For a cost paid on every stop regardless of what came before it, use a stop's own operationDuration instead.
Show child attributes
Example:
{ "access:parking33": "PT5M" }
overlappingCapacitiesByStopTag
object
Target maximum number of resources physically present at the same time at stops sharing a tag.
When to use. To model a shared bottleneck resource such as a depot with a limited number of loading docks, or a cross-dock with limited simultaneous capacity, for example limiting a two-dock depot to 2 resources at once.
Modelling pitfall. A soft limit, not a hard cap: overruns are minimized by the minimizeOverOverlappingCapacitiesOnStops objective, so how firmly the engine keeps to the limit depends on that objective's position in objectives, and it has no effect if that objective is left out.
Show child attributes
Example:
{ "capa:bat22": 3 }
setupDurations
object[]
Sequence-dependent changeover times to add whenever a resource travels directly between two stops carrying a matching pair of tags.
Show child attributes
objectives
enum<string> · object · object[]
Objectives the engine optimizes for this plan; see PlanObjectives for how priority order drives trade-offs.
Option 1 · enum<string>
Option 2 · object
Option 3 · object
Name of a built-in objective, used as an entry in PlanObjectives.
maximizeMandatoryStops: Maximizes the number of non-optional stops actually planned.
minimizeDelay: Minimizes the sum of delays against stops' preferredTimeWindows; only lateness counts, never earliness.
minimizeCosts: Minimizes the plan's total cost, as defined by each resource's cost.
minimizeResources: Favours using fewer resources over spreading stops across more of them.
minimizeOverOverlappingCapacitiesOnStops: Minimizes how far the limits set in Plan.overlappingCapacitiesByStopTag are exceeded, in resources simultaneously present beyond the limit.
maximizeOptionalStops: Maximizes the number of optional stops planned in addition to mandatory ones.
maximizePreferredStops: Maximizes stops matched to a resource's preferredStopTags.
minimizeLargestTourDuration: Minimizes the working duration of the single longest tour across the fleet (travel, service, and waiting time), balancing workload between resources.
minimizeWorkingDuration: Minimizes the total working duration summed across every tour, waiting time included.
minimizeDistance: Minimizes the total distance travelled summed across every tour.
minimizeEarlyLoadings: Minimizes early loadings. A loading is early when a vehicle loads an order at a stop with a declared tag, such as a depot, then comes back to a stop with that tag before delivering the order. The declarations go in a resource's avoidEarlyLoadings or in Plan.avoidEarlyLoadingsByResourceTag (see AvoidEarlyLoading). A plan with the objective and no declaration, or the reverse, is refused with a 400.
Available options:
maximizeMandatoryStops,
minimizeDelay,
minimizeCosts,
minimizeResources,
minimizeOverOverlappingCapacitiesOnStops,
maximizeOptionalStops,
maximizePreferredStops,
minimizeLargestTourDuration,
minimizeWorkingDuration,
minimizeDistance,
minimizeEarlyLoadings
maxOptimizationDuration
string
Maximum time the engine is allowed to search, in ISO 8601 duration format. The engine stops early on its own once it stops finding improvements, so an overly generous value costs only a longer worst case, never a worse solution.
Default. If omitted, 5 seconds for the sandbox agency and 15 minutes for the production agency. A value exceeding the agency's maximum (5 seconds for the sandbox, 6 hours for production by default) is clamped to it, with a warning in the response; see Limits and quotas.
Modelling pitfall. A good solution typically takes about PT10S for 1 resource and 15 stops, PT2M for 5 resources and 100 stops, PT10M for 30 resources and 800 stops, and PT30M for 45 resources and 3,000 stops. These values are indicative, not a guarantee: a plan can converge faster or slower depending on its constraints, and past about 800 stops the 15-minute production default is too short. Size this value against your own data (see Handling large volumes).
Time zone this plan's resources and stops are scheduled in. Local datetimes in the plan are read in it, and the API writes plan and solution datetimes back in its offset; see Dates and time zones.
Example:
"Europe/Paris"
lateDeparture
boolean
default:false
Allows resources to depart later than the earliest feasible moment in their workingTimeWindow, when doing so does not hurt the objectives.
Default.false: resources always leave as early as possible.
sharedCapacities
boolean
default:false
Sets how the engine treats a pickup whose quantity is negative. A vehicle's ceiling always applies to everything on board, whatever the order, and this flag does not change that.
With false, the engine treats a pickup with a negative quantity as a delivery only. The goods are loaded at departure, and the stop takes them off the vehicle. With true, the stop stays a normal pickup that removes load. The pickup of another order can then fill the vehicle before it.
For example, a truck has a weight ceiling of 100 kg. It collects a bin of 80 kg with a pickup that has capacities: {"weight": 80}. The bin is open from 08:00 to 09:00. The dump site is a pickup of another order, with capacities: {"weight": -80}. The dump site is open from 12:00 to 13:00, so the truck visits the bin first. With true, the load is 80 kg after the bin and 0 kg after the dump site. With false, the engine would load the 80 kg of the dump site at departure. The load would then reach 160 kg after the bin, over the ceiling. The engine therefore leaves the dump-site stop in unaffectedStopIds. The solution shows no violation.
When to use. Set true for waste collection, when you write the emptying at the dump site as a pickup with a negative quantity. It is the recommended setting for that model. For any other model, keep false.
Default.false: a pickup with a negative quantity is loaded at departure, then removed at the stop.
emptyThresholdByCapacityByResourceTag
object
Thresholds for capacities below which a resource is considered "empty" for empty distance calculation, grouped by resource tag. A resource is "empty" (kilometres travelled count as empty distance) when all capacities are at or below their threshold. The wildcard tag "*" matches all resources.
Early loading declarations grouped by resource tag. The wildcard tag "*" matches all resources. Each entry names a stop tag for the minimizeEarlyLoadings objective, and optionally the capacities to track. A plan with declarations must also list that objective in objectives. Otherwise, the plan is refused with a 400. See AvoidEarlyLoading.
Optional CO2 emission calculation parameters grouped by resource tag. Each value is a Cost-shaped object. Applies to every resource carrying the corresponding tag. When set, the resulting emissions are reported on tours as CO2Emission and aggregated on the solution as CO2Emission. If a resource matches multiple tags, only its first declared matching tag is used. Overridden by the resource-level declaration.
A single plan wrapped with its identifying metadata, as returned by the plan-retrieval endpoints.
item
object
The plan itself.
Show child attributes
agencyId
string
Identifier of the Kardinal tenant/account the plan is scoped to, derived automatically from the access token used to make the request.
Modelling pitfall. Not a physical-depot or site partition key. A single fleet based at several physical depots is still one Plan; do not split it into several Plan objects just because resources have different departure/arrival positions.
Amendments applied, and probable mistakes found, while processing this request, if any.
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Kardinal Route Optimization API","description":"Documentation for Kardinal's self-service logistics optimization API. Create an account and get an API key at https://console.kardinal.ai.","colors":{"primary":"#4D6AFF","light":"#C5A4FF","dark":"#1B1813"},"logo":{"light":"https://mintcdn.com/kardinal/NzVu4E70FNnktm7V/images/Logo-blue-black.png?fit=max\u0026auto=format\u0026n=NzVu4E70FNnktm7V\u0026q=85\u0026s=877e4130943370aa62e85ed76662c9bc","dark":"https://mintcdn.com/kardinal/NzVu4E70FNnktm7V/images/Logo-blue-white.png?fit=max\u0026auto=format\u0026n=NzVu4E70FNnktm7V\u0026q=85\u0026s=65aa4a2a695f749b32d5fe890b8017ec","href":"/"},"favicon":"https://mintcdn.com/kardinal/NzVu4E70FNnktm7V/images/Icon-blue.png?fit=max\u0026auto=format\u0026n=NzVu4E70FNnktm7V\u0026q=85\u0026s=e8d6c833a0278ea081ea2f0507ed7cd5","navbar":{"links":[{"href":"mailto:customer.success@kardinal.ai","label":"Support"},{"href":"https://console.kardinal.ai","label":"Sign in"}],"primary":{"type":"button","label":"Get API key","href":"https://console.kardinal.ai/keys"}},"footer":{"socials":{"website":"https://kardinal.ai"}},"seo":{"organization":{"id":"https://kardinal.ai/#organization","name":"Kardinal","url":"https://kardinal.ai/","sameAs":["https://www.linkedin.com/company/kardinalai","https://github.com/KardinalAI"]},"indexing":"navigable"},"integrations":{"gtm":{"tagId":"GTM-W6RBWSX"}},"banner":{"content":"Every new account starts with 1,000 free credits. [Create your account](https://console.kardinal.ai)","dismissible":true},"markdown":{"instructions":"This is the documentation of the Kardinal Route Optimization API. To integrate Kardinal into an app with an SDK, Integration paths lists the sections to read, in order: https://developers.kardinal.ai/getting-started/integration-paths.md. If you follow Integration paths, you don't need llms-full.txt or openapi.yaml. The modeling rules for a plan are on the page \"Start here if you're an AI agent\". That page is long. A tool that summarizes web pages keeps only part of its rules. A plain download of https://developers.kardinal.ai/getting-started/agent-modeling-checklist.md, for example with `curl`, returns the full text."},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":""}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"kardinal","hasAudioNarration":false,"actualSubdomain":"kardinal","customDomains":["developers.kardinal.ai"],"gitSource":{"type":"gitlab","owner":"public-docs","repo":"mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"projectId":682,"hostUrl":"https://gitlab.kardinal.ai","mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b081fa301293b7015014ade","clientVersion":"0.0.4389","searchFilterCounts":[{"language":"en","tag":"Guides","count":19},{"language":"en","tag":"API Reference","count":14},{"language":"en","tag":"SDKs","count":12},{"language":"en","tag":"API","count":9},{"language":"en","tag":"Modeling examples by industry","count":8},{"language":"en","tag":"By industry","count":8},{"language":"en","tag":"Modeling business rules","count":8},{"language":"en","tag":"Plan","count":7},{"language":"en","tag":"Getting started","count":5},{"language":"en","tag":"Concepts","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":"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":"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}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html.dark #topbar-cta-button .bg-primary-dark{background-color:rgb(var(--primary))}"}]}
{"page":{"pagePath":"api-reference/plan/update-a-plan","slug":"/api-reference/plan/update-a-plan","pageMetadata":{"title":"Update a plan","description":"Replaces the plan's data for this `id`, keeping the same `id`. The `version` is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same `version`, and isn't billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a `404` if no plan exists with this `id` — use `POST /plans` to create one instead.\n\nThis operation consumes credits — see [Pricing and credits](https://developers.kardinal.ai/reference/pricing-and-credits).\n\n> **Modelling pitfall.** `force=true` on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don't set it by default.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml put /plans/{planId}","href":"/api-reference/plan/update-a-plan","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 a: \"a\",\n blockquote: \"blockquote\",\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Replaces the plan’s data for this \", _jsx(_components.code, {\n children: \"id\"\n }), \", keeping the same \", _jsx(_components.code, {\n children: \"id\"\n }), \". The \", _jsx(_components.code, {\n children: \"version\"\n }), \" is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same \", _jsx(_components.code, {\n children: \"version\"\n }), \", and isn’t billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a \", _jsx(_components.code, {\n children: \"404\"\n }), \" if no plan exists with this \", _jsx(_components.code, {\n children: \"id\"\n }), \" — use \", _jsx(_components.code, {\n children: \"POST /plans\"\n }), \" to create one instead.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This operation consumes credits — see \", _jsx(_components.a, {\n href: \"https://developers.kardinal.ai/reference/pricing-and-credits\",\n children: \"Pricing and credits\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Modelling pitfall.\"\n }), \" \", _jsx(_components.code, {\n children: \"force=true\"\n }), \" on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don’t set it by default.\"]\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":"Update a plan","description":"Replaces the plan's data for this `id`, keeping the same `id`. The `version` is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same `version`, and isn't billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a `404` if no plan exists with this `id` — use `POST /plans` to create one instead.\n\nThis operation consumes credits — see [Pricing and credits](https://developers.kardinal.ai/reference/pricing-and-credits).\n\n> **Modelling pitfall.** `force=true` on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don't set it by default.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml put /plans/{planId}","href":"/api-reference/plan/update-a-plan","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/kardinal/d55e84efee54b775/kd-att-docs.js"],"openApiReferenceData":{"operation":{"summary":"Update a plan","description":"Replaces the plan's data for this `id`, keeping the same `id`. The `version` is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same `version`, and isn't billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a `404` if no plan exists with this `id` — use `POST /plans` to create one instead.\n\nThis operation consumes credits — see [Pricing and credits](https://developers.kardinal.ai/reference/pricing-and-credits).\n\n> **Modelling pitfall.** `force=true` on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don't set it by default.\n","operationId":"putPlan","tags":["Plan"],"parameters":["563167fc-8256-4158-974e-3833f3478d9e"],"requestBody":"c8d9ad8b-cee4-49db-a042-f9fcf1a60151","responses":{"200":"774df4a7-40f6-4752-9271-7eb6227c0158","400":"164383fd-2e72-4e4c-9fc9-62e041142180","401":"6631723f-b0fc-41ef-a977-a08819a60131","403":"8e3afe18-7d84-4ac0-96ab-e8b7a5433b47","404":"8c8ab25b-584f-41a1-be7e-6e5a7c9979f4","500":"559e1561-b17a-4ebd-9502-e2ac1a350764"},"method":"put","type":"path","servers":["7059483f-0edd-4dc4-97aa-9452eec3a505","7951acdd-f991-4536-895f-9dda3c02d02d"],"security":["6e4ca5fd-8ff5-4034-84ba-5f3a2d7a9439"],"path":"/plans/{planId}","baseUrlOptions":["https://app.kardinal.ai/api/v2","/api/v2"],"title":"Update a plan","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"563167fc-8256-4158-974e-3833f3478d9e":{"name":"force","description":"If true, on an archived item, the requested action is forced and the item is unarchived. Without it, an archived plan refuses an update, a stop and a restart with a `403` `NOT_ALLOWED`. On a plan that isn't archived, `force` has no effect.\n\n> **Modelling pitfall.** On an archived plan, `force=true` bills every stop again, on an update as on a restart. An update with `force=true` always creates a new version, even if its content is identical. Don't set `force` by default. See [Pricing and credits](https://developers.kardinal.ai/reference/pricing-and-credits).\n","in":"query","schema":{"type":"boolean","default":false,"example":true,"description":"If true, on an archived item, the requested action is forced and the item is unarchived. Without it, an archived plan refuses an update, a stop and a restart with a `403` `NOT_ALLOWED`. On a plan that isn't archived, `force` has no effect.\n\n> **Modelling pitfall.** On an archived plan, `force=true` bills every stop again, on an update as on a restart. An update with `force=true` always creates a new version, even if its content is identical. Don't set `force` by default. See [Pricing and credits](https://developers.kardinal.ai/reference/pricing-and-credits).\n","uniqueKey":"","typeLabel":"boolean"}},"e89c7a23-7ee6-4280-bdd7-b5b27f5c3033":{"name":"planId","description":"The plan UUID.","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The plan UUID.\nUniversally Unique Identifier.","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","example":"cd4ce4e3-0208-4b10-b346-25f235214e4f","readOnly":true,"isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"}}},"requestBody":{"description":"The complete plan, replacing the current one.","content":{"application/json":{"schema":{"type":"object","description":"A full plan for a date and agency, with its associated resources, orders, constraints, and so on.","properties":{"resources":{"type":"array","description":"Resources (vehicles, drivers, or vehicle-and-driver pairs) available to serve this plan's orders.\n\n> **Default.** Capped at 250 entries per plan — see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","items":{"type":"object","description":"A vehicle-driver pair for the duration of the plan. Only `id`, `vehicleProfile`, and `workingTimeWindow` are required; everything else defaults to \"unconstrained\".\n\n`capacities`, `skills`, and `tags` are all free-form: the API doesn't predefine `weight` or `forklift` as special values. Whatever keys are used on a resource must match the keys used on the stops/orders it is expected to serve.\n","required":["id","vehicleProfile","workingTimeWindow"],"properties":{"id":{"type":"string","description":"Resource ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"resource1","isRequired":true,"uniqueKey":"resources.items.[INDEX].id","typeLabel":"string"},"vehicleProfile":{"oneOf":[{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type","kmph"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `fly`.","type":"string","enum":["fly"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.0.type","typeLabel":"enum\u003cstring>"},"kmph":{"description":"Constant travel speed, in km/h, used to compute crow-fly travel times. You must send `kmph` with the `fly` profile. It must be strictly positive. The API refuses a `fly` profile without it, or with 0 or less, with a `400` error.\n","type":"number","minimum":0,"exclusiveMinimum":true,"example":60,"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.0.kmph","typeLabel":"number"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.0","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `pedestrian`.","type":"string","enum":["pedestrian"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.1.type","typeLabel":"enum\u003cstring>"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.1.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.1.avoidSeasonalClosure","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.1.avoidDirtRoad","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.1.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.1.excludedCountries","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.1","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `bicycle`.","type":"string","enum":["bicycle"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.2.type","typeLabel":"enum\u003cstring>"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.2.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.2.avoidSeasonalClosure","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.2.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.2.avoidDirtRoad","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.2.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.2.excludedCountries","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.2","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `scooter`.","type":"string","enum":["scooter"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.type","typeLabel":"enum\u003cstring>"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.avoidSeasonalClosure","typeLabel":"boolean"},"avoidCarShuttleTrain":{"description":"Excludes car-carrying shuttle trains from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.avoidCarShuttleTrain","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.avoidDirtRoad","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.excludedCountries","typeLabel":"string[]"},"speedCap":{"description":"Maximum travel speed, in metres per second (m/s), applied to every road segment regardless of its posted speed limit. The value must be between 1 and 70, which is 3.6 to 252 km/h. Decimals are accepted. To cap a vehicle at 80 km/h, send `22.22`, which is 80 divided by 3.6.\n\n> **Modelling pitfall.** `speedCap` is in metres per second, not in km/h. A value written in km/h, such as `50`, is read as 180 km/h, so it rarely slows the vehicle. The API refuses the whole plan with a `400` error when `speedCap` is outside 1 to 70.\n","type":"number","minimum":1,"maximum":70,"example":12.5,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3.speedCap","typeLabel":"number"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.3","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `motorbike`.","type":"string","enum":["motorbike"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.type","typeLabel":"enum\u003cstring>"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.avoidSeasonalClosure","typeLabel":"boolean"},"avoidControlledAccessHighway":{"description":"Excludes motorways and other controlled-access highways from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.avoidControlledAccessHighway","typeLabel":"boolean"},"avoidCarShuttleTrain":{"description":"Excludes car-carrying shuttle trains from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.avoidCarShuttleTrain","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.avoidDirtRoad","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.excludedCountries","typeLabel":"string[]"},"speedCap":{"description":"Maximum travel speed, in metres per second (m/s), applied to every road segment regardless of its posted speed limit. The value must be between 1 and 70, which is 3.6 to 252 km/h. Decimals are accepted. To cap a vehicle at 80 km/h, send `22.22`, which is 80 divided by 3.6.\n\n> **Modelling pitfall.** `speedCap` is in metres per second, not in km/h. A value written in km/h, such as `50`, is read as 180 km/h, so it rarely slows the vehicle. The API refuses the whole plan with a `400` error when `speedCap` is outside 1 to 70.\n","type":"number","minimum":1,"maximum":70,"example":27.78,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4.speedCap","typeLabel":"number"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.4","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `car`.","type":"string","enum":["car"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.type","typeLabel":"enum\u003cstring>"},"withTraffic":{"description":"Enables predictive traffic in travel-time estimates (billed separately). For any plan where `preferredTimeWindows`/`authorizedTimeWindows` matter, travel-time estimates computed without it are systematically optimistic, which erodes on-time performance against exactly the time windows being targeted.\n","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.withTraffic","typeLabel":"boolean"},"avoidTollRoad":{"description":"Excludes toll roads from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.avoidTollRoad","typeLabel":"boolean"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.avoidSeasonalClosure","typeLabel":"boolean"},"avoidControlledAccessHighway":{"description":"Excludes motorways and other controlled-access highways from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.avoidControlledAccessHighway","typeLabel":"boolean"},"avoidCarShuttleTrain":{"description":"Excludes car-carrying shuttle trains from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.avoidCarShuttleTrain","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.avoidDirtRoad","typeLabel":"boolean"},"avoidUTurns":{"description":"Excludes U-turns from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.avoidUTurns","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.excludedCountries","typeLabel":"string[]"},"speedCap":{"description":"Maximum travel speed, in metres per second (m/s), applied to every road segment regardless of its posted speed limit. The value must be between 1 and 70, which is 3.6 to 252 km/h. Decimals are accepted. To cap a vehicle at 80 km/h, send `22.22`, which is 80 divided by 3.6.\n\n> **Modelling pitfall.** `speedCap` is in metres per second, not in km/h. A value written in km/h, such as `50`, is read as 180 km/h, so it rarely slows the vehicle. The API refuses the whole plan with a `400` error when `speedCap` is outside 1 to 70.\n","type":"number","minimum":1,"maximum":70,"example":27.78,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5.speedCap","typeLabel":"number"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.5","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `truck`.","type":"string","enum":["truck"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.type","typeLabel":"enum\u003cstring>"},"grossWeight":{"description":"Gross vehicle weight, in kilograms, used to respect weight-restricted roads.","type":"number","example":12000,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.grossWeight","typeLabel":"number"},"withTraffic":{"description":"Enables predictive traffic in travel-time estimates (billed separately). For any plan where `preferredTimeWindows`/`authorizedTimeWindows` matter, travel-time estimates computed without it are systematically optimistic, which erodes on-time performance against exactly the time windows being targeted.\n","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.withTraffic","typeLabel":"boolean"},"avoidTollRoad":{"description":"Excludes toll roads from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.avoidTollRoad","typeLabel":"boolean"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.avoidSeasonalClosure","typeLabel":"boolean"},"avoidControlledAccessHighway":{"description":"Excludes motorways and other controlled-access highways from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.avoidControlledAccessHighway","typeLabel":"boolean"},"avoidCarShuttleTrain":{"description":"Excludes car-carrying shuttle trains from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.avoidCarShuttleTrain","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.avoidDirtRoad","typeLabel":"boolean"},"avoidUTurns":{"description":"Excludes U-turns from computed routes.","type":"boolean","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.avoidUTurns","typeLabel":"boolean"},"shippedHazardousGoods":{"description":"Categories of hazardous goods carried, used to respect roads restricted to those categories.","type":"array","items":{"type":"string","description":"ADR hazard class of a good carried by the vehicle, used to respect roads restricted to that class of hazardous goods.\n\n- explosive: Substances or articles liable to explode.\n- gas: Compressed, liquefied, or dissolved gases.\n- flammable: Flammable liquids.\n- combustible: Flammable solids, or solids liable to spontaneous combustion.\n- organic: Organic peroxides.\n- poison: Toxic substances.\n- radioactive: Radioactive materials.\n- corrosive: Corrosive substances.\n- poisonousInhalation: Substances toxic by inhalation.\n- harmfulToWater: Substances harmful to the aquatic environment.\n- other: Any hazard class not covered by the preceding values.\n","enum":["explosive","gas","flammable","combustible","organic","poison","radioactive","corrosive","poisonousInhalation","harmfulToWater","other"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.shippedHazardousGoods.items.[INDEX]","typeLabel":"enum\u003cstring>"},"example":["explosive","gas","flammable"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.shippedHazardousGoods","typeLabel":"enum\u003cstring>[]"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.excludedCountries","typeLabel":"string[]"},"height":{"description":"Vehicle height, as a whole number of centimetres, used to respect height-restricted roads such as low bridges.","type":"integer","example":420,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.height","typeLabel":"integer"},"width":{"description":"Vehicle width, as a whole number of centimetres, used to respect width-restricted roads.","type":"integer","example":250,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.width","typeLabel":"integer"},"length":{"description":"Vehicle length, as a whole number of centimetres, used to respect length-restricted roads.","type":"integer","example":1200,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.length","typeLabel":"integer"},"tunnelCategory":{"type":"string","description":"ADR tunnel restriction category to route around, from `B` (least restrictive) to `E` (most restrictive).\n\n- B: Restricted for goods liable to a very large explosion.\n- C: Restricted for goods liable to a very large explosion, a large explosion, or a large toxic release.\n- D: Restricted for goods liable to a very large explosion, a large explosion, a large toxic release, or a fire.\n- E: Restricted for all dangerous goods, except those exempted from tunnel restrictions altogether.\n","enum":["B","C","D","E"],"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.tunnelCategory","typeLabel":"enum\u003cstring>"},"speedCap":{"description":"Maximum travel speed, in metres per second (m/s), applied to every road segment regardless of its posted speed limit. The value must be between 1 and 70, which is 3.6 to 252 km/h. Decimals are accepted. To cap a vehicle at 80 km/h, send `22.22`, which is 80 divided by 3.6.\n\n> **Modelling pitfall.** `speedCap` is in metres per second, not in km/h. A value written in km/h, such as `50`, is read as 180 km/h, so it rarely slows the vehicle. The API refuses the whole plan with a `400` error when `speedCap` is outside 1 to 70.\n","type":"number","minimum":1,"maximum":70,"example":22.22,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6.speedCap","typeLabel":"number"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"resources.items.[INDEX].vehicleProfile","typeLabel":"object"},"workingTimeWindow":{"type":"object","description":"Time window during which the resource is available to work. Often paired with `maxWorkingDuration`, since a wide window does not by itself mean a long shift.\n\n> **Modelling pitfall.** Spanning more than one calendar day does not, on its own, force any rest between working days. Encode daily rest explicitly in `breaks[]`, for example one `timeWindowBreak` per night, with a window longer than the rest. See [Multi-day trips](https://developers.kardinal.ai/guides/multi-day).\n","required":["begin","end"],"example":{"begin":"2026-03-17 08:00","end":"2026-03-17 18:00"},"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"resources.items.[INDEX].workingTimeWindow.begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"resources.items.[INDEX].workingTimeWindow.end","typeLabel":"string"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].workingTimeWindow","typeLabel":"object"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"resources.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"resources.items.[INDEX].properties","typeLabel":"object"},"state":{"type":"object","description":"Resource's current mode and, when re-optimizing a plan whose resources are already underway, the stops, breaks, begin or end already committed to that resource.\n","properties":{"mode":{"type":"string","description":"Whether the engine may add stops to this resource's tour beyond its `state.assignments` (`free`), or must limit the tour to those assigned entries (`fixed`). How each entry is treated within the tour is set separately, by its `status` (see `AssignmentStatus`).\n\n> **When to use.** `free` with `status: \"fixed\"` entries for live supervision: the entries already done are taken as given, and the engine plans further stops after them. `fixed` with `status: \"assigned\"` entries to check whether a given set of stops is feasible on this resource, see [Handling infeasibility](https://developers.kardinal.ai/guides/handling-infeasibility#testing-a-stop-on-a-specific-resource-with-state-assignments).\n\n> **Modelling pitfall.** `fixed` limits which stops the tour contains, not their order: with `status: \"assigned\"` entries, the engine still sequences them according to the plan's objectives. `free` combined with `status: \"assigned\"` entries isn't allowed.\n","default":"free","enum":["free","fixed"],"uniqueKey":"resources.items.[INDEX].state.mode","typeLabel":"enum\u003cstring>"},"assignments":{"type":"array","description":"Waypoints to pin onto this resource's tour before the engine plans the rest of it, ordered as they occur on the tour.\n\n> **When to use.** For re-optimizing a plan mid-execution: fix the waypoints a resource has already completed or is already committed to, then let the engine re-plan everything that comes after.\n","items":{"oneOf":[{"type":"object","description":"Pins a stop onto a resource's tour. `beginTime` defaults to `arrivalTime` only when `departureTime` is omitted too. If you set `departureTime`, set `beginTime` as well, or the API refuses the plan with a `400` error. If `stopId` is the id of an `AlternativesStop` alternative, `arrivalTime`, `beginTime`, and `departureTime` cannot be set: the engine still chooses and times the alternative itself.\n","required":["type","stopId"],"properties":{"type":{"type":"string","description":"Discriminator identifying this waypoint as a stop.","enum":["stop"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"stopId":{"type":"string","description":"Id of the pinned stop.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"stop1","isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.stopId","typeLabel":"string"},"status":{"type":"string","description":"How an entry in `state.assignments` is treated: taken as given, with its position in the sequence and its pinned times left unchallenged (`fixed`), or only assigned to this resource, with the engine sequencing it according to the plan's objectives (`assigned`).\n","default":"fixed","enum":["fixed","assigned"],"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.status","typeLabel":"enum\u003cstring>"},"arrivalTime":{"type":"string","description":"Time the resource reaches the stop.","example":"2019-11-15T12:34:56Z","uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.arrivalTime","typeLabel":"string"},"beginTime":{"type":"string","description":"Time the resource starts serving the stop. Defaults to `arrivalTime` only when `departureTime` is omitted too.","example":"2019-11-15T12:34:56Z","uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.beginTime","typeLabel":"string"},"departureTime":{"type":"string","description":"Time the resource leaves the stop.","example":"2019-11-15T12:34:56Z","uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.departureTime","typeLabel":"string"}},"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Pins the start of a resource's tour to a fixed departure time.","required":["type","departureTime"],"properties":{"type":{"type":"string","description":"Discriminator identifying this waypoint as the tour's begin.","enum":["begin"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"departureTime":{"type":"string","description":"Time the resource departs.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.1.departureTime","typeLabel":"string"},"status":{"type":"string","description":"How an entry in `state.assignments` is treated: taken as given, with its position in the sequence and its pinned times left unchallenged (`fixed`), or only assigned to this resource, with the engine sequencing it according to the plan's objectives (`assigned`).\n","default":"fixed","enum":["fixed","assigned"],"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.1.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Pins a break onto a resource's tour.","required":["type","arrivalTime","departureTime"],"properties":{"type":{"type":"string","description":"Discriminator identifying this waypoint as a break.","enum":["break"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"arrivalTime":{"type":"string","description":"Time the break waypoint starts. It can be earlier than the break itself, for example when the waypoint includes a wait.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2.arrivalTime","typeLabel":"string"},"departureTime":{"type":"string","description":"Time the break ends.\n\n> **Modelling pitfall.** `arrivalTime` and `departureTime` show where and when the engine placed the break. They do not show how long the break lasted, and the span can be longer than the break, for example when it includes a wait.\n","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2.departureTime","typeLabel":"string"},"status":{"type":"string","description":"How an entry in `state.assignments` is treated: taken as given, with its position in the sequence and its pinned times left unchallenged (`fixed`), or only assigned to this resource, with the engine sequencing it according to the plan's objectives (`assigned`).\n","default":"fixed","enum":["fixed","assigned"],"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"Pins the end of a resource's tour to a fixed arrival time.","required":["type","arrivalTime"],"properties":{"type":{"type":"string","description":"Discriminator identifying this waypoint as the tour's end.","enum":["end"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"arrivalTime":{"type":"string","description":"Time the resource arrives at the end of its tour.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.3.arrivalTime","typeLabel":"string"},"status":{"type":"string","description":"How an entry in `state.assignments` is treated: taken as given, with its position in the sequence and its pinned times left unchallenged (`fixed`), or only assigned to this resource, with the engine sequencing it according to the plan's objectives (`assigned`).\n","default":"fixed","enum":["fixed","assigned"],"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.3.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"resources.items.[INDEX].state.assignments.items.[INDEX]","typeLabel":"object"},"uniqueKey":"resources.items.[INDEX].state.assignments","typeLabel":"object[]"}},"uniqueKey":"resources.items.[INDEX].state","typeLabel":"object"},"cost":{"type":"object","description":"Custom cost model (per km, per capacity unit, fixed cost) used by the `minimizeCosts` objective.","properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].cost.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].cost.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].cost.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].cost.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].cost.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].cost.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].cost.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].cost.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].cost.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].cost.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].cost.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].cost.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"resources.items.[INDEX].cost.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].cost.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].cost.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].cost.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].cost.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].cost.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].cost.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"resources.items.[INDEX].cost.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].cost.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].cost.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].cost.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].cost.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].cost.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"resources.items.[INDEX].cost.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"resources.items.[INDEX].cost.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"resources.items.[INDEX].cost.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"resources.items.[INDEX].cost.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"resources.items.[INDEX].cost.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"resources.items.[INDEX].cost","typeLabel":"object"},"CO2EmissionCalculation":{"type":"object","description":"Optional CO2 emission calculation parameters for this resource. The object is `Cost`-shaped.\nTypical fields:\n - `km`: emission per travelled kilometre (for example `costCoeff` in g/km);\n - `costPerCapacityPerTravelledKm`: per-capacity emission per travelled kilometre;\n - `costPerCapacityPerTravelledHour`: per-capacity emission per travel hour (travel duration only).\nWhen set, the resulting emissions are reported on the tour as `CO2Emission`.\nTakes precedence over any matching plan-level declaration.\n","example":{"km":{"costCoeff":0.55},"costPerCapacityPerTravelledKm":{"weight":{"costCoeff":0.2}},"costPerCapacityPerTravelledHour":{"weight":{"costCoeff":0.05}}},"properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"resources.items.[INDEX].CO2EmissionCalculation","typeLabel":"object"},"priority":{"description":"Relative importance of the resource; lower is more important, and the value can be negative.\n\n> **When to use.** Used by `minimizeResources` to decide which resources to leave unused first under fleet pressure: it minimizes the least important resources first (highest number), so they're the first left unused.\n","type":"integer","default":0,"example":0,"uniqueKey":"resources.items.[INDEX].priority","typeLabel":"integer"},"skills":{"description":"Qualifications this resource has. Matched against an order's `requiredSkills`.","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"resources.items.[INDEX].skills.items.[INDEX]","typeLabel":"string"},"example":["forklift","truck"],"uniqueKey":"resources.items.[INDEX].skills","typeLabel":"string[]"},"preferredStopTags":{"description":"Soft counterpart to `skills`/`requiredSkills`, used with the `maximizePreferredStops` objective.\n\n> **When to use.** For a preference between resources, not a hard requirement. Use `skills`/`requiredSkills` instead when a resource must have the qualification.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"resources.items.[INDEX].preferredStopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"resources.items.[INDEX].preferredStopTags","typeLabel":"string[]"},"tags":{"description":"Free-form tags, referenced by plan-level mechanisms (`additionalConstraints`, `costsByResourceTag`, `accessDurationsByStopTag`, and so on).\n","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"resources.items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"example":["trailer"],"uniqueKey":"resources.items.[INDEX].tags","typeLabel":"string[]"},"capacities":{"type":"object","description":"Capacity ceilings available on this resource. See the `Capacities` schema.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"resources.items.[INDEX].capacities.additionalProperties","typeLabel":"number"},"uniqueKey":"resources.items.[INDEX].capacities","typeLabel":"object"},"departure":{"type":"object","description":"Start coordinates of the resource's route, typically a depot. If omitted, the working day starts at the first visited stop instead.\n\n> **Modelling pitfall.** Depots are not first-class objects in this API. Resolve a depot to its `{lat, lon}` position on the client side before building the plan.\n","required":["lon","lat"],"example":{"lon":2.3269331,"lat":48.8812658},"properties":{"lon":{"description":"Longitude, in decimal degrees.","type":"number","minimum":-180,"maximum":180,"isRequired":true,"uniqueKey":"resources.items.[INDEX].departure.lon","typeLabel":"number"},"lat":{"description":"Latitude, in decimal degrees.","type":"number","minimum":-90,"maximum":90,"isRequired":true,"uniqueKey":"resources.items.[INDEX].departure.lat","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].departure","typeLabel":"object"},"arrival":{"oneOf":[{"type":"object","description":"End coordinates of the resource's route, typically a depot, as a raw `{lat, lon}` position (see `departure`). If omitted, the working day ends at the last visited stop instead.\n\n> **When to use.** Set this to the literal string `\"atFirstPosition\"` instead of a position to make the resource return to wherever its tour actually started, rather than to a separate fixed point.\n","required":["lon","lat"],"example":{"lon":2.3269331,"lat":48.8812658},"properties":{"lon":{"description":"Longitude, in decimal degrees.","type":"number","minimum":-180,"maximum":180,"isRequired":true,"uniqueKey":"resources.items.[INDEX].arrival.oneOf.0.lon","typeLabel":"number"},"lat":{"description":"Latitude, in decimal degrees.","type":"number","minimum":-90,"maximum":90,"isRequired":true,"uniqueKey":"resources.items.[INDEX].arrival.oneOf.0.lat","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].arrival.oneOf.0","typeLabel":"object"},{"type":"string","description":"End coordinates of the resource's route, typically a depot, as a raw `{lat, lon}` position (see `departure`). If omitted, the working day ends at the last visited stop instead.\n\n> **When to use.** Set this to the literal string `\"atFirstPosition\"` instead of a position to make the resource return to wherever its tour actually started, rather than to a separate fixed point.\n","enum":["atFirstPosition"],"uniqueKey":"resources.items.[INDEX].arrival.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"resources.items.[INDEX].arrival","typeLabel":"object | enum\u003cstring>"},"maxWorkingDuration":{"type":"string","description":"Maximum working time (travel, service, breaks and waiting combined) inside `workingTimeWindow`, in ISO 8601 duration format.\n\n> **Modelling pitfall.** On a resource that works several days, size it for the whole trip, counting the time spent on breaks and on waiting. A cap sized for one working day rules out any tour that works on both sides of the rest. The engine then leaves unplaced the stops that need such a tour, with no error.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT8H","uniqueKey":"resources.items.[INDEX].maxWorkingDuration","typeLabel":"string"},"maxDistanceInKm":{"description":"Maximum total distance the resource may travel over the plan, in kilometres. The distance is measured along the route the resource drives. In production, the route follows the roads.","type":"number","example":200,"uniqueKey":"resources.items.[INDEX].maxDistanceInKm","typeLabel":"number"},"maxInterStopDistanceInKm":{"oneOf":[{"type":"number","description":"Maximum distance between two consecutive stops on a tour, in kilometres, measured along the route. Either a scalar value applied uniformly to every travel of the tour, or a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`).\n\n> **Default.** Each key of the structured form is independent; an absent key means no constraint on that segment, not a constraint set to zero.\n","example":50,"uniqueKey":"resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.0","typeLabel":"number"},{"type":"object","description":"Maximum distance between two consecutive stops on a tour, in kilometres, measured along the route. Either a scalar value applied uniformly to every travel of the tour, or a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`).\n\n> **Default.** Each key of the structured form is independent; an absent key means no constraint on that segment, not a constraint set to zero.\n","example":{"firstTravel":10,"interStop":25,"lastTravel":15},"properties":{"firstTravel":{"description":"Maximum distance, in km, between the resource's departure and the first stop.","type":"number","example":10,"uniqueKey":"resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.1.firstTravel","typeLabel":"number"},"interStop":{"description":"Maximum distance, in km, between two consecutive intermediate stops (excluding the first and last travels).","type":"number","example":25,"uniqueKey":"resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.1.interStop","typeLabel":"number"},"lastTravel":{"description":"Maximum distance, in km, between the last stop and the resource's arrival.","type":"number","example":15,"uniqueKey":"resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.1.lastTravel","typeLabel":"number"}},"uniqueKey":"resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.1","typeLabel":"object"}],"uniqueKey":"resources.items.[INDEX].maxInterStopDistanceInKm","typeLabel":"number | object"},"maxInterStopDuration":{"oneOf":[{"type":"string","description":"Maximum duration between two consecutive stops on a tour. Either a single duration applied uniformly to every travel of the tour, or a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`).\n\n> **Default.** Each key of the structured form is independent; an absent key means no constraint on that segment, not a constraint set to zero.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"resources.items.[INDEX].maxInterStopDuration.oneOf.0","typeLabel":"string"},{"type":"object","description":"Maximum duration between two consecutive stops on a tour. Either a single duration applied uniformly to every travel of the tour, or a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`).\n\n> **Default.** Each key of the structured form is independent; an absent key means no constraint on that segment, not a constraint set to zero.\n","example":{"firstTravel":"PT15M","interStop":"PT30M","lastTravel":"PT20M"},"properties":{"firstTravel":{"type":"string","description":"Maximum duration between the resource's departure and the first stop.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"resources.items.[INDEX].maxInterStopDuration.oneOf.1.firstTravel","typeLabel":"string"},"interStop":{"type":"string","description":"Maximum duration between two consecutive intermediate stops (excluding the first and last travels).","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"resources.items.[INDEX].maxInterStopDuration.oneOf.1.interStop","typeLabel":"string"},"lastTravel":{"type":"string","description":"Maximum duration between the last stop and the resource's arrival.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"resources.items.[INDEX].maxInterStopDuration.oneOf.1.lastTravel","typeLabel":"string"}},"uniqueKey":"resources.items.[INDEX].maxInterStopDuration.oneOf.1","typeLabel":"object"}],"uniqueKey":"resources.items.[INDEX].maxInterStopDuration","typeLabel":"string | object"},"breaks":{"description":"Breaks to schedule into this resource's tour; see `Break` for the three available kinds.\n\n> **Modelling pitfall.** Currently, the engine schedules a break only where the vehicle already stands, never in the middle of a drive. A `timeWindowBreak` can fall at the start of the tour. For a `timeWindowBreak`, a drive that covers the whole time the break could take place is impossible. The engine then leaves the stops that need that drive unplaced. It returns no error and no violation. A sliding break falls only after a stop, never at the start of the tour. For a `travelDurationSlidingBreak` or a `workingDurationSlidingBreak`, the engine allows a drive longer than `maxInterBreakDuration`. When the limit is already passed on arrival at a stop, it adds the missed breaks at that stop, if the tour goes on after it. Nothing catches up the last drive. The engine marks the tour valid and reports no violation. To keep a long drive within the rule, give the route a stop where the break can fall, then check the gaps in the solution. See [Where a break can fall](https://developers.kardinal.ai/guides/breaks#where-a-break-can-fall).\n","type":"array","items":{"oneOf":[{"type":"object","description":"A resource's `breaks` array mixes any of the three types below; they are not mutually exclusive, and a break counts as working time unless its type says otherwise.\n\nA `timeWindowBreak` is hard: the engine drops stops rather than skip the break. Currently, a tour that ends before the window opens has no break waypoint. A tour that keeps running past the end of the window gets a break waypoint. A tour that ends inside the window gets none when enough of the window remains after the tour ends, and the engine drops stops when too little remains. It isn't confirmed whether a wait at a stop counts as the break. A sliding break is not scheduled when the tour is shorter than `maxInterBreakDuration`.\n\n> **Modelling pitfall.** The two sliding types (`workingDurationSlidingBreak`, `travelDurationSlidingBreak`) count the same physical break toward both their clocks. Define both together for a shift with a labor-time rule and a driving-time rule, rather than assuming one covers the other.\n\n> **Default.** For a resource whose `workingTimeWindow` spans more than one calendar day, `breaks` is where daily rest has to be encoded; a wide window does not produce it on its own.\n","required":["type","duration","timeWindow"],"properties":{"type":{"description":"Discriminator identifying this break as `timeWindowBreak`.","type":"string","enum":["timeWindowBreak"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"duration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.duration","typeLabel":"string"},"timeWindow":{"type":"object","description":"Plain `{begin, end}` window, used for `workingTimeWindow` and break windows. See `TaggedTimeWindow` for the variant used on a stop's `authorizedTimeWindows` / `preferredTimeWindows`.\n","required":["begin","end"],"example":{"begin":"2026-03-17 12:00","end":"2026-03-17 13:00"},"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.timeWindow.begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.timeWindow.end","typeLabel":"string"}},"isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.timeWindow","typeLabel":"object"}},"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A resource's `breaks` array mixes any of the three types below; they are not mutually exclusive, and a break counts as working time unless its type says otherwise.\n\nA `timeWindowBreak` is hard: the engine drops stops rather than skip the break. Currently, a tour that ends before the window opens has no break waypoint. A tour that keeps running past the end of the window gets a break waypoint. A tour that ends inside the window gets none when enough of the window remains after the tour ends, and the engine drops stops when too little remains. It isn't confirmed whether a wait at a stop counts as the break. A sliding break is not scheduled when the tour is shorter than `maxInterBreakDuration`.\n\n> **Modelling pitfall.** The two sliding types (`workingDurationSlidingBreak`, `travelDurationSlidingBreak`) count the same physical break toward both their clocks. Define both together for a shift with a labor-time rule and a driving-time rule, rather than assuming one covers the other.\n\n> **Default.** For a resource whose `workingTimeWindow` spans more than one calendar day, `breaks` is where daily rest has to be encoded; a wide window does not produce it on its own.\n","required":["type","minBreakDuration","maxInterBreakDuration"],"properties":{"type":{"description":"Discriminator identifying this break as `travelDurationSlidingBreak`.","type":"string","enum":["travelDurationSlidingBreak"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"minBreakDuration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.1.minBreakDuration","typeLabel":"string"},"maxInterBreakDuration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.1.maxInterBreakDuration","typeLabel":"string"}},"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"A resource's `breaks` array mixes any of the three types below; they are not mutually exclusive, and a break counts as working time unless its type says otherwise.\n\nA `timeWindowBreak` is hard: the engine drops stops rather than skip the break. Currently, a tour that ends before the window opens has no break waypoint. A tour that keeps running past the end of the window gets a break waypoint. A tour that ends inside the window gets none when enough of the window remains after the tour ends, and the engine drops stops when too little remains. It isn't confirmed whether a wait at a stop counts as the break. A sliding break is not scheduled when the tour is shorter than `maxInterBreakDuration`.\n\n> **Modelling pitfall.** The two sliding types (`workingDurationSlidingBreak`, `travelDurationSlidingBreak`) count the same physical break toward both their clocks. Define both together for a shift with a labor-time rule and a driving-time rule, rather than assuming one covers the other.\n\n> **Default.** For a resource whose `workingTimeWindow` spans more than one calendar day, `breaks` is where daily rest has to be encoded; a wide window does not produce it on its own.\n","required":["type","minBreakDuration","maxInterBreakDuration"],"properties":{"type":{"description":"Discriminator identifying this break as `workingDurationSlidingBreak`.","type":"string","enum":["workingDurationSlidingBreak"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"minBreakDuration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.2.minBreakDuration","typeLabel":"string"},"maxInterBreakDuration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.2.maxInterBreakDuration","typeLabel":"string"}},"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"resources.items.[INDEX].breaks.items.[INDEX]","typeLabel":"object"},"uniqueKey":"resources.items.[INDEX].breaks","typeLabel":"object[]"},"operationDurationPolicies":{"description":"Policies excluding specific operation durations from this resource's tour; see `OperationDurationPolicy`.","type":"array","items":{"type":"object","description":"Policy to indicate which operation duration must not be taken into account.","required":["policy"],"properties":{"policy":{"type":"string","description":"Which operation duration to leave out of the schedule: `withoutFirstOperationDuration` ignores only the first matching stop's operation duration, `withoutOperationDurations` ignores it on every matching stop.\n","enum":["withoutFirstOperationDuration","withoutOperationDurations"],"isRequired":true,"uniqueKey":"resources.items.[INDEX].operationDurationPolicies.items.[INDEX].policy","typeLabel":"enum\u003cstring>"},"stopTags":{"type":"array","description":"Stop tags this policy applies to.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"resources.items.[INDEX].operationDurationPolicies.items.[INDEX].stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"resources.items.[INDEX].operationDurationPolicies.items.[INDEX].stopTags","typeLabel":"string[]"}},"uniqueKey":"resources.items.[INDEX].operationDurationPolicies.items.[INDEX]","typeLabel":"object"},"uniqueKey":"resources.items.[INDEX].operationDurationPolicies","typeLabel":"object[]"},"travelTimeCoefficient":{"description":"Multiplier applied to every network-computed travel time for this resource, to account for a systematically slower or faster driver.","type":"number","format":"float","example":1.05,"uniqueKey":"resources.items.[INDEX].travelTimeCoefficient","typeLabel":"number\u003cfloat>"},"emptyThresholdByCapacity":{"type":"object","description":"Thresholds for capacities below which a resource is considered \"empty\" for empty distance calculation. A resource is \"empty\" (kilometres travelled count as empty distance) when all capacities are at or below their threshold.\n","example":{"volume":50,"weight":100,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"resources.items.[INDEX].emptyThresholdByCapacity.additionalProperties","typeLabel":"number"},"uniqueKey":"resources.items.[INDEX].emptyThresholdByCapacity","typeLabel":"object"},"avoidEarlyLoadings":{"type":"array","description":"Early loading declarations for this resource. Each entry names a stop tag for the `minimizeEarlyLoadings` objective, and optionally the capacities to track. A plan with declarations must also list that objective in `objectives`. Otherwise, the plan is refused with a `400`. See `AvoidEarlyLoading`.","items":{"type":"object","description":"Declares a stop tag where loading early should be avoided, for the `minimizeEarlyLoadings` objective. A loading is early when a vehicle loads an order at a stop with this tag, such as a depot, then comes back to a stop with the tag before delivering the order. The objective also tracks orders going the other way, such as a return that a vehicle collects elsewhere and brings back to a depot.\n\nA pass is a visit to a stop with the tag. Consecutive stops with the tag count as one pass. For each tracked order, the objective counts the passes between the moment the order is loaded and the moment it is delivered. The pass where the order is loaded or unloaded at a stop with the tag counts too.\n\nThese declarations and the `minimizeEarlyLoadings` objective go together. A plan with one and not the other is refused with a `400` `INVALID_INPUT`. This includes a plan that omits `objectives`, because the default list doesn't contain `minimizeEarlyLoadings`.\n\n> **Modelling pitfall.** A declaration can track nothing without raising any error, for example with a `stopTag` that no stop carries, a plan-level key that no resource carries, or `capacities` that no loaded stop carries. The objective is then missing from the solution, or its value is 0.\n","required":["stopTag"],"example":{"stopTag":"depot1","capacities":["weight","volume"]},"properties":{"stopTag":{"type":"string","description":"Stop tag of the stops where loading early should be avoided, for example a depot's tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"depot1","isRequired":true,"uniqueKey":"resources.items.[INDEX].avoidEarlyLoadings.items.[INDEX].stopTag","typeLabel":"string"},"capacities":{"type":"array","description":"Capacities whose loads are tracked. Only orders that load or unload one of these capacities at a stop with `stopTag` count. If the list is empty or omitted, all capacities are tracked.\n","items":{"type":"string","uniqueKey":"resources.items.[INDEX].avoidEarlyLoadings.items.[INDEX].capacities.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"uniqueKey":"resources.items.[INDEX].avoidEarlyLoadings.items.[INDEX].capacities","typeLabel":"string[]"}},"uniqueKey":"resources.items.[INDEX].avoidEarlyLoadings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"resources.items.[INDEX].avoidEarlyLoadings","typeLabel":"object[]"}},"uniqueKey":"resources.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"resources","typeLabel":"object[]"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"properties.additionalProperties","typeLabel":"string"},"uniqueKey":"properties","typeLabel":"object"},"orders":{"type":"array","description":"Orders (individual stops or groups of stops) to be served by this plan.\n\n> **Default.** Capped at 3,000 entries per plan — see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","items":{"type":"object","description":"One or more `stops` that must all be planned onto the *same* resource, in array order (position in the array acts as a precedence constraint). Only `id` and `stops` are required.\n","required":["id","stops"],"properties":{"id":{"type":"string","description":"Order ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"order1","isRequired":true,"uniqueKey":"orders.items.[INDEX].id","typeLabel":"string"},"stops":{"description":"The stops making up this order; see `Stop` for a single fixed stop vs. a group of alternatives.\n\n> **Default.** Capped at 3,000 stops per plan across all orders combined — see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","type":"array","uniqueItems":true,"items":{"oneOf":[{"type":"object","description":"Either a single stop or a group of alternative stops, of which the engine picks at most one.","required":["id","position"],"properties":{"id":{"type":"string","description":"Single stop ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"stop1","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.id","typeLabel":"string"},"position":{"type":"object","description":"A `{lat, lon}` geographic coordinate.\n\n> **Modelling pitfall.** The API does not geocode addresses; every position submitted must already be a coordinate pair. An incorrectly geocoded position does not raise an error, it silently routes to the wrong place.\n","required":["lon","lat"],"example":{"lon":2.3269331,"lat":48.8812658},"properties":{"lon":{"description":"Longitude, in decimal degrees.","type":"number","minimum":-180,"maximum":180,"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.position.lon","typeLabel":"number"},"lat":{"description":"Latitude, in decimal degrees.","type":"number","minimum":-90,"maximum":90,"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.position.lat","typeLabel":"number"}},"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.position","typeLabel":"object"},"type":{"description":"Always set this explicitly (`\"type\": \"single\"`), even though it defaults and a bare stop object is accepted as-is: a discriminated-union validator re-parsing your own payload (for example a typed SDK confirming it round-trips) needs the tag present in the data itself to pick the right variant, and rejects an object missing it even when the field has a documented default.\n","type":"string","enum":["single"],"default":"single","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.properties.additionalProperties","typeLabel":"string"},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.properties","typeLabel":"object"},"tags":{"description":"prefix:suffix best practice, not forced.","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.tags.items.[INDEX]","typeLabel":"string"},"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.tags","typeLabel":"string[]"},"kind":{"type":"string","description":"Generic operation label from the resource's own point of view. It sets how the stop's `capacities` affect the resource's load: added for `pickup`, deducted for `delivery`, ignored for `acknowledgement` (an intervention with no cargo exchange).\n\n> **Modelling pitfall.** A negative quantity reverses the effect: a `delivery` of `-100` has the same effect as a `pickup` of `100`. A `delivery` whose order has no `pickup` is assumed loaded at departure. With `sharedCapacities: false`, a negative quantity on a `pickup` is also loaded at departure, key by key, minus what the earlier stops of the same order picked up.\n","default":"delivery","enum":["pickup","delivery","acknowledgement"],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.kind","typeLabel":"enum\u003cstring>"},"operationDuration":{"type":"string","description":"Time spent at the stop, in ISO 8601 duration format.\n\n> **Modelling pitfall.** No built-in formula computes this. It is a plain duration computed upstream from business data, for example a fixed per-stop time plus a variable component for quantity delivered.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT10M","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.operationDuration","typeLabel":"string"},"capacities":{"type":"object","description":"Capacities consumed or released at this stop. See the `Capacities` schema.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.capacities.additionalProperties","typeLabel":"number"},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.capacities","typeLabel":"object"},"authorizedTimeWindows":{"description":"One or more hard time windows for the stop. Outside all of them, the stop cannot be planned at all. Accepts an array, so more than one disjoint hard window is native, for example a site open mornings and again in the evening; the stop is feasible if reachable in any one of them. Modelling an acceptable-if-late window as a hard one fails silently: the stop is simply dropped rather than delivered late.\n\n`begin` and `end` bound the start of service, which is the stop's `beginTime` in the solution. They don't bound the arrival. A resource that arrives before `begin` waits until `begin`. That wait counts in the tour's `waitingDuration`, not as a delay.\n\n> **Modelling pitfall.** A contractual delivery window is not automatically a hard one. Ask what should happen if the fleet cannot hit it: if a late visit is acceptable, use `preferredTimeWindows` instead.\n\n> **Modelling pitfall.** The stop can finish up to `operationDuration` after `end`. To express \"must be done and gone by 15:00\", subtract `operationDuration` from `end` yourself: for a 15-minute operation, set `end` to `\"2026-08-03 14:45\"`.\n","type":"array","uniqueItems":true,"items":{"type":"object","description":"`TimeWindow` plus an optional `resourceTags` array, used for `authorizedTimeWindows` / `preferredTimeWindows` on a stop. When `resourceTags` is set, that window only applies to resources carrying a matching tag (for example an early slot reserved for a certified subcontractor); resources without the tag don't see this window. With several tags, a resource that carries any one of them may use the window.\n\nThe same rule applies on `preferredTimeWindows`. If a stop has only tagged preferred windows and no authorized window, a resource without the tag cannot serve the stop. If the stop also has an authorized window with no tag, that resource serves the stop there, with no delay.\n\nOn a stop, `begin` and `end` bound the start of service, not the arrival. A resource that arrives before `begin` waits until `begin`. For `preferredTimeWindows`, the delay is the time between `end` and the start of service.\n","required":["begin","end"],"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX].begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX].end","typeLabel":"string"},"resourceTags":{"type":"array","description":"Resource tags the window is restricted to. Omit to apply the window to every resource regardless of tag.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX].resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX].resourceTags","typeLabel":"string[]"}},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX]","typeLabel":"object"},"example":[{"begin":"2026-03-17 08:00","end":"2026-03-17 12:00"}],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows","typeLabel":"object[]"},"preferredTimeWindows":{"description":"One or more soft time windows for the stop. A window is soft at its end only: a late start is allowed, and it costs the `minimizeDelay` objective. The delay is the start of service minus the window's `end`.\n\nA preferred window is hard at its start. Service never starts before `begin`, and a resource that arrives early waits. A stop whose preferred windows all open after every resource stops working is therefore not planned.\n\nWhen a preferred window closes before the authorized window opens, the stop is served inside the authorized window. The delay is still measured from the `end` of the preferred window. When a preferred window opens after the authorized window closes, the stop is not planned. When a preferred window sits inside a wider authorized window, service waits for the preferred window to open.\n\n> **Modelling pitfall.** A preferred window doesn't make the stop reachable at any time. To express \"deliver at 21:00 if possible, otherwise earlier\", don't use a preferred window: it forbids starting before 21:00. Use an `AlternativesStop` with a 21:00 candidate and an earlier candidate whose preferred window ends one minute before its authorized window opens. See [Hard or preferred window](https://developers.kardinal.ai/guides/time-windows#hard-or-preferred-window).\n","type":"array","uniqueItems":true,"items":{"type":"object","description":"`TimeWindow` plus an optional `resourceTags` array, used for `authorizedTimeWindows` / `preferredTimeWindows` on a stop. When `resourceTags` is set, that window only applies to resources carrying a matching tag (for example an early slot reserved for a certified subcontractor); resources without the tag don't see this window. With several tags, a resource that carries any one of them may use the window.\n\nThe same rule applies on `preferredTimeWindows`. If a stop has only tagged preferred windows and no authorized window, a resource without the tag cannot serve the stop. If the stop also has an authorized window with no tag, that resource serves the stop there, with no delay.\n\nOn a stop, `begin` and `end` bound the start of service, not the arrival. A resource that arrives before `begin` waits until `begin`. For `preferredTimeWindows`, the delay is the time between `end` and the start of service.\n","required":["begin","end"],"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX].begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX].end","typeLabel":"string"},"resourceTags":{"type":"array","description":"Resource tags the window is restricted to. Omit to apply the window to every resource regardless of tag.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX].resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX].resourceTags","typeLabel":"string[]"}},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX]","typeLabel":"object"},"example":[{"begin":"2026-03-17 09:00","end":"2026-03-17 11:00"}],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows","typeLabel":"object[]"}},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Either a single stop or a group of alternative stops, of which the engine picks at most one.","required":["id","type","alternatives"],"properties":{"id":{"type":"string","description":"Alternatives-group ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"altStop1","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.id","typeLabel":"string"},"type":{"description":"Discriminator identifying this stop as an `alternatives` group.","type":"string","enum":["alternatives"],"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"alternatives":{"description":"Candidate single stops, of which the engine picks at most one.","type":"array","items":{"type":"object","description":"Only `id` and `position` are required. See `AlternativesStop` for a stop composed of several candidate `SingleStop` options instead of a single fixed one.\n","required":["id","position"],"properties":{"id":{"type":"string","description":"Single stop ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"stop1","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].id","typeLabel":"string"},"position":{"type":"object","description":"A `{lat, lon}` geographic coordinate.\n\n> **Modelling pitfall.** The API does not geocode addresses; every position submitted must already be a coordinate pair. An incorrectly geocoded position does not raise an error, it silently routes to the wrong place.\n","required":["lon","lat"],"example":{"lon":2.3269331,"lat":48.8812658},"properties":{"lon":{"description":"Longitude, in decimal degrees.","type":"number","minimum":-180,"maximum":180,"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].position.lon","typeLabel":"number"},"lat":{"description":"Latitude, in decimal degrees.","type":"number","minimum":-90,"maximum":90,"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].position.lat","typeLabel":"number"}},"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].position","typeLabel":"object"},"type":{"description":"Always set this explicitly (`\"type\": \"single\"`), even though it defaults and a bare stop object is accepted as-is: a discriminated-union validator re-parsing your own payload (for example a typed SDK confirming it round-trips) needs the tag present in the data itself to pick the right variant, and rejects an object missing it even when the field has a documented default.\n","type":"string","enum":["single"],"default":"single","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].properties","typeLabel":"object"},"tags":{"description":"prefix:suffix best practice, not forced.","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].tags","typeLabel":"string[]"},"kind":{"type":"string","description":"Generic operation label from the resource's own point of view. It sets how the stop's `capacities` affect the resource's load: added for `pickup`, deducted for `delivery`, ignored for `acknowledgement` (an intervention with no cargo exchange).\n\n> **Modelling pitfall.** A negative quantity reverses the effect: a `delivery` of `-100` has the same effect as a `pickup` of `100`. A `delivery` whose order has no `pickup` is assumed loaded at departure. With `sharedCapacities: false`, a negative quantity on a `pickup` is also loaded at departure, key by key, minus what the earlier stops of the same order picked up.\n","default":"delivery","enum":["pickup","delivery","acknowledgement"],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"operationDuration":{"type":"string","description":"Time spent at the stop, in ISO 8601 duration format.\n\n> **Modelling pitfall.** No built-in formula computes this. It is a plain duration computed upstream from business data, for example a fixed per-stop time plus a variable component for quantity delivered.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT10M","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].operationDuration","typeLabel":"string"},"capacities":{"type":"object","description":"Capacities consumed or released at this stop. See the `Capacities` schema.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].capacities.additionalProperties","typeLabel":"number"},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].capacities","typeLabel":"object"},"authorizedTimeWindows":{"description":"One or more hard time windows for the stop. Outside all of them, the stop cannot be planned at all. Accepts an array, so more than one disjoint hard window is native, for example a site open mornings and again in the evening; the stop is feasible if reachable in any one of them. Modelling an acceptable-if-late window as a hard one fails silently: the stop is simply dropped rather than delivered late.\n\n`begin` and `end` bound the start of service, which is the stop's `beginTime` in the solution. They don't bound the arrival. A resource that arrives before `begin` waits until `begin`. That wait counts in the tour's `waitingDuration`, not as a delay.\n\n> **Modelling pitfall.** A contractual delivery window is not automatically a hard one. Ask what should happen if the fleet cannot hit it: if a late visit is acceptable, use `preferredTimeWindows` instead.\n\n> **Modelling pitfall.** The stop can finish up to `operationDuration` after `end`. To express \"must be done and gone by 15:00\", subtract `operationDuration` from `end` yourself: for a 15-minute operation, set `end` to `\"2026-08-03 14:45\"`.\n","type":"array","uniqueItems":true,"items":{"type":"object","description":"`TimeWindow` plus an optional `resourceTags` array, used for `authorizedTimeWindows` / `preferredTimeWindows` on a stop. When `resourceTags` is set, that window only applies to resources carrying a matching tag (for example an early slot reserved for a certified subcontractor); resources without the tag don't see this window. With several tags, a resource that carries any one of them may use the window.\n\nThe same rule applies on `preferredTimeWindows`. If a stop has only tagged preferred windows and no authorized window, a resource without the tag cannot serve the stop. If the stop also has an authorized window with no tag, that resource serves the stop there, with no delay.\n\nOn a stop, `begin` and `end` bound the start of service, not the arrival. A resource that arrives before `begin` waits until `begin`. For `preferredTimeWindows`, the delay is the time between `end` and the start of service.\n","required":["begin","end"],"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX].begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX].end","typeLabel":"string"},"resourceTags":{"type":"array","description":"Resource tags the window is restricted to. Omit to apply the window to every resource regardless of tag.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX].resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX].resourceTags","typeLabel":"string[]"}},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX]","typeLabel":"object"},"example":[{"begin":"2026-03-17 08:00","end":"2026-03-17 12:00"}],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows","typeLabel":"object[]"},"preferredTimeWindows":{"description":"One or more soft time windows for the stop. A window is soft at its end only: a late start is allowed, and it costs the `minimizeDelay` objective. The delay is the start of service minus the window's `end`.\n\nA preferred window is hard at its start. Service never starts before `begin`, and a resource that arrives early waits. A stop whose preferred windows all open after every resource stops working is therefore not planned.\n\nWhen a preferred window closes before the authorized window opens, the stop is served inside the authorized window. The delay is still measured from the `end` of the preferred window. When a preferred window opens after the authorized window closes, the stop is not planned. When a preferred window sits inside a wider authorized window, service waits for the preferred window to open.\n\n> **Modelling pitfall.** A preferred window doesn't make the stop reachable at any time. To express \"deliver at 21:00 if possible, otherwise earlier\", don't use a preferred window: it forbids starting before 21:00. Use an `AlternativesStop` with a 21:00 candidate and an earlier candidate whose preferred window ends one minute before its authorized window opens. See [Hard or preferred window](https://developers.kardinal.ai/guides/time-windows#hard-or-preferred-window).\n","type":"array","uniqueItems":true,"items":{"type":"object","description":"`TimeWindow` plus an optional `resourceTags` array, used for `authorizedTimeWindows` / `preferredTimeWindows` on a stop. When `resourceTags` is set, that window only applies to resources carrying a matching tag (for example an early slot reserved for a certified subcontractor); resources without the tag don't see this window. With several tags, a resource that carries any one of them may use the window.\n\nThe same rule applies on `preferredTimeWindows`. If a stop has only tagged preferred windows and no authorized window, a resource without the tag cannot serve the stop. If the stop also has an authorized window with no tag, that resource serves the stop there, with no delay.\n\nOn a stop, `begin` and `end` bound the start of service, not the arrival. A resource that arrives before `begin` waits until `begin`. For `preferredTimeWindows`, the delay is the time between `end` and the start of service.\n","required":["begin","end"],"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX].begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX].end","typeLabel":"string"},"resourceTags":{"type":"array","description":"Resource tags the window is restricted to. Omit to apply the window to every resource regardless of tag.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX].resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX].resourceTags","typeLabel":"string[]"}},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX]","typeLabel":"object"},"example":[{"begin":"2026-03-17 09:00","end":"2026-03-17 11:00"}],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows","typeLabel":"object[]"}},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives","typeLabel":"object[]"}},"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"orders.items.[INDEX].stops.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"orders.items.[INDEX].stops","typeLabel":"object[]"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"orders.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"orders.items.[INDEX].properties","typeLabel":"object"},"priority":{"description":"Relative importance of the order; lower is more important, and the value can be negative.\n\n> **When to use.** Lower an order's priority, or mark it `optional`, to make an acceptable-to-drop trade-off explicit rather than an unplanned side effect once the fleet is under pressure from higher-priority stops.\n\n> **Modelling pitfall.** Priority levels are strict tiers, not weights: one more planned stop of a more important level outweighs any number of stops of a less important level.\n","type":"integer","default":0,"example":0,"uniqueKey":"orders.items.[INDEX].priority","typeLabel":"integer"},"optional":{"description":"If `true`, the order leaves the `maximizeMandatoryStops` objective: it can be left unplanned without affecting it, and is only placed if `maximizeOptionalStops` is in the plan's objectives. Without that objective it's unlikely to be planned, since it adds cost (distance, duration) without serving any higher-ranked objective.\n\n> **Modelling pitfall.** Not the same as a very low `priority`: a mandatory order, however low its priority, still counts towards `maximizeMandatoryStops`.\n","type":"boolean","uniqueKey":"orders.items.[INDEX].optional","typeLabel":"boolean"},"requiredSkills":{"description":"Hard requirement: a resource must have every listed skill to be assignable to this order.\n","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"orders.items.[INDEX].requiredSkills.items.[INDEX]","typeLabel":"string"},"example":["forklift","truck"],"uniqueKey":"orders.items.[INDEX].requiredSkills","typeLabel":"string[]"},"successiveStops":{"description":"The order's stops must be visited consecutively, with nothing from another order in between. Mutually exclusive with `maxStopSpan`.\n\n> **Default.** An order without `successiveStops` can have at most 4 stops; see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","type":"boolean","uniqueKey":"orders.items.[INDEX].successiveStops","typeLabel":"boolean"},"maxStopSpan":{"type":"string","description":"Maximum time allowed to elapse between the order's stops (for example between a pickup and its delivery), without forcing them to be consecutive.\n\nThe span runs from the end of service at the order's first stop to the start of service at its last stop. Waiting time counts.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"orders.items.[INDEX].maxStopSpan","typeLabel":"string"}},"uniqueKey":"orders.items.[INDEX]","typeLabel":"object"},"uniqueKey":"orders","typeLabel":"object[]"},"additionalOperationDurations":{"type":"array","description":"Additional operation time for a resource and a stop, according to tags (pairs of tags must be unique).","uniqueItems":true,"items":{"type":"object","description":"Additional operation duration by stop tag and resource tag.","required":["resourceTag","stopTag","additionalOperationDuration"],"properties":{"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"additionalOperationDurations.items.[INDEX].resourceTag","typeLabel":"string"},"stopTag":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"heavy","isRequired":true,"uniqueKey":"additionalOperationDurations.items.[INDEX].stopTag","typeLabel":"string"},"additionalOperationDuration":{"type":"string","description":"Extra duration added on top of the stop's own `operationDuration` whenever this `resourceTag`/`stopTag` pair is matched.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"additionalOperationDurations.items.[INDEX].additionalOperationDuration","typeLabel":"string"}},"uniqueKey":"additionalOperationDurations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"additionalOperationDurations","typeLabel":"object[]"},"operationDurationPoliciesByResourceTag":{"type":"object","description":"Policies to remove the operation durations, by resource tag.","additionalProperties":{"type":"array","items":{"type":"object","description":"Policy to indicate which operation duration must not be taken into account.","required":["policy"],"properties":{"policy":{"type":"string","description":"Which operation duration to leave out of the schedule: `withoutFirstOperationDuration` ignores only the first matching stop's operation duration, `withoutOperationDurations` ignores it on every matching stop.\n","enum":["withoutFirstOperationDuration","withoutOperationDurations"],"isRequired":true,"uniqueKey":"operationDurationPoliciesByResourceTag.additionalProperties.items.[INDEX].policy","typeLabel":"enum\u003cstring>"},"stopTags":{"type":"array","description":"Stop tags this policy applies to.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"operationDurationPoliciesByResourceTag.additionalProperties.items.[INDEX].stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"operationDurationPoliciesByResourceTag.additionalProperties.items.[INDEX].stopTags","typeLabel":"string[]"}},"uniqueKey":"operationDurationPoliciesByResourceTag.additionalProperties.items.[INDEX]","typeLabel":"object"},"uniqueKey":"operationDurationPoliciesByResourceTag.additionalProperties","typeLabel":"object[]"},"example":{"trailer":[{"policy":"withoutFirstOperationDuration","stopTags":["access:parking33"]}]},"uniqueKey":"operationDurationPoliciesByResourceTag","typeLabel":"object"},"additionalConstraints":{"type":"array","description":"Extra constraints layered on top of resources' and orders' own fields, such as forbidden assignments or capacity ceilings shared across a group of stops.","items":{"oneOf":[{"type":"object","description":"`additionalConstraints` scope. At every stop of the tour, at least one of the listed capacities must be at or below its given threshold — an OR across the listed capacities, checked at each stop, not a requirement that they all hold together.\n\n> **When to use.** For sequencing stop types or validating multi-compartment configurations. If the tour has not, at each stop, one of its capacities lower than or equal to the given limit, the tour is invalid.\n","required":["type","capacities"],"properties":{"type":{"description":"Discriminator identifying this constraint as `atLeastOneValidCapacity`.","type":"string","enum":["atLeastOneValidCapacity"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"capacities":{"type":"object","description":"Capacity thresholds; at every stop, at least one of these must hold.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.0.capacities.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.0.capacities","typeLabel":"object"},"name":{"description":"Name identifying this constraint, referenced by any resulting `AtLeastOneValidCapacityViolation`.","type":"string","example":"capacityCheck1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.0.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.0.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.0.resourceTags","typeLabel":"string[]"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Bars a specific resource tag from a specific stop tag: a targeted exclusion, narrower than `incompatibleStopTags`.\n\n> **Modelling pitfall.** Only resources that carry `resourceTag` are barred: a resource that you add later without the tag can serve the stop. For a rule that must hold when the fleet changes, use `requiredSkills` on the order and `skills` on the resources. See [Skills and assignments](https://developers.kardinal.ai/guides/skills-and-assignments#barring-one-resource-from-a-stop).\n","required":["type","resourceTag","stopTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `forbiddenAssignment`.","type":"string","enum":["forbiddenAssignment"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.1.resourceTag","typeLabel":"string"},"stopTag":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"heavy","isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.1.stopTag","typeLabel":"string"},"name":{"description":"Name identifying this constraint, referenced by any resulting `ForbiddenAssignmentViolation`.","type":"string","example":"noTrailerAtWarehouse","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.1.name","typeLabel":"string"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Two stop tags can never appear in the same tour, regardless of resource.\n","required":["type","stopTags"],"properties":{"type":{"description":"Discriminator identifying this constraint as `incompatibleStopTags`.","type":"string","enum":["incompatibleStopTags"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"stopTags":{"type":"array","items":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.2.stopTags.items.[INDEX]","typeLabel":"string"},"description":"A pair of incompatible stop tags.","maxItems":2,"minItems":2,"uniqueItems":true,"example":["goat","cabbage"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.2.stopTags","typeLabel":"string[]"},"name":{"description":"Name identifying this constraint, referenced by any resulting `StopIncompatibilityViolation`.","type":"string","example":"noOverlap1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.2.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.2.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.2.resourceTags","typeLabel":"string[]"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Combines several constraints with OR logic: the tour is valid if at least one of `constraints` is satisfied.\n","required":["type","constraints"],"properties":{"type":{"description":"Discriminator identifying this constraint as `atLeastOneConstraint`.","type":"string","enum":["atLeastOneConstraint"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"constraints":{"description":"Constraints combined with OR logic; the tour is valid if at least one is satisfied.","type":"array","items":{"oneOf":[{"type":"object","description":"`additionalConstraints` scope. At every stop of the tour, at least one of the listed capacities must be at or below its given threshold — an OR across the listed capacities, checked at each stop, not a requirement that they all hold together.\n\n> **When to use.** For sequencing stop types or validating multi-compartment configurations. If the tour has not, at each stop, one of its capacities lower than or equal to the given limit, the tour is invalid.\n","required":["type","capacities"],"properties":{"type":{"description":"Discriminator identifying this constraint as `atLeastOneValidCapacity`.","type":"string","enum":["atLeastOneValidCapacity"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"capacities":{"type":"object","description":"Capacity thresholds; at every stop, at least one of these must hold.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.capacities.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.capacities","typeLabel":"object"},"name":{"description":"Name identifying this constraint, referenced by any resulting `AtLeastOneValidCapacityViolation`.","type":"string","example":"capacityCheck1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.resourceTags","typeLabel":"string[]"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Bars a specific resource tag from a specific stop tag: a targeted exclusion, narrower than `incompatibleStopTags`.\n\n> **Modelling pitfall.** Only resources that carry `resourceTag` are barred: a resource that you add later without the tag can serve the stop. For a rule that must hold when the fleet changes, use `requiredSkills` on the order and `skills` on the resources. See [Skills and assignments](https://developers.kardinal.ai/guides/skills-and-assignments#barring-one-resource-from-a-stop).\n","required":["type","resourceTag","stopTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `forbiddenAssignment`.","type":"string","enum":["forbiddenAssignment"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1.resourceTag","typeLabel":"string"},"stopTag":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"heavy","isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1.stopTag","typeLabel":"string"},"name":{"description":"Name identifying this constraint, referenced by any resulting `ForbiddenAssignmentViolation`.","type":"string","example":"noTrailerAtWarehouse","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1.name","typeLabel":"string"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Two stop tags can never appear in the same tour, regardless of resource.\n","required":["type","stopTags"],"properties":{"type":{"description":"Discriminator identifying this constraint as `incompatibleStopTags`.","type":"string","enum":["incompatibleStopTags"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"stopTags":{"type":"array","items":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.stopTags.items.[INDEX]","typeLabel":"string"},"description":"A pair of incompatible stop tags.","maxItems":2,"minItems":2,"uniqueItems":true,"example":["goat","cabbage"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.stopTags","typeLabel":"string[]"},"name":{"description":"Name identifying this constraint, referenced by any resulting `StopIncompatibilityViolation`.","type":"string","example":"noOverlap1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.resourceTags","typeLabel":"string[]"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2","typeLabel":"object"},{},{"type":"object","description":"`additionalConstraints` scope. Fine-grained capacity constraint beyond the base resource/stop matching, valid if all the listed capacities are satisfied. Unlike the other `additionalConstraints` types, it does not currently surface a named violation in the solution; use it as a member of `atLeastOneConstraint`, not on its own at the top level of `additionalConstraints`.\n","required":["type","capacities","resourceTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `capacities`.","type":"string","enum":["capacities"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"capacities":{"type":"object","description":"Capacities that must be satisfied.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.capacities.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.capacities","typeLabel":"object"},"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.resourceTag","typeLabel":"string"},"name":{"description":"Name identifying this constraint. No violation is currently reported for this constraint type.","type":"string","example":"capacityLimit1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.name","typeLabel":"string"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Caps how many separate visits to stops sharing a tag a resource can make.\n\n> **When to use.** For limiting depot returns, or forcing a shared-equipment tag to stay with a single resource across the tour. If the tour has stops whose `stopTags` constitute too many groups, the tour is invalid.\n","required":["type","maxGroupsByStopTag"],"properties":{"type":{"type":"string","description":"Discriminator identifying this constraint as `maxStopTagGroups`.","enum":["maxStopTagGroups"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"},"maxGroupsByStopTag":{"type":"object","description":"Maximum number of separate visit groups allowed, by stop tag.","example":{"depot":2,"delivery":10},"additionalProperties":{"type":"integer","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.maxGroupsByStopTag.additionalProperties","typeLabel":"integer"},"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.maxGroupsByStopTag","typeLabel":"object"},"name":{"type":"string","description":"Name identifying this constraint, referenced by any resulting `MaxStopTagGroupsViolation`.","example":"maxDepotVisits","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.resourceTags","typeLabel":"string[]"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Enforces a last-in-first-out unloading order on a resource: with `strategy: \"lifo\"`, a resource can only unload the last thing it loaded. Not a rule about which stops get dropped from an over-constrained plan.\n\n> **When to use.** For a stacked or sequential-loading vehicle, such as a car carrier loading vehicles nose-to-tail on a single deck, or a multi-deck cage truck, where physically nothing can be unloaded except the item that went on last. Set it on the resource tag or tags representing that vehicle class.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this constraint as `removalStrategy`.","type":"string","enum":["removalStrategy"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"},"name":{"description":"Name identifying this constraint, referenced by any resulting `RemovalStrategyViolation`.","type":"string","example":"lifoRule1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.resourceTags","typeLabel":"string[]"},"capacities":{"description":"Capacity names tracked for the last-in-first-out ordering.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.capacities.items.[INDEX]","typeLabel":"string"},"example":["volume","length"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.capacities","typeLabel":"string[]"},"strategy":{"type":"string","description":"The unloading order to enforce.","default":"lifo","enum":["lifo"],"example":"lifo","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.strategy","typeLabel":"enum\u003cstring>"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6","typeLabel":"object"}],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.constraints","typeLabel":"object[]"},"name":{"description":"Name identifying this constraint, referenced by any resulting `AtLeastOneConstraintViolation`.","type":"string","example":"orConstraint1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3.name","typeLabel":"string"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Fine-grained capacity constraint beyond the base resource/stop matching, valid if all the listed capacities are satisfied. Unlike the other `additionalConstraints` types, it does not currently surface a named violation in the solution; use it as a member of `atLeastOneConstraint`, not on its own at the top level of `additionalConstraints`.\n","required":["type","capacities","resourceTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `capacities`.","type":"string","enum":["capacities"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"capacities":{"type":"object","description":"Capacities that must be satisfied.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.4.capacities.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.4.capacities","typeLabel":"object"},"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.4.resourceTag","typeLabel":"string"},"name":{"description":"Name identifying this constraint. No violation is currently reported for this constraint type.","type":"string","example":"capacityLimit1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.4.name","typeLabel":"string"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Caps how many separate visits to stops sharing a tag a resource can make.\n\n> **When to use.** For limiting depot returns, or forcing a shared-equipment tag to stay with a single resource across the tour. If the tour has stops whose `stopTags` constitute too many groups, the tour is invalid.\n","required":["type","maxGroupsByStopTag"],"properties":{"type":{"type":"string","description":"Discriminator identifying this constraint as `maxStopTagGroups`.","enum":["maxStopTagGroups"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"},"maxGroupsByStopTag":{"type":"object","description":"Maximum number of separate visit groups allowed, by stop tag.","example":{"depot":2,"delivery":10},"additionalProperties":{"type":"integer","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.5.maxGroupsByStopTag.additionalProperties","typeLabel":"integer"},"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.5.maxGroupsByStopTag","typeLabel":"object"},"name":{"type":"string","description":"Name identifying this constraint, referenced by any resulting `MaxStopTagGroupsViolation`.","example":"maxDepotVisits","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.5.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.5.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.5.resourceTags","typeLabel":"string[]"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Enforces a last-in-first-out unloading order on a resource: with `strategy: \"lifo\"`, a resource can only unload the last thing it loaded. Not a rule about which stops get dropped from an over-constrained plan.\n\n> **When to use.** For a stacked or sequential-loading vehicle, such as a car carrier loading vehicles nose-to-tail on a single deck, or a multi-deck cage truck, where physically nothing can be unloaded except the item that went on last. Set it on the resource tag or tags representing that vehicle class.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this constraint as `removalStrategy`.","type":"string","enum":["removalStrategy"],"isRequired":true,"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"},"name":{"description":"Name identifying this constraint, referenced by any resulting `RemovalStrategyViolation`.","type":"string","example":"lifoRule1","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.6.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.6.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.6.resourceTags","typeLabel":"string[]"},"capacities":{"description":"Capacity names tracked for the last-in-first-out ordering.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.6.capacities.items.[INDEX]","typeLabel":"string"},"example":["volume","length"],"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.6.capacities","typeLabel":"string[]"},"strategy":{"type":"string","description":"The unloading order to enforce.","default":"lifo","enum":["lifo"],"example":"lifo","uniqueKey":"additionalConstraints.items.[INDEX].oneOf.6.strategy","typeLabel":"enum\u003cstring>"}},"uniqueKey":"additionalConstraints.items.[INDEX].oneOf.6","typeLabel":"object"}],"uniqueKey":"additionalConstraints.items.[INDEX]","typeLabel":"object"},"uniqueKey":"additionalConstraints","typeLabel":"object[]"},"globalConstraints":{"type":"array","description":"List of global constraints to be satisfied by the returned solution.","items":{"type":"object","description":"`globalConstraints` scope (whole fleet, not just one tour). Caps a cost total (for example number of active resources in a tag group) across the whole fleet. Provides an upper bound on the cost of specified resources.\n","required":["type","maximum","costsByResourceTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `maxCumulatedCost`.","type":"string","enum":["maxCumulatedCost"],"isRequired":true,"uniqueKey":"globalConstraints.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"maximum":{"description":"The constraint's maximum allowed cumulated cost, in the same unit as the costs in `costsByResourceTag`. It is required and has no default: a constraint without it is rejected with a `400` `INVALID_VALUE` error. This is a hard limit: the engine leaves stops unplanned rather than exceed it, so a mandatory stop can end up in `unaffectedStopIds`. The exception is locked stops that already cost more than `maximum`. They are stops in a tour with `state.mode: fixed`, or `status: fixed` entries in a `free` tour. The engine keeps them, goes over `maximum`, and reports it in `globalViolations`. Currently, once locked stops break the cap, it no longer limits new cost under its tags, and the engine can still add a tagged vehicle.\n","type":"number","example":1000,"isRequired":true,"uniqueKey":"globalConstraints.items.[INDEX].maximum","typeLabel":"number"},"costsByResourceTag":{"type":"object","description":"The cost counted towards `maximum` for each resource that carries the tag, by resource tag.\n\n> **Modelling pitfall.** A tag that no resource of the plan carries, for example one with a typing error, counts nothing. The API accepts the plan, and returns a warning for that tag in the `warnings` of its response.\n","example":{"trailer":{"using":120}},"additionalProperties":{"type":"object","description":"Cost structure of a resource. Fields are cumulative: the total cost of a tour is the sum of the contributions of every field that is set.\n\n> **Modelling pitfall.** Each field applies to a different base. The same cost must be expressed only once; setting both `using` and a `costFloor` on `km` applies a flat cost and a floor to the same distance rather than two independent contributions.\n","properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties","typeLabel":"object"},"isRequired":true,"uniqueKey":"globalConstraints.items.[INDEX].costsByResourceTag","typeLabel":"object"},"name":{"description":"Name identifying this constraint, referenced by any resulting `GlobalViolationMaxCumulatedCost`.","type":"string","example":"fleetCostCap","uniqueKey":"globalConstraints.items.[INDEX].name","typeLabel":"string"}},"uniqueKey":"globalConstraints.items.[INDEX]","typeLabel":"object"},"uniqueKey":"globalConstraints","typeLabel":"object[]"},"accessDurationsByStopTag":{"type":"object","description":"Fixed extra duration charged once, before the first of a group of consecutive stops sharing a tag, in ISO 8601 duration format.\n\n> **When to use.** For a cost paid once per visit to a tagged location, such as a 30-minute dock access time. For a cost paid on every stop regardless of what came before it, use a stop's own `operationDuration` instead.\n","additionalProperties":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"accessDurationsByStopTag.additionalProperties","typeLabel":"string"},"example":{"access:parking33":"PT5M"},"uniqueKey":"accessDurationsByStopTag","typeLabel":"object"},"overlappingCapacitiesByStopTag":{"type":"object","description":"Target maximum number of resources physically present at the same time at stops sharing a tag.\n\n> **When to use.** To model a shared bottleneck resource such as a depot with a limited number of loading docks, or a cross-dock with limited simultaneous capacity, for example limiting a two-dock depot to 2 resources at once.\n\n> **Modelling pitfall.** A soft limit, not a hard cap: overruns are minimized by the `minimizeOverOverlappingCapacitiesOnStops` objective, so how firmly the engine keeps to the limit depends on that objective's position in `objectives`, and it has no effect if that objective is left out.\n","additionalProperties":{"type":"integer","uniqueKey":"overlappingCapacitiesByStopTag.additionalProperties","typeLabel":"integer"},"example":{"capa:bat22":3},"uniqueKey":"overlappingCapacitiesByStopTag","typeLabel":"object"},"setupDurations":{"type":"array","description":"Sequence-dependent changeover times to add whenever a resource travels directly between two stops carrying a matching pair of tags.","items":{"type":"object","description":"Extra changeover duration inserted when a resource travels directly from a stop tagged `fromStopTag` to a stop tagged `toStopTag`.","required":["fromStopTag","toStopTag","setupDuration"],"properties":{"fromStopTag":{"type":"string","description":"Tag of the stop the resource is leaving.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"setup:france","isRequired":true,"uniqueKey":"setupDurations.items.[INDEX].fromStopTag","typeLabel":"string"},"toStopTag":{"type":"string","description":"Tag of the stop the resource is arriving at next.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"setup:belgium","isRequired":true,"uniqueKey":"setupDurations.items.[INDEX].toStopTag","typeLabel":"string"},"setupDuration":{"type":"string","description":"Changeover duration added between the two stops, in ISO 8601 duration format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"setupDurations.items.[INDEX].setupDuration","typeLabel":"string"}},"uniqueKey":"setupDurations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"setupDurations","typeLabel":"object[]"},"objectives":{"type":"array","items":{"oneOf":[{"type":"string","description":"Name of a built-in objective, used as an entry in `PlanObjectives`.\n\n- maximizeMandatoryStops: Maximizes the number of non-optional stops actually planned.\n- minimizeDelay: Minimizes the sum of delays against stops' `preferredTimeWindows`; only lateness counts, never earliness.\n- minimizeCosts: Minimizes the plan's total cost, as defined by each resource's `cost`.\n- minimizeResources: Favours using fewer resources over spreading stops across more of them.\n- minimizeOverOverlappingCapacitiesOnStops: Minimizes how far the limits set in `Plan.overlappingCapacitiesByStopTag` are exceeded, in resources simultaneously present beyond the limit.\n- maximizeOptionalStops: Maximizes the number of optional stops planned in addition to mandatory ones.\n- maximizePreferredStops: Maximizes stops matched to a resource's `preferredStopTags`.\n- minimizeLargestTourDuration: Minimizes the working duration of the single longest tour across the fleet (travel, service, and waiting time), balancing workload between resources.\n- minimizeWorkingDuration: Minimizes the total working duration summed across every tour, waiting time included.\n- minimizeDistance: Minimizes the total distance travelled summed across every tour.\n- minimizeEarlyLoadings: Minimizes early loadings. A loading is early when a vehicle loads an order at a stop with a declared tag, such as a depot, then comes back to a stop with that tag before delivering the order. The declarations go in a resource's `avoidEarlyLoadings` or in `Plan.avoidEarlyLoadingsByResourceTag` (see `AvoidEarlyLoading`). A plan with the objective and no declaration, or the reverse, is refused with a `400`.\n","enum":["maximizeMandatoryStops","minimizeDelay","minimizeCosts","minimizeResources","minimizeOverOverlappingCapacitiesOnStops","maximizeOptionalStops","maximizePreferredStops","minimizeLargestTourDuration","minimizeWorkingDuration","minimizeDistance","minimizeEarlyLoadings"],"uniqueKey":"objectives.items.[INDEX].oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Objective that rewards the engine for respecting a set of \"this stop tag before that stop tag\" precedence pairs, as an entry in `PlanObjectives`.\n\n> **Modelling pitfall.** This is a preference, not a hard rule: the engine can break a pair when time windows or other objectives make it the better choice. When the engine plans the tour itself, the only order it always keeps is the order of the stops inside one order's `stops` array. Rank `maximizeMandatoryStops` and `maximizeOptionalStops` before `maximizePrecedences`. With another order, the API accepts the plan and keeps your order, but it returns an `INVALID_VALUE` warning in the `warnings` of the POST or PUT response. If you ignore it, the engine can leave stops unplanned to keep a precedence order. The value of the `maximizePrecedences(valid-precedences)` line in the solution is a score, not a plain count of respected pairs. Currently, depots, stops without a tag, and stops whose tag is only a `previous` tag add nothing to it.\n","required":["type","precedences"],"properties":{"type":{"type":"string","description":"Discriminator identifying this objective as `maximizePrecedences`.","enum":["maximizePrecedences"],"isRequired":true,"uniqueKey":"objectives.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"precedences":{"type":"array","description":"Precedence pairs the engine tries to satisfy as many of as possible.","items":{"type":"object","description":"A pair of stop tags that the engine tries to visit in this order.\n\nThe pair only counts between stops of the same tour, and it looks at the order of the visits, not at their times. Pairs chain: \"A before B\" and \"B before C\" also mean \"A before C\". A loop of pairs is refused with a 400 error.\n","required":["previous","next"],"properties":{"previous":{"type":"string","description":"Stop tag that the engine tries to visit before any stop tagged `next` in the same tour.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"sector1","isRequired":true,"uniqueKey":"objectives.items.[INDEX].oneOf.1.precedences.items.[INDEX].previous","typeLabel":"string"},"next":{"type":"string","description":"Stop tag that the engine tries to visit only after every stop tagged `previous` in the same tour.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"sector2","isRequired":true,"uniqueKey":"objectives.items.[INDEX].oneOf.1.precedences.items.[INDEX].next","typeLabel":"string"}},"uniqueKey":"objectives.items.[INDEX].oneOf.1.precedences.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"objectives.items.[INDEX].oneOf.1.precedences","typeLabel":"object[]"},"disableGroupProximity":{"type":"boolean","default":false,"description":"If true, the engine does not add the second objective that it otherwise runs right after `maximizePrecedences`.\n\nThat second objective brings each badly placed stop closer to its first valid position, to keep the stops of one sector together. It therefore ranks before every objective listed after `maximizePrecedences`, including `minimizeCosts` and `minimizeDistance`.\n\n> **When to use.** Set it to `true` when you need the order of the pairs but not the grouping by sector.\n","uniqueKey":"objectives.items.[INDEX].oneOf.1.disableGroupProximity","typeLabel":"boolean"}},"uniqueKey":"objectives.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"User-defined objective, as an entry in `PlanObjectives`, that optimizes a cost expression built from `costsByResourceTag` in the given `direction` instead of using a built-in objective from `ObjectivesEnum`.\n","required":["type","name","direction","costsByResourceTag"],"properties":{"type":{"type":"string","description":"Discriminator identifying this objective as `custom`.","enum":["custom"],"isRequired":true,"uniqueKey":"objectives.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"Name identifying this custom objective. Must not collide with a built-in `ObjectivesEnum` value.","example":"minimizeFuelCost","not":{"type":"string","pattern":"^(maximizeMandatoryStops|minimizeDelay|minimizeCosts|minimizeResources|minimizeOverOverlappingCapacitiesOnStops|maximizeOptionalStops|maximizePreferredStops|minimizeLargestTourDuration|minimizeWorkingDuration|minimizeDistance|minimizeEarlyLoadings)$"},"isRequired":true,"uniqueKey":"objectives.items.[INDEX].oneOf.2.name","typeLabel":"string"},"direction":{"type":"string","description":"Whether the engine should minimize or maximize the resulting cost.","enum":["minimize","maximize"],"isRequired":true,"uniqueKey":"objectives.items.[INDEX].oneOf.2.direction","typeLabel":"enum\u003cstring>"},"costsByResourceTag":{"type":"object","description":"Cost expression the engine optimizes, evaluated per resource tag.","example":{"trailer":{"using":120}},"additionalProperties":{"type":"object","description":"Cost structure of a resource. Fields are cumulative: the total cost of a tour is the sum of the contributions of every field that is set.\n\n> **Modelling pitfall.** Each field applies to a different base. The same cost must be expressed only once; setting both `using` and a `costFloor` on `km` applies a flat cost and a floor to the same distance rather than two independent contributions.\n","properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties","typeLabel":"object"},"isRequired":true,"uniqueKey":"objectives.items.[INDEX].oneOf.2.costsByResourceTag","typeLabel":"object"}},"uniqueKey":"objectives.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"objectives.items.[INDEX]","typeLabel":"enum\u003cstring> · object · object"},"description":"Objectives the engine optimizes for this plan; see `PlanObjectives` for how priority order drives trade-offs.","default":["maximizeMandatoryStops","minimizeDelay","minimizeCosts","minimizeResources","minimizeOverOverlappingCapacitiesOnStops","maximizeOptionalStops","maximizePreferredStops","minimizeWorkingDuration","minimizeDistance"],"uniqueKey":"objectives","typeLabel":"enum\u003cstring> · object · object[]"},"maxOptimizationDuration":{"type":"string","description":"Maximum time the engine is allowed to search, in ISO 8601 duration format. The engine stops early on its own once it stops finding improvements, so an overly generous value costs only a longer worst case, never a worse solution.\n\n> **Default.** If omitted, 5 seconds for the sandbox agency and 15 minutes for the production agency. A value exceeding the agency's maximum (5 seconds for the sandbox, 6 hours for production by default) is clamped to it, with a warning in the response; see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n\n> **Modelling pitfall.** A good solution typically takes about `PT10S` for 1 resource and 15 stops, `PT2M` for 5 resources and 100 stops, `PT10M` for 30 resources and 800 stops, and `PT30M` for 45 resources and 3,000 stops. These values are indicative, not a guarantee: a plan can converge faster or slower depending on its constraints, and past about 800 stops the 15-minute production default is too short. Size this value against your own data (see [Handling large volumes](https://developers.kardinal.ai/guides/handling-large-volumes#sizing-maxoptimizationduration-for-a-large-problem)).\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT1H","uniqueKey":"maxOptimizationDuration","typeLabel":"string"},"tz":{"type":"string","description":"Time zone this plan's resources and stops are scheduled in. Local datetimes in the plan are read in it, and the API writes plan and solution datetimes back in its offset; see [Dates and time zones](https://developers.kardinal.ai/reference/data-model#dates-and-time-zones).","example":"Europe/Paris","uniqueKey":"tz","typeLabel":"string"},"lateDeparture":{"description":"Allows resources to depart later than the earliest feasible moment in their `workingTimeWindow`, when doing so does not hurt the objectives.\n\n> **Default.** `false`: resources always leave as early as possible.\n","type":"boolean","default":false,"uniqueKey":"lateDeparture","typeLabel":"boolean"},"sharedCapacities":{"description":"Sets how the engine treats a `pickup` whose quantity is negative. A vehicle's ceiling always applies to everything on board, whatever the order, and this flag does not change that.\n\nWith `false`, the engine treats a pickup with a negative quantity as a delivery only. The goods are loaded at departure, and the stop takes them off the vehicle. With `true`, the stop stays a normal pickup that removes load. The pickup of another order can then fill the vehicle before it.\n\nFor example, a truck has a `weight` ceiling of 100 kg. It collects a bin of 80 kg with a `pickup` that has `capacities: {\"weight\": 80}`. The bin is open from 08:00 to 09:00. The dump site is a `pickup` of another order, with `capacities: {\"weight\": -80}`. The dump site is open from 12:00 to 13:00, so the truck visits the bin first. With `true`, the load is 80 kg after the bin and 0 kg after the dump site. With `false`, the engine would load the 80 kg of the dump site at departure. The load would then reach 160 kg after the bin, over the ceiling. The engine therefore leaves the dump-site stop in `unaffectedStopIds`. The solution shows no violation.\n\n> **When to use.** Set `true` for waste collection, when you write the emptying at the dump site as a `pickup` with a negative quantity. It is the recommended setting for that model. For any other model, keep `false`.\n\n> **Default.** `false`: a pickup with a negative quantity is loaded at departure, then removed at the stop.\n","type":"boolean","default":false,"uniqueKey":"sharedCapacities","typeLabel":"boolean"},"emptyThresholdByCapacityByResourceTag":{"description":"Thresholds for capacities below which a resource is considered \"empty\" for empty distance calculation, grouped by resource tag. A resource is \"empty\" (kilometres travelled count as empty distance) when all capacities are at or below their threshold. The wildcard tag \"*\" matches all resources.\n","type":"object","additionalProperties":{"type":"object","description":"Free-form map from a capacity name to a quantity, tracked as its own independent dimension on both resources and stops. For every key a resource declares, the running total never exceeds the resource's value for that key at any point in the tour. A key the stop consumes but the resource doesn't declare is unconstrained on that resource.\n\n> **When to use.** For a vehicle carrying exactly one item at a time whose size varies by trip, a count-based ceiling (`{\"containers\": 1}`) is robust to size variance; a size-based ceiling (`{\"volume\": \u003cmax item size>}`) is needed only when overflow or partial-load reporting matters.\n\n> **Modelling pitfall.** Capacity keys are matched by exact string, with no case-folding. A typo such as `weight` on a resource against `Weight` on a stop raises no error: it silently leaves that dimension unlimited for the stop instead of enforcing the resource's ceiling.\n","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"emptyThresholdByCapacityByResourceTag.additionalProperties.additionalProperties","typeLabel":"number"},"uniqueKey":"emptyThresholdByCapacityByResourceTag.additionalProperties","typeLabel":"object"},"example":{"heavy":{"weight":150,"volume":75},"*":{"weight":50}},"uniqueKey":"emptyThresholdByCapacityByResourceTag","typeLabel":"object"},"avoidEarlyLoadingsByResourceTag":{"type":"object","description":"Early loading declarations grouped by resource tag. The wildcard tag \"*\" matches all resources. Each entry names a stop tag for the `minimizeEarlyLoadings` objective, and optionally the capacities to track. A plan with declarations must also list that objective in `objectives`. Otherwise, the plan is refused with a `400`. See `AvoidEarlyLoading`.\n","additionalProperties":{"type":"array","items":{"type":"object","description":"Declares a stop tag where loading early should be avoided, for the `minimizeEarlyLoadings` objective. A loading is early when a vehicle loads an order at a stop with this tag, such as a depot, then comes back to a stop with the tag before delivering the order. The objective also tracks orders going the other way, such as a return that a vehicle collects elsewhere and brings back to a depot.\n\nA pass is a visit to a stop with the tag. Consecutive stops with the tag count as one pass. For each tracked order, the objective counts the passes between the moment the order is loaded and the moment it is delivered. The pass where the order is loaded or unloaded at a stop with the tag counts too.\n\nThese declarations and the `minimizeEarlyLoadings` objective go together. A plan with one and not the other is refused with a `400` `INVALID_INPUT`. This includes a plan that omits `objectives`, because the default list doesn't contain `minimizeEarlyLoadings`.\n\n> **Modelling pitfall.** A declaration can track nothing without raising any error, for example with a `stopTag` that no stop carries, a plan-level key that no resource carries, or `capacities` that no loaded stop carries. The objective is then missing from the solution, or its value is 0.\n","required":["stopTag"],"example":{"stopTag":"depot1","capacities":["weight","volume"]},"properties":{"stopTag":{"type":"string","description":"Stop tag of the stops where loading early should be avoided, for example a depot's tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"depot1","isRequired":true,"uniqueKey":"avoidEarlyLoadingsByResourceTag.additionalProperties.items.[INDEX].stopTag","typeLabel":"string"},"capacities":{"type":"array","description":"Capacities whose loads are tracked. Only orders that load or unload one of these capacities at a stop with `stopTag` count. If the list is empty or omitted, all capacities are tracked.\n","items":{"type":"string","uniqueKey":"avoidEarlyLoadingsByResourceTag.additionalProperties.items.[INDEX].capacities.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"uniqueKey":"avoidEarlyLoadingsByResourceTag.additionalProperties.items.[INDEX].capacities","typeLabel":"string[]"}},"uniqueKey":"avoidEarlyLoadingsByResourceTag.additionalProperties.items.[INDEX]","typeLabel":"object"},"uniqueKey":"avoidEarlyLoadingsByResourceTag.additionalProperties","typeLabel":"object[]"},"example":{"*":[{"stopTag":"depot1","capacities":["weight","volume"]}],"heavy":[{"stopTag":"warehouse"}]},"uniqueKey":"avoidEarlyLoadingsByResourceTag","typeLabel":"object"},"CO2EmissionCalculationByResourceTag":{"type":"object","description":"Optional CO2 emission calculation parameters grouped by resource tag. Each value is a `Cost`-shaped object. Applies to every resource carrying the corresponding tag. When set, the resulting emissions are reported on tours as `CO2Emission` and aggregated on the solution as `CO2Emission`. If a resource matches multiple tags, only its first declared matching tag is used. Overridden by the resource-level declaration.\n","additionalProperties":{"type":"object","description":"Cost structure of a resource. Fields are cumulative: the total cost of a tour is the sum of the contributions of every field that is set.\n\n> **Modelling pitfall.** Each field applies to a different base. The same cost must be expressed only once; setting both `using` and a `costFloor` on `km` applies a flat cost and a floor to the same distance rather than two independent contributions.\n","properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"CO2EmissionCalculationByResourceTag.additionalProperties","typeLabel":"object"},"example":{"resTag2":{"km":{"costCoeff":0.55},"costPerCapacityPerTravelledKm":{"weight":{"costCoeff":0.2}}}},"uniqueKey":"CO2EmissionCalculationByResourceTag","typeLabel":"object"}},"required":["resources"],"uniqueKey":"","typeLabel":"object"},"examples":{"addUrgentOrder":{"title":"addUrgentOrder","summary":"Same plan, with an urgent order added mid-shift","value":{"tz":"Europe/Paris","resources":[{"id":"resource1","vehicleProfile":{"type":"fly","kmph":20},"workingTimeWindow":{"begin":"2026-03-21 08:00","end":"2026-03-21 23:00"}}],"orders":[{"id":"order-1","stops":[{"type":"single","id":"Balard","position":{"lon":2.279424,"lat":48.835749},"kind":"pickup","operationDuration":"PT5M30S"}]},{"id":"order-2","stops":[{"type":"single","id":"Dauphine","position":{"lon":2.274264,"lat":48.870087},"kind":"pickup","operationDuration":"PT5M30S"}]},{"id":"order-3","stops":[{"type":"single","id":"Station-f","position":{"lon":2.370564,"lat":48.83476},"kind":"pickup","operationDuration":"PT5M30S"}]},{"id":"order-4","stops":[{"type":"single","id":"Republique","position":{"lon":2.363103,"lat":48.867347},"kind":"pickup","operationDuration":"PT5M30S"}]}],"maxOptimizationDuration":"PT1M"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"774df4a7-40f6-4752-9271-7eb6227c0158":{"description":"Plan response updated.","content":{"application/json":{"schema":{"type":"object","description":"A single plan wrapped with its identifying metadata, as returned by the plan-retrieval endpoints.","properties":{"item":{"type":"object","description":"The plan itself.","required":["resources"],"properties":{"resources":{"type":"array","description":"Resources (vehicles, drivers, or vehicle-and-driver pairs) available to serve this plan's orders.\n\n> **Default.** Capped at 250 entries per plan — see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","items":{"type":"object","description":"A vehicle-driver pair for the duration of the plan. Only `id`, `vehicleProfile`, and `workingTimeWindow` are required; everything else defaults to \"unconstrained\".\n\n`capacities`, `skills`, and `tags` are all free-form: the API doesn't predefine `weight` or `forklift` as special values. Whatever keys are used on a resource must match the keys used on the stops/orders it is expected to serve.\n","required":["id","vehicleProfile","workingTimeWindow"],"properties":{"id":{"type":"string","description":"Resource ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"resource1","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].id","typeLabel":"string"},"vehicleProfile":{"oneOf":[{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type","kmph"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `fly`.","type":"string","enum":["fly"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.0.type","typeLabel":"enum\u003cstring>"},"kmph":{"description":"Constant travel speed, in km/h, used to compute crow-fly travel times. You must send `kmph` with the `fly` profile. It must be strictly positive. The API refuses a `fly` profile without it, or with 0 or less, with a `400` error.\n","type":"number","minimum":0,"exclusiveMinimum":true,"example":60,"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.0.kmph","typeLabel":"number"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.0","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `pedestrian`.","type":"string","enum":["pedestrian"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.1.type","typeLabel":"enum\u003cstring>"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.1.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.1.avoidSeasonalClosure","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.1.avoidDirtRoad","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.1.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.1.excludedCountries","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.1","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `bicycle`.","type":"string","enum":["bicycle"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.2.type","typeLabel":"enum\u003cstring>"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.2.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.2.avoidSeasonalClosure","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.2.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.2.avoidDirtRoad","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.2.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.2.excludedCountries","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.2","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `scooter`.","type":"string","enum":["scooter"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.type","typeLabel":"enum\u003cstring>"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.avoidSeasonalClosure","typeLabel":"boolean"},"avoidCarShuttleTrain":{"description":"Excludes car-carrying shuttle trains from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.avoidCarShuttleTrain","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.avoidDirtRoad","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.excludedCountries","typeLabel":"string[]"},"speedCap":{"description":"Maximum travel speed, in metres per second (m/s), applied to every road segment regardless of its posted speed limit. The value must be between 1 and 70, which is 3.6 to 252 km/h. Decimals are accepted. To cap a vehicle at 80 km/h, send `22.22`, which is 80 divided by 3.6.\n\n> **Modelling pitfall.** `speedCap` is in metres per second, not in km/h. A value written in km/h, such as `50`, is read as 180 km/h, so it rarely slows the vehicle. The API refuses the whole plan with a `400` error when `speedCap` is outside 1 to 70.\n","type":"number","minimum":1,"maximum":70,"example":12.5,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3.speedCap","typeLabel":"number"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.3","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `motorbike`.","type":"string","enum":["motorbike"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.type","typeLabel":"enum\u003cstring>"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.avoidSeasonalClosure","typeLabel":"boolean"},"avoidControlledAccessHighway":{"description":"Excludes motorways and other controlled-access highways from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.avoidControlledAccessHighway","typeLabel":"boolean"},"avoidCarShuttleTrain":{"description":"Excludes car-carrying shuttle trains from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.avoidCarShuttleTrain","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.avoidDirtRoad","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.excludedCountries","typeLabel":"string[]"},"speedCap":{"description":"Maximum travel speed, in metres per second (m/s), applied to every road segment regardless of its posted speed limit. The value must be between 1 and 70, which is 3.6 to 252 km/h. Decimals are accepted. To cap a vehicle at 80 km/h, send `22.22`, which is 80 divided by 3.6.\n\n> **Modelling pitfall.** `speedCap` is in metres per second, not in km/h. A value written in km/h, such as `50`, is read as 180 km/h, so it rarely slows the vehicle. The API refuses the whole plan with a `400` error when `speedCap` is outside 1 to 70.\n","type":"number","minimum":1,"maximum":70,"example":27.78,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4.speedCap","typeLabel":"number"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.4","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `car`.","type":"string","enum":["car"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.type","typeLabel":"enum\u003cstring>"},"withTraffic":{"description":"Enables predictive traffic in travel-time estimates (billed separately). For any plan where `preferredTimeWindows`/`authorizedTimeWindows` matter, travel-time estimates computed without it are systematically optimistic, which erodes on-time performance against exactly the time windows being targeted.\n","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.withTraffic","typeLabel":"boolean"},"avoidTollRoad":{"description":"Excludes toll roads from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.avoidTollRoad","typeLabel":"boolean"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.avoidSeasonalClosure","typeLabel":"boolean"},"avoidControlledAccessHighway":{"description":"Excludes motorways and other controlled-access highways from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.avoidControlledAccessHighway","typeLabel":"boolean"},"avoidCarShuttleTrain":{"description":"Excludes car-carrying shuttle trains from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.avoidCarShuttleTrain","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.avoidDirtRoad","typeLabel":"boolean"},"avoidUTurns":{"description":"Excludes U-turns from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.avoidUTurns","typeLabel":"boolean"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.excludedCountries","typeLabel":"string[]"},"speedCap":{"description":"Maximum travel speed, in metres per second (m/s), applied to every road segment regardless of its posted speed limit. The value must be between 1 and 70, which is 3.6 to 252 km/h. Decimals are accepted. To cap a vehicle at 80 km/h, send `22.22`, which is 80 divided by 3.6.\n\n> **Modelling pitfall.** `speedCap` is in metres per second, not in km/h. A value written in km/h, such as `50`, is read as 180 km/h, so it rarely slows the vehicle. The API refuses the whole plan with a `400` error when `speedCap` is outside 1 to 70.\n","type":"number","minimum":1,"maximum":70,"example":27.78,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5.speedCap","typeLabel":"number"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.5","typeLabel":"object"},{"type":"object","description":"Mode of transport and its travel constraints. Each type exposes different parameters; `truck` is the richest (weight, dimensions, hazardous goods, toll/tunnel/highway avoidance). See the individual `VehicleProfile*` schemas for the full parameter list of each mode. Only the `fly` profile reads `kmph`.\n\n> **Modelling pitfall.** A road profile accepts `kmph` without an error or a warning. It then ignores the value.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this vehicle profile as `truck`.","type":"string","enum":["truck"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.type","typeLabel":"enum\u003cstring>"},"grossWeight":{"description":"Gross vehicle weight, in kilograms, used to respect weight-restricted roads.","type":"number","example":12000,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.grossWeight","typeLabel":"number"},"withTraffic":{"description":"Enables predictive traffic in travel-time estimates (billed separately). For any plan where `preferredTimeWindows`/`authorizedTimeWindows` matter, travel-time estimates computed without it are systematically optimistic, which erodes on-time performance against exactly the time windows being targeted.\n","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.withTraffic","typeLabel":"boolean"},"avoidTollRoad":{"description":"Excludes toll roads from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.avoidTollRoad","typeLabel":"boolean"},"avoidFerry":{"description":"Excludes ferry crossings from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.avoidFerry","typeLabel":"boolean"},"avoidSeasonalClosure":{"description":"Excludes roads that are closed during part of the year.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.avoidSeasonalClosure","typeLabel":"boolean"},"avoidControlledAccessHighway":{"description":"Excludes motorways and other controlled-access highways from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.avoidControlledAccessHighway","typeLabel":"boolean"},"avoidCarShuttleTrain":{"description":"Excludes car-carrying shuttle trains from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.avoidCarShuttleTrain","typeLabel":"boolean"},"avoidTunnel":{"description":"Excludes tunnels from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.avoidTunnel","typeLabel":"boolean"},"avoidDirtRoad":{"description":"Excludes unpaved or dirt roads from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.avoidDirtRoad","typeLabel":"boolean"},"avoidUTurns":{"description":"Excludes U-turns from computed routes.","type":"boolean","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.avoidUTurns","typeLabel":"boolean"},"shippedHazardousGoods":{"description":"Categories of hazardous goods carried, used to respect roads restricted to those categories.","type":"array","items":{"type":"string","description":"ADR hazard class of a good carried by the vehicle, used to respect roads restricted to that class of hazardous goods.\n\n- explosive: Substances or articles liable to explode.\n- gas: Compressed, liquefied, or dissolved gases.\n- flammable: Flammable liquids.\n- combustible: Flammable solids, or solids liable to spontaneous combustion.\n- organic: Organic peroxides.\n- poison: Toxic substances.\n- radioactive: Radioactive materials.\n- corrosive: Corrosive substances.\n- poisonousInhalation: Substances toxic by inhalation.\n- harmfulToWater: Substances harmful to the aquatic environment.\n- other: Any hazard class not covered by the preceding values.\n","enum":["explosive","gas","flammable","combustible","organic","poison","radioactive","corrosive","poisonousInhalation","harmfulToWater","other"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.shippedHazardousGoods.items.[INDEX]","typeLabel":"enum\u003cstring>"},"example":["explosive","gas","flammable"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.shippedHazardousGoods","typeLabel":"enum\u003cstring>[]"},"excludedCountries":{"type":"array","items":{"type":"string","description":"A country's standard name, Alpha-2 code, or Alpha-3 code.","example":"Switzerland","uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.excludedCountries.items.[INDEX]","typeLabel":"string"},"description":"Countries to route around entirely.","example":["Switzerland","BE","ITA"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.excludedCountries","typeLabel":"string[]"},"height":{"description":"Vehicle height, as a whole number of centimetres, used to respect height-restricted roads such as low bridges.","type":"integer","example":420,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.height","typeLabel":"integer"},"width":{"description":"Vehicle width, as a whole number of centimetres, used to respect width-restricted roads.","type":"integer","example":250,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.width","typeLabel":"integer"},"length":{"description":"Vehicle length, as a whole number of centimetres, used to respect length-restricted roads.","type":"integer","example":1200,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.length","typeLabel":"integer"},"tunnelCategory":{"type":"string","description":"ADR tunnel restriction category to route around, from `B` (least restrictive) to `E` (most restrictive).\n\n- B: Restricted for goods liable to a very large explosion.\n- C: Restricted for goods liable to a very large explosion, a large explosion, or a large toxic release.\n- D: Restricted for goods liable to a very large explosion, a large explosion, a large toxic release, or a fire.\n- E: Restricted for all dangerous goods, except those exempted from tunnel restrictions altogether.\n","enum":["B","C","D","E"],"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.tunnelCategory","typeLabel":"enum\u003cstring>"},"speedCap":{"description":"Maximum travel speed, in metres per second (m/s), applied to every road segment regardless of its posted speed limit. The value must be between 1 and 70, which is 3.6 to 252 km/h. Decimals are accepted. To cap a vehicle at 80 km/h, send `22.22`, which is 80 divided by 3.6.\n\n> **Modelling pitfall.** `speedCap` is in metres per second, not in km/h. A value written in km/h, such as `50`, is read as 180 km/h, so it rarely slows the vehicle. The API refuses the whole plan with a `400` error when `speedCap` is outside 1 to 70.\n","type":"number","minimum":1,"maximum":70,"example":22.22,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6.speedCap","typeLabel":"number"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].vehicleProfile","typeLabel":"object"},"workingTimeWindow":{"type":"object","description":"Time window during which the resource is available to work. Often paired with `maxWorkingDuration`, since a wide window does not by itself mean a long shift.\n\n> **Modelling pitfall.** Spanning more than one calendar day does not, on its own, force any rest between working days. Encode daily rest explicitly in `breaks[]`, for example one `timeWindowBreak` per night, with a window longer than the rest. See [Multi-day trips](https://developers.kardinal.ai/guides/multi-day).\n","required":["begin","end"],"example":{"begin":"2026-03-17 08:00","end":"2026-03-17 18:00"},"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].workingTimeWindow.begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].workingTimeWindow.end","typeLabel":"string"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].workingTimeWindow","typeLabel":"object"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"item.resources.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"item.resources.items.[INDEX].properties","typeLabel":"object"},"state":{"type":"object","description":"Resource's current mode and, when re-optimizing a plan whose resources are already underway, the stops, breaks, begin or end already committed to that resource.\n","properties":{"mode":{"type":"string","description":"Whether the engine may add stops to this resource's tour beyond its `state.assignments` (`free`), or must limit the tour to those assigned entries (`fixed`). How each entry is treated within the tour is set separately, by its `status` (see `AssignmentStatus`).\n\n> **When to use.** `free` with `status: \"fixed\"` entries for live supervision: the entries already done are taken as given, and the engine plans further stops after them. `fixed` with `status: \"assigned\"` entries to check whether a given set of stops is feasible on this resource, see [Handling infeasibility](https://developers.kardinal.ai/guides/handling-infeasibility#testing-a-stop-on-a-specific-resource-with-state-assignments).\n\n> **Modelling pitfall.** `fixed` limits which stops the tour contains, not their order: with `status: \"assigned\"` entries, the engine still sequences them according to the plan's objectives. `free` combined with `status: \"assigned\"` entries isn't allowed.\n","default":"free","enum":["free","fixed"],"uniqueKey":"item.resources.items.[INDEX].state.mode","typeLabel":"enum\u003cstring>"},"assignments":{"type":"array","description":"Waypoints to pin onto this resource's tour before the engine plans the rest of it, ordered as they occur on the tour.\n\n> **When to use.** For re-optimizing a plan mid-execution: fix the waypoints a resource has already completed or is already committed to, then let the engine re-plan everything that comes after.\n","items":{"oneOf":[{"type":"object","description":"Pins a stop onto a resource's tour. `beginTime` defaults to `arrivalTime` only when `departureTime` is omitted too. If you set `departureTime`, set `beginTime` as well, or the API refuses the plan with a `400` error. If `stopId` is the id of an `AlternativesStop` alternative, `arrivalTime`, `beginTime`, and `departureTime` cannot be set: the engine still chooses and times the alternative itself.\n","required":["type","stopId"],"properties":{"type":{"type":"string","description":"Discriminator identifying this waypoint as a stop.","enum":["stop"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"stopId":{"type":"string","description":"Id of the pinned stop.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"stop1","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.stopId","typeLabel":"string"},"status":{"type":"string","description":"How an entry in `state.assignments` is treated: taken as given, with its position in the sequence and its pinned times left unchallenged (`fixed`), or only assigned to this resource, with the engine sequencing it according to the plan's objectives (`assigned`).\n","default":"fixed","enum":["fixed","assigned"],"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.status","typeLabel":"enum\u003cstring>"},"arrivalTime":{"type":"string","description":"Time the resource reaches the stop.","example":"2019-11-15T12:34:56Z","uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.arrivalTime","typeLabel":"string"},"beginTime":{"type":"string","description":"Time the resource starts serving the stop. Defaults to `arrivalTime` only when `departureTime` is omitted too.","example":"2019-11-15T12:34:56Z","uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.beginTime","typeLabel":"string"},"departureTime":{"type":"string","description":"Time the resource leaves the stop.","example":"2019-11-15T12:34:56Z","uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0.departureTime","typeLabel":"string"}},"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Pins the start of a resource's tour to a fixed departure time.","required":["type","departureTime"],"properties":{"type":{"type":"string","description":"Discriminator identifying this waypoint as the tour's begin.","enum":["begin"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"departureTime":{"type":"string","description":"Time the resource departs.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.1.departureTime","typeLabel":"string"},"status":{"type":"string","description":"How an entry in `state.assignments` is treated: taken as given, with its position in the sequence and its pinned times left unchallenged (`fixed`), or only assigned to this resource, with the engine sequencing it according to the plan's objectives (`assigned`).\n","default":"fixed","enum":["fixed","assigned"],"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.1.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Pins a break onto a resource's tour.","required":["type","arrivalTime","departureTime"],"properties":{"type":{"type":"string","description":"Discriminator identifying this waypoint as a break.","enum":["break"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"arrivalTime":{"type":"string","description":"Time the break waypoint starts. It can be earlier than the break itself, for example when the waypoint includes a wait.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2.arrivalTime","typeLabel":"string"},"departureTime":{"type":"string","description":"Time the break ends.\n\n> **Modelling pitfall.** `arrivalTime` and `departureTime` show where and when the engine placed the break. They do not show how long the break lasted, and the span can be longer than the break, for example when it includes a wait.\n","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2.departureTime","typeLabel":"string"},"status":{"type":"string","description":"How an entry in `state.assignments` is treated: taken as given, with its position in the sequence and its pinned times left unchallenged (`fixed`), or only assigned to this resource, with the engine sequencing it according to the plan's objectives (`assigned`).\n","default":"fixed","enum":["fixed","assigned"],"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"Pins the end of a resource's tour to a fixed arrival time.","required":["type","arrivalTime"],"properties":{"type":{"type":"string","description":"Discriminator identifying this waypoint as the tour's end.","enum":["end"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"arrivalTime":{"type":"string","description":"Time the resource arrives at the end of its tour.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.3.arrivalTime","typeLabel":"string"},"status":{"type":"string","description":"How an entry in `state.assignments` is treated: taken as given, with its position in the sequence and its pinned times left unchallenged (`fixed`), or only assigned to this resource, with the engine sequencing it according to the plan's objectives (`assigned`).\n","default":"fixed","enum":["fixed","assigned"],"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.3.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"item.resources.items.[INDEX].state.assignments.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.resources.items.[INDEX].state.assignments","typeLabel":"object[]"}},"uniqueKey":"item.resources.items.[INDEX].state","typeLabel":"object"},"cost":{"type":"object","description":"Custom cost model (per km, per capacity unit, fixed cost) used by the `minimizeCosts` objective.","properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].cost.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].cost.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].cost.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].cost.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].cost.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].cost.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].cost.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].cost.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].cost.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].cost.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].cost.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].cost.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"item.resources.items.[INDEX].cost.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].cost.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].cost.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].cost.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].cost.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].cost.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].cost.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"item.resources.items.[INDEX].cost.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"item.resources.items.[INDEX].cost.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"item.resources.items.[INDEX].cost.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"item.resources.items.[INDEX].cost","typeLabel":"object"},"CO2EmissionCalculation":{"type":"object","description":"Optional CO2 emission calculation parameters for this resource. The object is `Cost`-shaped.\nTypical fields:\n - `km`: emission per travelled kilometre (for example `costCoeff` in g/km);\n - `costPerCapacityPerTravelledKm`: per-capacity emission per travelled kilometre;\n - `costPerCapacityPerTravelledHour`: per-capacity emission per travel hour (travel duration only).\nWhen set, the resulting emissions are reported on the tour as `CO2Emission`.\nTakes precedence over any matching plan-level declaration.\n","example":{"km":{"costCoeff":0.55},"costPerCapacityPerTravelledKm":{"weight":{"costCoeff":0.2}},"costPerCapacityPerTravelledHour":{"weight":{"costCoeff":0.05}}},"properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"item.resources.items.[INDEX].CO2EmissionCalculation","typeLabel":"object"},"priority":{"description":"Relative importance of the resource; lower is more important, and the value can be negative.\n\n> **When to use.** Used by `minimizeResources` to decide which resources to leave unused first under fleet pressure: it minimizes the least important resources first (highest number), so they're the first left unused.\n","type":"integer","default":0,"example":0,"uniqueKey":"item.resources.items.[INDEX].priority","typeLabel":"integer"},"skills":{"description":"Qualifications this resource has. Matched against an order's `requiredSkills`.","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.resources.items.[INDEX].skills.items.[INDEX]","typeLabel":"string"},"example":["forklift","truck"],"uniqueKey":"item.resources.items.[INDEX].skills","typeLabel":"string[]"},"preferredStopTags":{"description":"Soft counterpart to `skills`/`requiredSkills`, used with the `maximizePreferredStops` objective.\n\n> **When to use.** For a preference between resources, not a hard requirement. Use `skills`/`requiredSkills` instead when a resource must have the qualification.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.resources.items.[INDEX].preferredStopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"item.resources.items.[INDEX].preferredStopTags","typeLabel":"string[]"},"tags":{"description":"Free-form tags, referenced by plan-level mechanisms (`additionalConstraints`, `costsByResourceTag`, `accessDurationsByStopTag`, and so on).\n","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.resources.items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"example":["trailer"],"uniqueKey":"item.resources.items.[INDEX].tags","typeLabel":"string[]"},"capacities":{"type":"object","description":"Capacity ceilings available on this resource. See the `Capacities` schema.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.resources.items.[INDEX].capacities.additionalProperties","typeLabel":"number"},"uniqueKey":"item.resources.items.[INDEX].capacities","typeLabel":"object"},"departure":{"type":"object","description":"Start coordinates of the resource's route, typically a depot. If omitted, the working day starts at the first visited stop instead.\n\n> **Modelling pitfall.** Depots are not first-class objects in this API. Resolve a depot to its `{lat, lon}` position on the client side before building the plan.\n","required":["lon","lat"],"example":{"lon":2.3269331,"lat":48.8812658},"properties":{"lon":{"description":"Longitude, in decimal degrees.","type":"number","minimum":-180,"maximum":180,"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].departure.lon","typeLabel":"number"},"lat":{"description":"Latitude, in decimal degrees.","type":"number","minimum":-90,"maximum":90,"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].departure.lat","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].departure","typeLabel":"object"},"arrival":{"oneOf":[{"type":"object","description":"End coordinates of the resource's route, typically a depot, as a raw `{lat, lon}` position (see `departure`). If omitted, the working day ends at the last visited stop instead.\n\n> **When to use.** Set this to the literal string `\"atFirstPosition\"` instead of a position to make the resource return to wherever its tour actually started, rather than to a separate fixed point.\n","required":["lon","lat"],"example":{"lon":2.3269331,"lat":48.8812658},"properties":{"lon":{"description":"Longitude, in decimal degrees.","type":"number","minimum":-180,"maximum":180,"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].arrival.oneOf.0.lon","typeLabel":"number"},"lat":{"description":"Latitude, in decimal degrees.","type":"number","minimum":-90,"maximum":90,"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].arrival.oneOf.0.lat","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].arrival.oneOf.0","typeLabel":"object"},{"type":"string","description":"End coordinates of the resource's route, typically a depot, as a raw `{lat, lon}` position (see `departure`). If omitted, the working day ends at the last visited stop instead.\n\n> **When to use.** Set this to the literal string `\"atFirstPosition\"` instead of a position to make the resource return to wherever its tour actually started, rather than to a separate fixed point.\n","enum":["atFirstPosition"],"uniqueKey":"item.resources.items.[INDEX].arrival.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"item.resources.items.[INDEX].arrival","typeLabel":"object | enum\u003cstring>"},"maxWorkingDuration":{"type":"string","description":"Maximum working time (travel, service, breaks and waiting combined) inside `workingTimeWindow`, in ISO 8601 duration format.\n\n> **Modelling pitfall.** On a resource that works several days, size it for the whole trip, counting the time spent on breaks and on waiting. A cap sized for one working day rules out any tour that works on both sides of the rest. The engine then leaves unplaced the stops that need such a tour, with no error.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT8H","uniqueKey":"item.resources.items.[INDEX].maxWorkingDuration","typeLabel":"string"},"maxDistanceInKm":{"description":"Maximum total distance the resource may travel over the plan, in kilometres. The distance is measured along the route the resource drives. In production, the route follows the roads.","type":"number","example":200,"uniqueKey":"item.resources.items.[INDEX].maxDistanceInKm","typeLabel":"number"},"maxInterStopDistanceInKm":{"oneOf":[{"type":"number","description":"Maximum distance between two consecutive stops on a tour, in kilometres, measured along the route. Either a scalar value applied uniformly to every travel of the tour, or a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`).\n\n> **Default.** Each key of the structured form is independent; an absent key means no constraint on that segment, not a constraint set to zero.\n","example":50,"uniqueKey":"item.resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.0","typeLabel":"number"},{"type":"object","description":"Maximum distance between two consecutive stops on a tour, in kilometres, measured along the route. Either a scalar value applied uniformly to every travel of the tour, or a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`).\n\n> **Default.** Each key of the structured form is independent; an absent key means no constraint on that segment, not a constraint set to zero.\n","example":{"firstTravel":10,"interStop":25,"lastTravel":15},"properties":{"firstTravel":{"description":"Maximum distance, in km, between the resource's departure and the first stop.","type":"number","example":10,"uniqueKey":"item.resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.1.firstTravel","typeLabel":"number"},"interStop":{"description":"Maximum distance, in km, between two consecutive intermediate stops (excluding the first and last travels).","type":"number","example":25,"uniqueKey":"item.resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.1.interStop","typeLabel":"number"},"lastTravel":{"description":"Maximum distance, in km, between the last stop and the resource's arrival.","type":"number","example":15,"uniqueKey":"item.resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.1.lastTravel","typeLabel":"number"}},"uniqueKey":"item.resources.items.[INDEX].maxInterStopDistanceInKm.oneOf.1","typeLabel":"object"}],"uniqueKey":"item.resources.items.[INDEX].maxInterStopDistanceInKm","typeLabel":"number | object"},"maxInterStopDuration":{"oneOf":[{"type":"string","description":"Maximum duration between two consecutive stops on a tour. Either a single duration applied uniformly to every travel of the tour, or a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`).\n\n> **Default.** Each key of the structured form is independent; an absent key means no constraint on that segment, not a constraint set to zero.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"item.resources.items.[INDEX].maxInterStopDuration.oneOf.0","typeLabel":"string"},{"type":"object","description":"Maximum duration between two consecutive stops on a tour. Either a single duration applied uniformly to every travel of the tour, or a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`).\n\n> **Default.** Each key of the structured form is independent; an absent key means no constraint on that segment, not a constraint set to zero.\n","example":{"firstTravel":"PT15M","interStop":"PT30M","lastTravel":"PT20M"},"properties":{"firstTravel":{"type":"string","description":"Maximum duration between the resource's departure and the first stop.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"item.resources.items.[INDEX].maxInterStopDuration.oneOf.1.firstTravel","typeLabel":"string"},"interStop":{"type":"string","description":"Maximum duration between two consecutive intermediate stops (excluding the first and last travels).","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"item.resources.items.[INDEX].maxInterStopDuration.oneOf.1.interStop","typeLabel":"string"},"lastTravel":{"type":"string","description":"Maximum duration between the last stop and the resource's arrival.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"item.resources.items.[INDEX].maxInterStopDuration.oneOf.1.lastTravel","typeLabel":"string"}},"uniqueKey":"item.resources.items.[INDEX].maxInterStopDuration.oneOf.1","typeLabel":"object"}],"uniqueKey":"item.resources.items.[INDEX].maxInterStopDuration","typeLabel":"string | object"},"breaks":{"description":"Breaks to schedule into this resource's tour; see `Break` for the three available kinds.\n\n> **Modelling pitfall.** Currently, the engine schedules a break only where the vehicle already stands, never in the middle of a drive. A `timeWindowBreak` can fall at the start of the tour. For a `timeWindowBreak`, a drive that covers the whole time the break could take place is impossible. The engine then leaves the stops that need that drive unplaced. It returns no error and no violation. A sliding break falls only after a stop, never at the start of the tour. For a `travelDurationSlidingBreak` or a `workingDurationSlidingBreak`, the engine allows a drive longer than `maxInterBreakDuration`. When the limit is already passed on arrival at a stop, it adds the missed breaks at that stop, if the tour goes on after it. Nothing catches up the last drive. The engine marks the tour valid and reports no violation. To keep a long drive within the rule, give the route a stop where the break can fall, then check the gaps in the solution. See [Where a break can fall](https://developers.kardinal.ai/guides/breaks#where-a-break-can-fall).\n","type":"array","items":{"oneOf":[{"type":"object","description":"A resource's `breaks` array mixes any of the three types below; they are not mutually exclusive, and a break counts as working time unless its type says otherwise.\n\nA `timeWindowBreak` is hard: the engine drops stops rather than skip the break. Currently, a tour that ends before the window opens has no break waypoint. A tour that keeps running past the end of the window gets a break waypoint. A tour that ends inside the window gets none when enough of the window remains after the tour ends, and the engine drops stops when too little remains. It isn't confirmed whether a wait at a stop counts as the break. A sliding break is not scheduled when the tour is shorter than `maxInterBreakDuration`.\n\n> **Modelling pitfall.** The two sliding types (`workingDurationSlidingBreak`, `travelDurationSlidingBreak`) count the same physical break toward both their clocks. Define both together for a shift with a labor-time rule and a driving-time rule, rather than assuming one covers the other.\n\n> **Default.** For a resource whose `workingTimeWindow` spans more than one calendar day, `breaks` is where daily rest has to be encoded; a wide window does not produce it on its own.\n","required":["type","duration","timeWindow"],"properties":{"type":{"description":"Discriminator identifying this break as `timeWindowBreak`.","type":"string","enum":["timeWindowBreak"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"duration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.duration","typeLabel":"string"},"timeWindow":{"type":"object","description":"Plain `{begin, end}` window, used for `workingTimeWindow` and break windows. See `TaggedTimeWindow` for the variant used on a stop's `authorizedTimeWindows` / `preferredTimeWindows`.\n","required":["begin","end"],"example":{"begin":"2026-03-17 12:00","end":"2026-03-17 13:00"},"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.timeWindow.begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.timeWindow.end","typeLabel":"string"}},"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.0.timeWindow","typeLabel":"object"}},"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A resource's `breaks` array mixes any of the three types below; they are not mutually exclusive, and a break counts as working time unless its type says otherwise.\n\nA `timeWindowBreak` is hard: the engine drops stops rather than skip the break. Currently, a tour that ends before the window opens has no break waypoint. A tour that keeps running past the end of the window gets a break waypoint. A tour that ends inside the window gets none when enough of the window remains after the tour ends, and the engine drops stops when too little remains. It isn't confirmed whether a wait at a stop counts as the break. A sliding break is not scheduled when the tour is shorter than `maxInterBreakDuration`.\n\n> **Modelling pitfall.** The two sliding types (`workingDurationSlidingBreak`, `travelDurationSlidingBreak`) count the same physical break toward both their clocks. Define both together for a shift with a labor-time rule and a driving-time rule, rather than assuming one covers the other.\n\n> **Default.** For a resource whose `workingTimeWindow` spans more than one calendar day, `breaks` is where daily rest has to be encoded; a wide window does not produce it on its own.\n","required":["type","minBreakDuration","maxInterBreakDuration"],"properties":{"type":{"description":"Discriminator identifying this break as `travelDurationSlidingBreak`.","type":"string","enum":["travelDurationSlidingBreak"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"minBreakDuration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.1.minBreakDuration","typeLabel":"string"},"maxInterBreakDuration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.1.maxInterBreakDuration","typeLabel":"string"}},"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"A resource's `breaks` array mixes any of the three types below; they are not mutually exclusive, and a break counts as working time unless its type says otherwise.\n\nA `timeWindowBreak` is hard: the engine drops stops rather than skip the break. Currently, a tour that ends before the window opens has no break waypoint. A tour that keeps running past the end of the window gets a break waypoint. A tour that ends inside the window gets none when enough of the window remains after the tour ends, and the engine drops stops when too little remains. It isn't confirmed whether a wait at a stop counts as the break. A sliding break is not scheduled when the tour is shorter than `maxInterBreakDuration`.\n\n> **Modelling pitfall.** The two sliding types (`workingDurationSlidingBreak`, `travelDurationSlidingBreak`) count the same physical break toward both their clocks. Define both together for a shift with a labor-time rule and a driving-time rule, rather than assuming one covers the other.\n\n> **Default.** For a resource whose `workingTimeWindow` spans more than one calendar day, `breaks` is where daily rest has to be encoded; a wide window does not produce it on its own.\n","required":["type","minBreakDuration","maxInterBreakDuration"],"properties":{"type":{"description":"Discriminator identifying this break as `workingDurationSlidingBreak`.","type":"string","enum":["workingDurationSlidingBreak"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"minBreakDuration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.2.minBreakDuration","typeLabel":"string"},"maxInterBreakDuration":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.2.maxInterBreakDuration","typeLabel":"string"}},"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"item.resources.items.[INDEX].breaks.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.resources.items.[INDEX].breaks","typeLabel":"object[]"},"operationDurationPolicies":{"description":"Policies excluding specific operation durations from this resource's tour; see `OperationDurationPolicy`.","type":"array","items":{"type":"object","description":"Policy to indicate which operation duration must not be taken into account.","required":["policy"],"properties":{"policy":{"type":"string","description":"Which operation duration to leave out of the schedule: `withoutFirstOperationDuration` ignores only the first matching stop's operation duration, `withoutOperationDurations` ignores it on every matching stop.\n","enum":["withoutFirstOperationDuration","withoutOperationDurations"],"isRequired":true,"uniqueKey":"item.resources.items.[INDEX].operationDurationPolicies.items.[INDEX].policy","typeLabel":"enum\u003cstring>"},"stopTags":{"type":"array","description":"Stop tags this policy applies to.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.resources.items.[INDEX].operationDurationPolicies.items.[INDEX].stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"item.resources.items.[INDEX].operationDurationPolicies.items.[INDEX].stopTags","typeLabel":"string[]"}},"uniqueKey":"item.resources.items.[INDEX].operationDurationPolicies.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.resources.items.[INDEX].operationDurationPolicies","typeLabel":"object[]"},"travelTimeCoefficient":{"description":"Multiplier applied to every network-computed travel time for this resource, to account for a systematically slower or faster driver.","type":"number","format":"float","example":1.05,"uniqueKey":"item.resources.items.[INDEX].travelTimeCoefficient","typeLabel":"number\u003cfloat>"},"emptyThresholdByCapacity":{"type":"object","description":"Thresholds for capacities below which a resource is considered \"empty\" for empty distance calculation. A resource is \"empty\" (kilometres travelled count as empty distance) when all capacities are at or below their threshold.\n","example":{"volume":50,"weight":100,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.resources.items.[INDEX].emptyThresholdByCapacity.additionalProperties","typeLabel":"number"},"uniqueKey":"item.resources.items.[INDEX].emptyThresholdByCapacity","typeLabel":"object"},"avoidEarlyLoadings":{"type":"array","description":"Early loading declarations for this resource. Each entry names a stop tag for the `minimizeEarlyLoadings` objective, and optionally the capacities to track. A plan with declarations must also list that objective in `objectives`. Otherwise, the plan is refused with a `400`. See `AvoidEarlyLoading`.","items":{"type":"object","description":"Declares a stop tag where loading early should be avoided, for the `minimizeEarlyLoadings` objective. A loading is early when a vehicle loads an order at a stop with this tag, such as a depot, then comes back to a stop with the tag before delivering the order. The objective also tracks orders going the other way, such as a return that a vehicle collects elsewhere and brings back to a depot.\n\nA pass is a visit to a stop with the tag. Consecutive stops with the tag count as one pass. For each tracked order, the objective counts the passes between the moment the order is loaded and the moment it is delivered. The pass where the order is loaded or unloaded at a stop with the tag counts too.\n\nThese declarations and the `minimizeEarlyLoadings` objective go together. A plan with one and not the other is refused with a `400` `INVALID_INPUT`. This includes a plan that omits `objectives`, because the default list doesn't contain `minimizeEarlyLoadings`.\n\n> **Modelling pitfall.** A declaration can track nothing without raising any error, for example with a `stopTag` that no stop carries, a plan-level key that no resource carries, or `capacities` that no loaded stop carries. The objective is then missing from the solution, or its value is 0.\n","required":["stopTag"],"example":{"stopTag":"depot1","capacities":["weight","volume"]},"properties":{"stopTag":{"type":"string","description":"Stop tag of the stops where loading early should be avoided, for example a depot's tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"depot1","isRequired":true,"uniqueKey":"item.resources.items.[INDEX].avoidEarlyLoadings.items.[INDEX].stopTag","typeLabel":"string"},"capacities":{"type":"array","description":"Capacities whose loads are tracked. Only orders that load or unload one of these capacities at a stop with `stopTag` count. If the list is empty or omitted, all capacities are tracked.\n","items":{"type":"string","uniqueKey":"item.resources.items.[INDEX].avoidEarlyLoadings.items.[INDEX].capacities.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"uniqueKey":"item.resources.items.[INDEX].avoidEarlyLoadings.items.[INDEX].capacities","typeLabel":"string[]"}},"uniqueKey":"item.resources.items.[INDEX].avoidEarlyLoadings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.resources.items.[INDEX].avoidEarlyLoadings","typeLabel":"object[]"}},"uniqueKey":"item.resources.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"item.resources","typeLabel":"object[]"},"id":{"type":"string","description":"The plan id.","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","readOnly":true,"example":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","uniqueKey":"item.id","typeLabel":"string\u003cuuid>"},"agencyId":{"type":"string","description":"Identifier of the Kardinal tenant/account the plan is scoped to, derived automatically from the access token used to make the request.\n\n> **Modelling pitfall.** Not a physical-depot or site partition key. A single fleet based at several physical depots is still one `Plan`; do not split it into several `Plan` objects just because resources have different `departure`/`arrival` positions.\n","pattern":"^BLD[0-9]{7}_[a-zA-Z0-9-._~:@!$,]+$","readOnly":true,"example":"BLD1234567_production","uniqueKey":"item.agencyId","typeLabel":"string"},"version":{"type":"integer","description":"The plan version.","minimum":1,"readOnly":true,"example":42,"uniqueKey":"item.version","typeLabel":"integer"},"running":{"type":"boolean","description":"To know if the plan is running.","readOnly":true,"uniqueKey":"item.running","typeLabel":"boolean"},"status":{"type":"object","description":"Fine-grained progress of the plan through the optimization pipeline, broken down by stage.","readOnly":true,"properties":{"planVersionInSolution":{"type":"integer","description":"The plan version taken into account in the current solution.","minimum":1,"example":42,"uniqueKey":"item.status.planVersionInSolution","typeLabel":"integer"},"waitingRoom":{"type":"object","description":"If the maximum number of simultaneous running plans has already been reached, the plan waits in the waiting room for one of the running plans to finish.","properties":{"waitingVersion":{"type":"integer","description":"The version currently waiting.","minimum":1,"example":42,"uniqueKey":"item.status.waitingRoom.waitingVersion","typeLabel":"integer"},"runningVersion":{"type":"integer","description":"The version currently running.","minimum":1,"example":42,"uniqueKey":"item.status.waitingRoom.runningVersion","typeLabel":"integer"}},"uniqueKey":"item.status.waitingRoom","typeLabel":"object"},"waitingTraffic":{"type":"object","description":"The plan is waiting for its traffic coefficients to be computed.","properties":{"waitingVersion":{"type":"integer","description":"The version currently waiting.","minimum":1,"example":42,"uniqueKey":"item.status.waitingTraffic.waitingVersion","typeLabel":"integer"},"runningVersion":{"type":"integer","description":"The version currently running.","minimum":1,"example":42,"uniqueKey":"item.status.waitingTraffic.runningVersion","typeLabel":"integer"}},"uniqueKey":"item.status.waitingTraffic","typeLabel":"object"},"creation":{"type":"object","description":"The plan is being created to be optimized.","properties":{"waitingVersion":{"type":"integer","description":"The version currently waiting.","minimum":1,"example":42,"uniqueKey":"item.status.creation.waitingVersion","typeLabel":"integer"},"runningVersion":{"type":"integer","description":"The version currently running.","minimum":1,"example":42,"uniqueKey":"item.status.creation.runningVersion","typeLabel":"integer"}},"uniqueKey":"item.status.creation","typeLabel":"object"},"optimization":{"type":"object","description":"The plan is being optimized.","properties":{"waitingVersion":{"type":"integer","description":"The version currently waiting.","minimum":1,"example":42,"uniqueKey":"item.status.optimization.waitingVersion","typeLabel":"integer"},"runningVersion":{"type":"integer","description":"The version currently running.","minimum":1,"example":42,"uniqueKey":"item.status.optimization.runningVersion","typeLabel":"integer"}},"uniqueKey":"item.status.optimization","typeLabel":"object"}},"uniqueKey":"item.status","typeLabel":"object"},"state":{"type":"string","description":"Current optimization state of the plan (see `PlanState`). Does not carry the solution itself — once `optimized`, retrieve it separately via `GET /plans/{planId}/solution`.\n","enum":["waiting","processing","preOptimizing","preOptimized","optimizing","optimized","stopped","deleted","interrupted"],"readOnly":true,"uniqueKey":"item.state","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"item.properties.additionalProperties","typeLabel":"string"},"uniqueKey":"item.properties","typeLabel":"object"},"nbResources":{"type":"integer","description":"Number of entries in `resources`, computed by the server.","minimum":0,"readOnly":true,"uniqueKey":"item.nbResources","typeLabel":"integer"},"orders":{"type":"array","description":"Orders (individual stops or groups of stops) to be served by this plan.\n\n> **Default.** Capped at 3,000 entries per plan — see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","items":{"type":"object","description":"One or more `stops` that must all be planned onto the *same* resource, in array order (position in the array acts as a precedence constraint). Only `id` and `stops` are required.\n","required":["id","stops"],"properties":{"id":{"type":"string","description":"Order ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"order1","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].id","typeLabel":"string"},"stops":{"description":"The stops making up this order; see `Stop` for a single fixed stop vs. a group of alternatives.\n\n> **Default.** Capped at 3,000 stops per plan across all orders combined — see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","type":"array","uniqueItems":true,"items":{"oneOf":[{"type":"object","description":"Either a single stop or a group of alternative stops, of which the engine picks at most one.","required":["id","position"],"properties":{"id":{"type":"string","description":"Single stop ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"stop1","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.id","typeLabel":"string"},"position":{"type":"object","description":"A `{lat, lon}` geographic coordinate.\n\n> **Modelling pitfall.** The API does not geocode addresses; every position submitted must already be a coordinate pair. An incorrectly geocoded position does not raise an error, it silently routes to the wrong place.\n","required":["lon","lat"],"example":{"lon":2.3269331,"lat":48.8812658},"properties":{"lon":{"description":"Longitude, in decimal degrees.","type":"number","minimum":-180,"maximum":180,"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.position.lon","typeLabel":"number"},"lat":{"description":"Latitude, in decimal degrees.","type":"number","minimum":-90,"maximum":90,"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.position.lat","typeLabel":"number"}},"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.position","typeLabel":"object"},"type":{"description":"Always set this explicitly (`\"type\": \"single\"`), even though it defaults and a bare stop object is accepted as-is: a discriminated-union validator re-parsing your own payload (for example a typed SDK confirming it round-trips) needs the tag present in the data itself to pick the right variant, and rejects an object missing it even when the field has a documented default.\n","type":"string","enum":["single"],"default":"single","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.properties.additionalProperties","typeLabel":"string"},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.properties","typeLabel":"object"},"tags":{"description":"prefix:suffix best practice, not forced.","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.tags.items.[INDEX]","typeLabel":"string"},"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.tags","typeLabel":"string[]"},"kind":{"type":"string","description":"Generic operation label from the resource's own point of view. It sets how the stop's `capacities` affect the resource's load: added for `pickup`, deducted for `delivery`, ignored for `acknowledgement` (an intervention with no cargo exchange).\n\n> **Modelling pitfall.** A negative quantity reverses the effect: a `delivery` of `-100` has the same effect as a `pickup` of `100`. A `delivery` whose order has no `pickup` is assumed loaded at departure. With `sharedCapacities: false`, a negative quantity on a `pickup` is also loaded at departure, key by key, minus what the earlier stops of the same order picked up.\n","default":"delivery","enum":["pickup","delivery","acknowledgement"],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.kind","typeLabel":"enum\u003cstring>"},"operationDuration":{"type":"string","description":"Time spent at the stop, in ISO 8601 duration format.\n\n> **Modelling pitfall.** No built-in formula computes this. It is a plain duration computed upstream from business data, for example a fixed per-stop time plus a variable component for quantity delivered.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT10M","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.operationDuration","typeLabel":"string"},"capacities":{"type":"object","description":"Capacities consumed or released at this stop. See the `Capacities` schema.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.capacities.additionalProperties","typeLabel":"number"},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.capacities","typeLabel":"object"},"authorizedTimeWindows":{"description":"One or more hard time windows for the stop. Outside all of them, the stop cannot be planned at all. Accepts an array, so more than one disjoint hard window is native, for example a site open mornings and again in the evening; the stop is feasible if reachable in any one of them. Modelling an acceptable-if-late window as a hard one fails silently: the stop is simply dropped rather than delivered late.\n\n`begin` and `end` bound the start of service, which is the stop's `beginTime` in the solution. They don't bound the arrival. A resource that arrives before `begin` waits until `begin`. That wait counts in the tour's `waitingDuration`, not as a delay.\n\n> **Modelling pitfall.** A contractual delivery window is not automatically a hard one. Ask what should happen if the fleet cannot hit it: if a late visit is acceptable, use `preferredTimeWindows` instead.\n\n> **Modelling pitfall.** The stop can finish up to `operationDuration` after `end`. To express \"must be done and gone by 15:00\", subtract `operationDuration` from `end` yourself: for a 15-minute operation, set `end` to `\"2026-08-03 14:45\"`.\n","type":"array","uniqueItems":true,"items":{"type":"object","description":"`TimeWindow` plus an optional `resourceTags` array, used for `authorizedTimeWindows` / `preferredTimeWindows` on a stop. When `resourceTags` is set, that window only applies to resources carrying a matching tag (for example an early slot reserved for a certified subcontractor); resources without the tag don't see this window. With several tags, a resource that carries any one of them may use the window.\n\nThe same rule applies on `preferredTimeWindows`. If a stop has only tagged preferred windows and no authorized window, a resource without the tag cannot serve the stop. If the stop also has an authorized window with no tag, that resource serves the stop there, with no delay.\n\nOn a stop, `begin` and `end` bound the start of service, not the arrival. A resource that arrives before `begin` waits until `begin`. For `preferredTimeWindows`, the delay is the time between `end` and the start of service.\n","required":["begin","end"],"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX].begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX].end","typeLabel":"string"},"resourceTags":{"type":"array","description":"Resource tags the window is restricted to. Omit to apply the window to every resource regardless of tag.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX].resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX].resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows.items.[INDEX]","typeLabel":"object"},"example":[{"begin":"2026-03-17 08:00","end":"2026-03-17 12:00"}],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.authorizedTimeWindows","typeLabel":"object[]"},"preferredTimeWindows":{"description":"One or more soft time windows for the stop. A window is soft at its end only: a late start is allowed, and it costs the `minimizeDelay` objective. The delay is the start of service minus the window's `end`.\n\nA preferred window is hard at its start. Service never starts before `begin`, and a resource that arrives early waits. A stop whose preferred windows all open after every resource stops working is therefore not planned.\n\nWhen a preferred window closes before the authorized window opens, the stop is served inside the authorized window. The delay is still measured from the `end` of the preferred window. When a preferred window opens after the authorized window closes, the stop is not planned. When a preferred window sits inside a wider authorized window, service waits for the preferred window to open.\n\n> **Modelling pitfall.** A preferred window doesn't make the stop reachable at any time. To express \"deliver at 21:00 if possible, otherwise earlier\", don't use a preferred window: it forbids starting before 21:00. Use an `AlternativesStop` with a 21:00 candidate and an earlier candidate whose preferred window ends one minute before its authorized window opens. See [Hard or preferred window](https://developers.kardinal.ai/guides/time-windows#hard-or-preferred-window).\n","type":"array","uniqueItems":true,"items":{"type":"object","description":"`TimeWindow` plus an optional `resourceTags` array, used for `authorizedTimeWindows` / `preferredTimeWindows` on a stop. When `resourceTags` is set, that window only applies to resources carrying a matching tag (for example an early slot reserved for a certified subcontractor); resources without the tag don't see this window. With several tags, a resource that carries any one of them may use the window.\n\nThe same rule applies on `preferredTimeWindows`. If a stop has only tagged preferred windows and no authorized window, a resource without the tag cannot serve the stop. If the stop also has an authorized window with no tag, that resource serves the stop there, with no delay.\n\nOn a stop, `begin` and `end` bound the start of service, not the arrival. A resource that arrives before `begin` waits until `begin`. For `preferredTimeWindows`, the delay is the time between `end` and the start of service.\n","required":["begin","end"],"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX].begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX].end","typeLabel":"string"},"resourceTags":{"type":"array","description":"Resource tags the window is restricted to. Omit to apply the window to every resource regardless of tag.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX].resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX].resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows.items.[INDEX]","typeLabel":"object"},"example":[{"begin":"2026-03-17 09:00","end":"2026-03-17 11:00"}],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0.preferredTimeWindows","typeLabel":"object[]"}},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Either a single stop or a group of alternative stops, of which the engine picks at most one.","required":["id","type","alternatives"],"properties":{"id":{"type":"string","description":"Alternatives-group ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"altStop1","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.id","typeLabel":"string"},"type":{"description":"Discriminator identifying this stop as an `alternatives` group.","type":"string","enum":["alternatives"],"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"alternatives":{"description":"Candidate single stops, of which the engine picks at most one.","type":"array","items":{"type":"object","description":"Only `id` and `position` are required. See `AlternativesStop` for a stop composed of several candidate `SingleStop` options instead of a single fixed one.\n","required":["id","position"],"properties":{"id":{"type":"string","description":"Single stop ids must be unique within a plan.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"stop1","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].id","typeLabel":"string"},"position":{"type":"object","description":"A `{lat, lon}` geographic coordinate.\n\n> **Modelling pitfall.** The API does not geocode addresses; every position submitted must already be a coordinate pair. An incorrectly geocoded position does not raise an error, it silently routes to the wrong place.\n","required":["lon","lat"],"example":{"lon":2.3269331,"lat":48.8812658},"properties":{"lon":{"description":"Longitude, in decimal degrees.","type":"number","minimum":-180,"maximum":180,"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].position.lon","typeLabel":"number"},"lat":{"description":"Latitude, in decimal degrees.","type":"number","minimum":-90,"maximum":90,"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].position.lat","typeLabel":"number"}},"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].position","typeLabel":"object"},"type":{"description":"Always set this explicitly (`\"type\": \"single\"`), even though it defaults and a bare stop object is accepted as-is: a discriminated-union validator re-parsing your own payload (for example a typed SDK confirming it round-trips) needs the tag present in the data itself to pick the right variant, and rejects an object missing it even when the field has a documented default.\n","type":"string","enum":["single"],"default":"single","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].properties","typeLabel":"object"},"tags":{"description":"prefix:suffix best practice, not forced.","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].tags","typeLabel":"string[]"},"kind":{"type":"string","description":"Generic operation label from the resource's own point of view. It sets how the stop's `capacities` affect the resource's load: added for `pickup`, deducted for `delivery`, ignored for `acknowledgement` (an intervention with no cargo exchange).\n\n> **Modelling pitfall.** A negative quantity reverses the effect: a `delivery` of `-100` has the same effect as a `pickup` of `100`. A `delivery` whose order has no `pickup` is assumed loaded at departure. With `sharedCapacities: false`, a negative quantity on a `pickup` is also loaded at departure, key by key, minus what the earlier stops of the same order picked up.\n","default":"delivery","enum":["pickup","delivery","acknowledgement"],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"operationDuration":{"type":"string","description":"Time spent at the stop, in ISO 8601 duration format.\n\n> **Modelling pitfall.** No built-in formula computes this. It is a plain duration computed upstream from business data, for example a fixed per-stop time plus a variable component for quantity delivered.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT10M","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].operationDuration","typeLabel":"string"},"capacities":{"type":"object","description":"Capacities consumed or released at this stop. See the `Capacities` schema.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].capacities.additionalProperties","typeLabel":"number"},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].capacities","typeLabel":"object"},"authorizedTimeWindows":{"description":"One or more hard time windows for the stop. Outside all of them, the stop cannot be planned at all. Accepts an array, so more than one disjoint hard window is native, for example a site open mornings and again in the evening; the stop is feasible if reachable in any one of them. Modelling an acceptable-if-late window as a hard one fails silently: the stop is simply dropped rather than delivered late.\n\n`begin` and `end` bound the start of service, which is the stop's `beginTime` in the solution. They don't bound the arrival. A resource that arrives before `begin` waits until `begin`. That wait counts in the tour's `waitingDuration`, not as a delay.\n\n> **Modelling pitfall.** A contractual delivery window is not automatically a hard one. Ask what should happen if the fleet cannot hit it: if a late visit is acceptable, use `preferredTimeWindows` instead.\n\n> **Modelling pitfall.** The stop can finish up to `operationDuration` after `end`. To express \"must be done and gone by 15:00\", subtract `operationDuration` from `end` yourself: for a 15-minute operation, set `end` to `\"2026-08-03 14:45\"`.\n","type":"array","uniqueItems":true,"items":{"type":"object","description":"`TimeWindow` plus an optional `resourceTags` array, used for `authorizedTimeWindows` / `preferredTimeWindows` on a stop. When `resourceTags` is set, that window only applies to resources carrying a matching tag (for example an early slot reserved for a certified subcontractor); resources without the tag don't see this window. With several tags, a resource that carries any one of them may use the window.\n\nThe same rule applies on `preferredTimeWindows`. If a stop has only tagged preferred windows and no authorized window, a resource without the tag cannot serve the stop. If the stop also has an authorized window with no tag, that resource serves the stop there, with no delay.\n\nOn a stop, `begin` and `end` bound the start of service, not the arrival. A resource that arrives before `begin` waits until `begin`. For `preferredTimeWindows`, the delay is the time between `end` and the start of service.\n","required":["begin","end"],"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX].begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX].end","typeLabel":"string"},"resourceTags":{"type":"array","description":"Resource tags the window is restricted to. Omit to apply the window to every resource regardless of tag.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX].resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX].resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows.items.[INDEX]","typeLabel":"object"},"example":[{"begin":"2026-03-17 08:00","end":"2026-03-17 12:00"}],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].authorizedTimeWindows","typeLabel":"object[]"},"preferredTimeWindows":{"description":"One or more soft time windows for the stop. A window is soft at its end only: a late start is allowed, and it costs the `minimizeDelay` objective. The delay is the start of service minus the window's `end`.\n\nA preferred window is hard at its start. Service never starts before `begin`, and a resource that arrives early waits. A stop whose preferred windows all open after every resource stops working is therefore not planned.\n\nWhen a preferred window closes before the authorized window opens, the stop is served inside the authorized window. The delay is still measured from the `end` of the preferred window. When a preferred window opens after the authorized window closes, the stop is not planned. When a preferred window sits inside a wider authorized window, service waits for the preferred window to open.\n\n> **Modelling pitfall.** A preferred window doesn't make the stop reachable at any time. To express \"deliver at 21:00 if possible, otherwise earlier\", don't use a preferred window: it forbids starting before 21:00. Use an `AlternativesStop` with a 21:00 candidate and an earlier candidate whose preferred window ends one minute before its authorized window opens. See [Hard or preferred window](https://developers.kardinal.ai/guides/time-windows#hard-or-preferred-window).\n","type":"array","uniqueItems":true,"items":{"type":"object","description":"`TimeWindow` plus an optional `resourceTags` array, used for `authorizedTimeWindows` / `preferredTimeWindows` on a stop. When `resourceTags` is set, that window only applies to resources carrying a matching tag (for example an early slot reserved for a certified subcontractor); resources without the tag don't see this window. With several tags, a resource that carries any one of them may use the window.\n\nThe same rule applies on `preferredTimeWindows`. If a stop has only tagged preferred windows and no authorized window, a resource without the tag cannot serve the stop. If the stop also has an authorized window with no tag, that resource serves the stop there, with no delay.\n\nOn a stop, `begin` and `end` bound the start of service, not the arrival. A resource that arrives before `begin` waits until `begin`. For `preferredTimeWindows`, the delay is the time between `end` and the start of service.\n","required":["begin","end"],"properties":{"begin":{"type":"string","description":"Start of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX].begin","typeLabel":"string"},"end":{"type":"string","description":"End of the window.","example":"2019-11-15T12:34:56Z","isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX].end","typeLabel":"string"},"resourceTags":{"type":"array","description":"Resource tags the window is restricted to. Omit to apply the window to every resource regardless of tag.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX].resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX].resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows.items.[INDEX]","typeLabel":"object"},"example":[{"begin":"2026-03-17 09:00","end":"2026-03-17 11:00"}],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX].preferredTimeWindows","typeLabel":"object[]"}},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1.alternatives","typeLabel":"object[]"}},"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"item.orders.items.[INDEX].stops.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"item.orders.items.[INDEX].stops","typeLabel":"object[]"},"properties":{"type":"object","description":"Free-form metadata map (string to string), with no effect on optimization. Returned unchanged on the object and in the solution. Typical uses: a driver's name, a vehicle's plate, a customer name or address, a client reference.\n","example":{"plate":"AB-123-CD","driverName":"Jane Doe"},"additionalProperties":{"type":"string","uniqueKey":"item.orders.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"item.orders.items.[INDEX].properties","typeLabel":"object"},"priority":{"description":"Relative importance of the order; lower is more important, and the value can be negative.\n\n> **When to use.** Lower an order's priority, or mark it `optional`, to make an acceptable-to-drop trade-off explicit rather than an unplanned side effect once the fleet is under pressure from higher-priority stops.\n\n> **Modelling pitfall.** Priority levels are strict tiers, not weights: one more planned stop of a more important level outweighs any number of stops of a less important level.\n","type":"integer","default":0,"example":0,"uniqueKey":"item.orders.items.[INDEX].priority","typeLabel":"integer"},"optional":{"description":"If `true`, the order leaves the `maximizeMandatoryStops` objective: it can be left unplanned without affecting it, and is only placed if `maximizeOptionalStops` is in the plan's objectives. Without that objective it's unlikely to be planned, since it adds cost (distance, duration) without serving any higher-ranked objective.\n\n> **Modelling pitfall.** Not the same as a very low `priority`: a mandatory order, however low its priority, still counts towards `maximizeMandatoryStops`.\n","type":"boolean","uniqueKey":"item.orders.items.[INDEX].optional","typeLabel":"boolean"},"requiredSkills":{"description":"Hard requirement: a resource must have every listed skill to be assignable to this order.\n","type":"array","uniqueItems":true,"items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.orders.items.[INDEX].requiredSkills.items.[INDEX]","typeLabel":"string"},"example":["forklift","truck"],"uniqueKey":"item.orders.items.[INDEX].requiredSkills","typeLabel":"string[]"},"successiveStops":{"description":"The order's stops must be visited consecutively, with nothing from another order in between. Mutually exclusive with `maxStopSpan`.\n\n> **Default.** An order without `successiveStops` can have at most 4 stops; see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","type":"boolean","uniqueKey":"item.orders.items.[INDEX].successiveStops","typeLabel":"boolean"},"maxStopSpan":{"type":"string","description":"Maximum time allowed to elapse between the order's stops (for example between a pickup and its delivery), without forcing them to be consecutive.\n\nThe span runs from the end of service at the order's first stop to the start of service at its last stop. Waiting time counts.\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"item.orders.items.[INDEX].maxStopSpan","typeLabel":"string"}},"uniqueKey":"item.orders.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.orders","typeLabel":"object[]"},"nbOrders":{"type":"integer","description":"Number of entries in `orders`, computed by the server.","minimum":0,"readOnly":true,"uniqueKey":"item.nbOrders","typeLabel":"integer"},"additionalOperationDurations":{"type":"array","description":"Additional operation time for a resource and a stop, according to tags (pairs of tags must be unique).","uniqueItems":true,"items":{"type":"object","description":"Additional operation duration by stop tag and resource tag.","required":["resourceTag","stopTag","additionalOperationDuration"],"properties":{"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"item.additionalOperationDurations.items.[INDEX].resourceTag","typeLabel":"string"},"stopTag":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"heavy","isRequired":true,"uniqueKey":"item.additionalOperationDurations.items.[INDEX].stopTag","typeLabel":"string"},"additionalOperationDuration":{"type":"string","description":"Extra duration added on top of the stop's own `operationDuration` whenever this `resourceTag`/`stopTag` pair is matched.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"item.additionalOperationDurations.items.[INDEX].additionalOperationDuration","typeLabel":"string"}},"uniqueKey":"item.additionalOperationDurations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.additionalOperationDurations","typeLabel":"object[]"},"operationDurationPoliciesByResourceTag":{"type":"object","description":"Policies to remove the operation durations, by resource tag.","additionalProperties":{"type":"array","items":{"type":"object","description":"Policy to indicate which operation duration must not be taken into account.","required":["policy"],"properties":{"policy":{"type":"string","description":"Which operation duration to leave out of the schedule: `withoutFirstOperationDuration` ignores only the first matching stop's operation duration, `withoutOperationDurations` ignores it on every matching stop.\n","enum":["withoutFirstOperationDuration","withoutOperationDurations"],"isRequired":true,"uniqueKey":"item.operationDurationPoliciesByResourceTag.additionalProperties.items.[INDEX].policy","typeLabel":"enum\u003cstring>"},"stopTags":{"type":"array","description":"Stop tags this policy applies to.","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.operationDurationPoliciesByResourceTag.additionalProperties.items.[INDEX].stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["access:parking33","capa:bat22","setup:france"],"uniqueKey":"item.operationDurationPoliciesByResourceTag.additionalProperties.items.[INDEX].stopTags","typeLabel":"string[]"}},"uniqueKey":"item.operationDurationPoliciesByResourceTag.additionalProperties.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.operationDurationPoliciesByResourceTag.additionalProperties","typeLabel":"object[]"},"example":{"trailer":[{"policy":"withoutFirstOperationDuration","stopTags":["access:parking33"]}]},"uniqueKey":"item.operationDurationPoliciesByResourceTag","typeLabel":"object"},"additionalConstraints":{"type":"array","description":"Extra constraints layered on top of resources' and orders' own fields, such as forbidden assignments or capacity ceilings shared across a group of stops.","items":{"oneOf":[{"type":"object","description":"`additionalConstraints` scope. At every stop of the tour, at least one of the listed capacities must be at or below its given threshold — an OR across the listed capacities, checked at each stop, not a requirement that they all hold together.\n\n> **When to use.** For sequencing stop types or validating multi-compartment configurations. If the tour has not, at each stop, one of its capacities lower than or equal to the given limit, the tour is invalid.\n","required":["type","capacities"],"properties":{"type":{"description":"Discriminator identifying this constraint as `atLeastOneValidCapacity`.","type":"string","enum":["atLeastOneValidCapacity"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"capacities":{"type":"object","description":"Capacity thresholds; at every stop, at least one of these must hold.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.0.capacities.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.0.capacities","typeLabel":"object"},"name":{"description":"Name identifying this constraint, referenced by any resulting `AtLeastOneValidCapacityViolation`.","type":"string","example":"capacityCheck1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.0.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.0.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.0.resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Bars a specific resource tag from a specific stop tag: a targeted exclusion, narrower than `incompatibleStopTags`.\n\n> **Modelling pitfall.** Only resources that carry `resourceTag` are barred: a resource that you add later without the tag can serve the stop. For a rule that must hold when the fleet changes, use `requiredSkills` on the order and `skills` on the resources. See [Skills and assignments](https://developers.kardinal.ai/guides/skills-and-assignments#barring-one-resource-from-a-stop).\n","required":["type","resourceTag","stopTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `forbiddenAssignment`.","type":"string","enum":["forbiddenAssignment"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.1.resourceTag","typeLabel":"string"},"stopTag":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"heavy","isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.1.stopTag","typeLabel":"string"},"name":{"description":"Name identifying this constraint, referenced by any resulting `ForbiddenAssignmentViolation`.","type":"string","example":"noTrailerAtWarehouse","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.1.name","typeLabel":"string"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Two stop tags can never appear in the same tour, regardless of resource.\n","required":["type","stopTags"],"properties":{"type":{"description":"Discriminator identifying this constraint as `incompatibleStopTags`.","type":"string","enum":["incompatibleStopTags"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"stopTags":{"type":"array","items":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.2.stopTags.items.[INDEX]","typeLabel":"string"},"description":"A pair of incompatible stop tags.","maxItems":2,"minItems":2,"uniqueItems":true,"example":["goat","cabbage"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.2.stopTags","typeLabel":"string[]"},"name":{"description":"Name identifying this constraint, referenced by any resulting `StopIncompatibilityViolation`.","type":"string","example":"noOverlap1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.2.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.2.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.2.resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Combines several constraints with OR logic: the tour is valid if at least one of `constraints` is satisfied.\n","required":["type","constraints"],"properties":{"type":{"description":"Discriminator identifying this constraint as `atLeastOneConstraint`.","type":"string","enum":["atLeastOneConstraint"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"constraints":{"description":"Constraints combined with OR logic; the tour is valid if at least one is satisfied.","type":"array","items":{"oneOf":[{"type":"object","description":"`additionalConstraints` scope. At every stop of the tour, at least one of the listed capacities must be at or below its given threshold — an OR across the listed capacities, checked at each stop, not a requirement that they all hold together.\n\n> **When to use.** For sequencing stop types or validating multi-compartment configurations. If the tour has not, at each stop, one of its capacities lower than or equal to the given limit, the tour is invalid.\n","required":["type","capacities"],"properties":{"type":{"description":"Discriminator identifying this constraint as `atLeastOneValidCapacity`.","type":"string","enum":["atLeastOneValidCapacity"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"capacities":{"type":"object","description":"Capacity thresholds; at every stop, at least one of these must hold.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.capacities.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.capacities","typeLabel":"object"},"name":{"description":"Name identifying this constraint, referenced by any resulting `AtLeastOneValidCapacityViolation`.","type":"string","example":"capacityCheck1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0.resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Bars a specific resource tag from a specific stop tag: a targeted exclusion, narrower than `incompatibleStopTags`.\n\n> **Modelling pitfall.** Only resources that carry `resourceTag` are barred: a resource that you add later without the tag can serve the stop. For a rule that must hold when the fleet changes, use `requiredSkills` on the order and `skills` on the resources. See [Skills and assignments](https://developers.kardinal.ai/guides/skills-and-assignments#barring-one-resource-from-a-stop).\n","required":["type","resourceTag","stopTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `forbiddenAssignment`.","type":"string","enum":["forbiddenAssignment"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1.resourceTag","typeLabel":"string"},"stopTag":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"heavy","isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1.stopTag","typeLabel":"string"},"name":{"description":"Name identifying this constraint, referenced by any resulting `ForbiddenAssignmentViolation`.","type":"string","example":"noTrailerAtWarehouse","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1.name","typeLabel":"string"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Two stop tags can never appear in the same tour, regardless of resource.\n","required":["type","stopTags"],"properties":{"type":{"description":"Discriminator identifying this constraint as `incompatibleStopTags`.","type":"string","enum":["incompatibleStopTags"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"stopTags":{"type":"array","items":{"type":"string","description":"Stop tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.stopTags.items.[INDEX]","typeLabel":"string"},"description":"A pair of incompatible stop tags.","maxItems":2,"minItems":2,"uniqueItems":true,"example":["goat","cabbage"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.stopTags","typeLabel":"string[]"},"name":{"description":"Name identifying this constraint, referenced by any resulting `StopIncompatibilityViolation`.","type":"string","example":"noOverlap1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2.resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.2","typeLabel":"object"},{},{"type":"object","description":"`additionalConstraints` scope. Fine-grained capacity constraint beyond the base resource/stop matching, valid if all the listed capacities are satisfied. Unlike the other `additionalConstraints` types, it does not currently surface a named violation in the solution; use it as a member of `atLeastOneConstraint`, not on its own at the top level of `additionalConstraints`.\n","required":["type","capacities","resourceTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `capacities`.","type":"string","enum":["capacities"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"capacities":{"type":"object","description":"Capacities that must be satisfied.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.capacities.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.capacities","typeLabel":"object"},"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.resourceTag","typeLabel":"string"},"name":{"description":"Name identifying this constraint. No violation is currently reported for this constraint type.","type":"string","example":"capacityLimit1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4.name","typeLabel":"string"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Caps how many separate visits to stops sharing a tag a resource can make.\n\n> **When to use.** For limiting depot returns, or forcing a shared-equipment tag to stay with a single resource across the tour. If the tour has stops whose `stopTags` constitute too many groups, the tour is invalid.\n","required":["type","maxGroupsByStopTag"],"properties":{"type":{"type":"string","description":"Discriminator identifying this constraint as `maxStopTagGroups`.","enum":["maxStopTagGroups"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"},"maxGroupsByStopTag":{"type":"object","description":"Maximum number of separate visit groups allowed, by stop tag.","example":{"depot":2,"delivery":10},"additionalProperties":{"type":"integer","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.maxGroupsByStopTag.additionalProperties","typeLabel":"integer"},"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.maxGroupsByStopTag","typeLabel":"object"},"name":{"type":"string","description":"Name identifying this constraint, referenced by any resulting `MaxStopTagGroupsViolation`.","example":"maxDepotVisits","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5.resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Enforces a last-in-first-out unloading order on a resource: with `strategy: \"lifo\"`, a resource can only unload the last thing it loaded. Not a rule about which stops get dropped from an over-constrained plan.\n\n> **When to use.** For a stacked or sequential-loading vehicle, such as a car carrier loading vehicles nose-to-tail on a single deck, or a multi-deck cage truck, where physically nothing can be unloaded except the item that went on last. Set it on the resource tag or tags representing that vehicle class.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this constraint as `removalStrategy`.","type":"string","enum":["removalStrategy"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"},"name":{"description":"Name identifying this constraint, referenced by any resulting `RemovalStrategyViolation`.","type":"string","example":"lifoRule1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.resourceTags","typeLabel":"string[]"},"capacities":{"description":"Capacity names tracked for the last-in-first-out ordering.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.capacities.items.[INDEX]","typeLabel":"string"},"example":["volume","length"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.capacities","typeLabel":"string[]"},"strategy":{"type":"string","description":"The unloading order to enforce.","default":"lifo","enum":["lifo"],"example":"lifo","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6.strategy","typeLabel":"enum\u003cstring>"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX].oneOf.6","typeLabel":"object"}],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.constraints","typeLabel":"object[]"},"name":{"description":"Name identifying this constraint, referenced by any resulting `AtLeastOneConstraintViolation`.","type":"string","example":"orConstraint1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3.name","typeLabel":"string"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Fine-grained capacity constraint beyond the base resource/stop matching, valid if all the listed capacities are satisfied. Unlike the other `additionalConstraints` types, it does not currently surface a named violation in the solution; use it as a member of `atLeastOneConstraint`, not on its own at the top level of `additionalConstraints`.\n","required":["type","capacities","resourceTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `capacities`.","type":"string","enum":["capacities"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"capacities":{"type":"object","description":"Capacities that must be satisfied.","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.4.capacities.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.4.capacities","typeLabel":"object"},"resourceTag":{"type":"string","description":"Resource tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"trailer","isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.4.resourceTag","typeLabel":"string"},"name":{"description":"Name identifying this constraint. No violation is currently reported for this constraint type.","type":"string","example":"capacityLimit1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.4.name","typeLabel":"string"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Caps how many separate visits to stops sharing a tag a resource can make.\n\n> **When to use.** For limiting depot returns, or forcing a shared-equipment tag to stay with a single resource across the tour. If the tour has stops whose `stopTags` constitute too many groups, the tour is invalid.\n","required":["type","maxGroupsByStopTag"],"properties":{"type":{"type":"string","description":"Discriminator identifying this constraint as `maxStopTagGroups`.","enum":["maxStopTagGroups"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"},"maxGroupsByStopTag":{"type":"object","description":"Maximum number of separate visit groups allowed, by stop tag.","example":{"depot":2,"delivery":10},"additionalProperties":{"type":"integer","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.5.maxGroupsByStopTag.additionalProperties","typeLabel":"integer"},"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.5.maxGroupsByStopTag","typeLabel":"object"},"name":{"type":"string","description":"Name identifying this constraint, referenced by any resulting `MaxStopTagGroupsViolation`.","example":"maxDepotVisits","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.5.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.5.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.5.resourceTags","typeLabel":"string[]"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"`additionalConstraints` scope. Enforces a last-in-first-out unloading order on a resource: with `strategy: \"lifo\"`, a resource can only unload the last thing it loaded. Not a rule about which stops get dropped from an over-constrained plan.\n\n> **When to use.** For a stacked or sequential-loading vehicle, such as a car carrier loading vehicles nose-to-tail on a single deck, or a multi-deck cage truck, where physically nothing can be unloaded except the item that went on last. Set it on the resource tag or tags representing that vehicle class.\n","required":["type"],"properties":{"type":{"description":"Discriminator identifying this constraint as `removalStrategy`.","type":"string","enum":["removalStrategy"],"isRequired":true,"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"},"name":{"description":"Name identifying this constraint, referenced by any resulting `RemovalStrategyViolation`.","type":"string","example":"lifoRule1","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.6.name","typeLabel":"string"},"resourceTags":{"description":"Resource tags this constraint applies to.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.6.resourceTags.items.[INDEX]","typeLabel":"string"},"example":["subcontractorA","subcontractorB"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.6.resourceTags","typeLabel":"string[]"},"capacities":{"description":"Capacity names tracked for the last-in-first-out ordering.","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.6.capacities.items.[INDEX]","typeLabel":"string"},"example":["volume","length"],"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.6.capacities","typeLabel":"string[]"},"strategy":{"type":"string","description":"The unloading order to enforce.","default":"lifo","enum":["lifo"],"example":"lifo","uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.6.strategy","typeLabel":"enum\u003cstring>"}},"uniqueKey":"item.additionalConstraints.items.[INDEX].oneOf.6","typeLabel":"object"}],"uniqueKey":"item.additionalConstraints.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.additionalConstraints","typeLabel":"object[]"},"globalConstraints":{"type":"array","description":"List of global constraints to be satisfied by the returned solution.","items":{"type":"object","description":"`globalConstraints` scope (whole fleet, not just one tour). Caps a cost total (for example number of active resources in a tag group) across the whole fleet. Provides an upper bound on the cost of specified resources.\n","required":["type","maximum","costsByResourceTag"],"properties":{"type":{"description":"Discriminator identifying this constraint as `maxCumulatedCost`.","type":"string","enum":["maxCumulatedCost"],"isRequired":true,"uniqueKey":"item.globalConstraints.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"maximum":{"description":"The constraint's maximum allowed cumulated cost, in the same unit as the costs in `costsByResourceTag`. It is required and has no default: a constraint without it is rejected with a `400` `INVALID_VALUE` error. This is a hard limit: the engine leaves stops unplanned rather than exceed it, so a mandatory stop can end up in `unaffectedStopIds`. The exception is locked stops that already cost more than `maximum`. They are stops in a tour with `state.mode: fixed`, or `status: fixed` entries in a `free` tour. The engine keeps them, goes over `maximum`, and reports it in `globalViolations`. Currently, once locked stops break the cap, it no longer limits new cost under its tags, and the engine can still add a tagged vehicle.\n","type":"number","example":1000,"isRequired":true,"uniqueKey":"item.globalConstraints.items.[INDEX].maximum","typeLabel":"number"},"costsByResourceTag":{"type":"object","description":"The cost counted towards `maximum` for each resource that carries the tag, by resource tag.\n\n> **Modelling pitfall.** A tag that no resource of the plan carries, for example one with a typing error, counts nothing. The API accepts the plan, and returns a warning for that tag in the `warnings` of its response.\n","example":{"trailer":{"using":120}},"additionalProperties":{"type":"object","description":"Cost structure of a resource. Fields are cumulative: the total cost of a tour is the sum of the contributions of every field that is set.\n\n> **Modelling pitfall.** Each field applies to a different base. The same cost must be expressed only once; setting both `using` and a `costFloor` on `km` applies a flat cost and a floor to the same distance rather than two independent contributions.\n","properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag.additionalProperties","typeLabel":"object"},"isRequired":true,"uniqueKey":"item.globalConstraints.items.[INDEX].costsByResourceTag","typeLabel":"object"},"name":{"description":"Name identifying this constraint, referenced by any resulting `GlobalViolationMaxCumulatedCost`.","type":"string","example":"fleetCostCap","uniqueKey":"item.globalConstraints.items.[INDEX].name","typeLabel":"string"}},"uniqueKey":"item.globalConstraints.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.globalConstraints","typeLabel":"object[]"},"accessDurationsByStopTag":{"type":"object","description":"Fixed extra duration charged once, before the first of a group of consecutive stops sharing a tag, in ISO 8601 duration format.\n\n> **When to use.** For a cost paid once per visit to a tagged location, such as a 30-minute dock access time. For a cost paid on every stop regardless of what came before it, use a stop's own `operationDuration` instead.\n","additionalProperties":{"type":"string","description":"A period of time, expressed in the ISO8601 **duration** format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","uniqueKey":"item.accessDurationsByStopTag.additionalProperties","typeLabel":"string"},"example":{"access:parking33":"PT5M"},"uniqueKey":"item.accessDurationsByStopTag","typeLabel":"object"},"overlappingCapacitiesByStopTag":{"type":"object","description":"Target maximum number of resources physically present at the same time at stops sharing a tag.\n\n> **When to use.** To model a shared bottleneck resource such as a depot with a limited number of loading docks, or a cross-dock with limited simultaneous capacity, for example limiting a two-dock depot to 2 resources at once.\n\n> **Modelling pitfall.** A soft limit, not a hard cap: overruns are minimized by the `minimizeOverOverlappingCapacitiesOnStops` objective, so how firmly the engine keeps to the limit depends on that objective's position in `objectives`, and it has no effect if that objective is left out.\n","additionalProperties":{"type":"integer","uniqueKey":"item.overlappingCapacitiesByStopTag.additionalProperties","typeLabel":"integer"},"example":{"capa:bat22":3},"uniqueKey":"item.overlappingCapacitiesByStopTag","typeLabel":"object"},"setupDurations":{"type":"array","description":"Sequence-dependent changeover times to add whenever a resource travels directly between two stops carrying a matching pair of tags.","items":{"type":"object","description":"Extra changeover duration inserted when a resource travels directly from a stop tagged `fromStopTag` to a stop tagged `toStopTag`.","required":["fromStopTag","toStopTag","setupDuration"],"properties":{"fromStopTag":{"type":"string","description":"Tag of the stop the resource is leaving.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"setup:france","isRequired":true,"uniqueKey":"item.setupDurations.items.[INDEX].fromStopTag","typeLabel":"string"},"toStopTag":{"type":"string","description":"Tag of the stop the resource is arriving at next.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"setup:belgium","isRequired":true,"uniqueKey":"item.setupDurations.items.[INDEX].toStopTag","typeLabel":"string"},"setupDuration":{"type":"string","description":"Changeover duration added between the two stops, in ISO 8601 duration format.","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT4M","isRequired":true,"uniqueKey":"item.setupDurations.items.[INDEX].setupDuration","typeLabel":"string"}},"uniqueKey":"item.setupDurations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.setupDurations","typeLabel":"object[]"},"objectives":{"type":"array","items":{"oneOf":[{"type":"string","description":"Name of a built-in objective, used as an entry in `PlanObjectives`.\n\n- maximizeMandatoryStops: Maximizes the number of non-optional stops actually planned.\n- minimizeDelay: Minimizes the sum of delays against stops' `preferredTimeWindows`; only lateness counts, never earliness.\n- minimizeCosts: Minimizes the plan's total cost, as defined by each resource's `cost`.\n- minimizeResources: Favours using fewer resources over spreading stops across more of them.\n- minimizeOverOverlappingCapacitiesOnStops: Minimizes how far the limits set in `Plan.overlappingCapacitiesByStopTag` are exceeded, in resources simultaneously present beyond the limit.\n- maximizeOptionalStops: Maximizes the number of optional stops planned in addition to mandatory ones.\n- maximizePreferredStops: Maximizes stops matched to a resource's `preferredStopTags`.\n- minimizeLargestTourDuration: Minimizes the working duration of the single longest tour across the fleet (travel, service, and waiting time), balancing workload between resources.\n- minimizeWorkingDuration: Minimizes the total working duration summed across every tour, waiting time included.\n- minimizeDistance: Minimizes the total distance travelled summed across every tour.\n- minimizeEarlyLoadings: Minimizes early loadings. A loading is early when a vehicle loads an order at a stop with a declared tag, such as a depot, then comes back to a stop with that tag before delivering the order. The declarations go in a resource's `avoidEarlyLoadings` or in `Plan.avoidEarlyLoadingsByResourceTag` (see `AvoidEarlyLoading`). A plan with the objective and no declaration, or the reverse, is refused with a `400`.\n","enum":["maximizeMandatoryStops","minimizeDelay","minimizeCosts","minimizeResources","minimizeOverOverlappingCapacitiesOnStops","maximizeOptionalStops","maximizePreferredStops","minimizeLargestTourDuration","minimizeWorkingDuration","minimizeDistance","minimizeEarlyLoadings"],"uniqueKey":"item.objectives.items.[INDEX].oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Objective that rewards the engine for respecting a set of \"this stop tag before that stop tag\" precedence pairs, as an entry in `PlanObjectives`.\n\n> **Modelling pitfall.** This is a preference, not a hard rule: the engine can break a pair when time windows or other objectives make it the better choice. When the engine plans the tour itself, the only order it always keeps is the order of the stops inside one order's `stops` array. Rank `maximizeMandatoryStops` and `maximizeOptionalStops` before `maximizePrecedences`. With another order, the API accepts the plan and keeps your order, but it returns an `INVALID_VALUE` warning in the `warnings` of the POST or PUT response. If you ignore it, the engine can leave stops unplanned to keep a precedence order. The value of the `maximizePrecedences(valid-precedences)` line in the solution is a score, not a plain count of respected pairs. Currently, depots, stops without a tag, and stops whose tag is only a `previous` tag add nothing to it.\n","required":["type","precedences"],"properties":{"type":{"type":"string","description":"Discriminator identifying this objective as `maximizePrecedences`.","enum":["maximizePrecedences"],"isRequired":true,"uniqueKey":"item.objectives.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"precedences":{"type":"array","description":"Precedence pairs the engine tries to satisfy as many of as possible.","items":{"type":"object","description":"A pair of stop tags that the engine tries to visit in this order.\n\nThe pair only counts between stops of the same tour, and it looks at the order of the visits, not at their times. Pairs chain: \"A before B\" and \"B before C\" also mean \"A before C\". A loop of pairs is refused with a 400 error.\n","required":["previous","next"],"properties":{"previous":{"type":"string","description":"Stop tag that the engine tries to visit before any stop tagged `next` in the same tour.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"sector1","isRequired":true,"uniqueKey":"item.objectives.items.[INDEX].oneOf.1.precedences.items.[INDEX].previous","typeLabel":"string"},"next":{"type":"string","description":"Stop tag that the engine tries to visit only after every stop tagged `previous` in the same tour.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"sector2","isRequired":true,"uniqueKey":"item.objectives.items.[INDEX].oneOf.1.precedences.items.[INDEX].next","typeLabel":"string"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.1.precedences.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"item.objectives.items.[INDEX].oneOf.1.precedences","typeLabel":"object[]"},"disableGroupProximity":{"type":"boolean","default":false,"description":"If true, the engine does not add the second objective that it otherwise runs right after `maximizePrecedences`.\n\nThat second objective brings each badly placed stop closer to its first valid position, to keep the stops of one sector together. It therefore ranks before every objective listed after `maximizePrecedences`, including `minimizeCosts` and `minimizeDistance`.\n\n> **When to use.** Set it to `true` when you need the order of the pairs but not the grouping by sector.\n","uniqueKey":"item.objectives.items.[INDEX].oneOf.1.disableGroupProximity","typeLabel":"boolean"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"User-defined objective, as an entry in `PlanObjectives`, that optimizes a cost expression built from `costsByResourceTag` in the given `direction` instead of using a built-in objective from `ObjectivesEnum`.\n","required":["type","name","direction","costsByResourceTag"],"properties":{"type":{"type":"string","description":"Discriminator identifying this objective as `custom`.","enum":["custom"],"isRequired":true,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"name":{"type":"string","description":"Name identifying this custom objective. Must not collide with a built-in `ObjectivesEnum` value.","example":"minimizeFuelCost","not":{"type":"string","pattern":"^(maximizeMandatoryStops|minimizeDelay|minimizeCosts|minimizeResources|minimizeOverOverlappingCapacitiesOnStops|maximizeOptionalStops|maximizePreferredStops|minimizeLargestTourDuration|minimizeWorkingDuration|minimizeDistance|minimizeEarlyLoadings)$"},"isRequired":true,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.name","typeLabel":"string"},"direction":{"type":"string","description":"Whether the engine should minimize or maximize the resulting cost.","enum":["minimize","maximize"],"isRequired":true,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.direction","typeLabel":"enum\u003cstring>"},"costsByResourceTag":{"type":"object","description":"Cost expression the engine optimizes, evaluated per resource tag.","example":{"trailer":{"using":120}},"additionalProperties":{"type":"object","description":"Cost structure of a resource. Fields are cumulative: the total cost of a tour is the sum of the contributions of every field that is set.\n\n> **Modelling pitfall.** Each field applies to a different base. The same cost must be expressed only once; setting both `using` and a `costFloor` on `km` applies a flat cost and a floor to the same distance rather than two independent contributions.\n","properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag.additionalProperties","typeLabel":"object"},"isRequired":true,"uniqueKey":"item.objectives.items.[INDEX].oneOf.2.costsByResourceTag","typeLabel":"object"}},"uniqueKey":"item.objectives.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"item.objectives.items.[INDEX]","typeLabel":"enum\u003cstring> · object · object"},"description":"Objectives the engine optimizes for this plan; see `PlanObjectives` for how priority order drives trade-offs.","default":["maximizeMandatoryStops","minimizeDelay","minimizeCosts","minimizeResources","minimizeOverOverlappingCapacitiesOnStops","maximizeOptionalStops","maximizePreferredStops","minimizeWorkingDuration","minimizeDistance"],"uniqueKey":"item.objectives","typeLabel":"enum\u003cstring> · object · object[]"},"maxOptimizationDuration":{"type":"string","description":"Maximum time the engine is allowed to search, in ISO 8601 duration format. The engine stops early on its own once it stops finding improvements, so an overly generous value costs only a longer worst case, never a worse solution.\n\n> **Default.** If omitted, 5 seconds for the sandbox agency and 15 minutes for the production agency. A value exceeding the agency's maximum (5 seconds for the sandbox, 6 hours for production by default) is clamped to it, with a warning in the response; see [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n\n> **Modelling pitfall.** A good solution typically takes about `PT10S` for 1 resource and 15 stops, `PT2M` for 5 resources and 100 stops, `PT10M` for 30 resources and 800 stops, and `PT30M` for 45 resources and 3,000 stops. These values are indicative, not a guarantee: a plan can converge faster or slower depending on its constraints, and past about 800 stops the 15-minute production default is too short. Size this value against your own data (see [Handling large volumes](https://developers.kardinal.ai/guides/handling-large-volumes#sizing-maxoptimizationduration-for-a-large-problem)).\n","pattern":"^P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$","example":"PT1H","uniqueKey":"item.maxOptimizationDuration","typeLabel":"string"},"tz":{"type":"string","description":"Time zone this plan's resources and stops are scheduled in. Local datetimes in the plan are read in it, and the API writes plan and solution datetimes back in its offset; see [Dates and time zones](https://developers.kardinal.ai/reference/data-model#dates-and-time-zones).","example":"Europe/Paris","uniqueKey":"item.tz","typeLabel":"string"},"createdAt":{"type":"string","description":"The plan's creation datetime.","example":"2019-11-15T12:34:56Z","uniqueKey":"item.createdAt","typeLabel":"string"},"createdBy":{"type":"string","description":"The username of the user who created this plan.","readOnly":true,"example":"jane.doe","uniqueKey":"item.createdBy","typeLabel":"string"},"updatedAt":{"type":"string","description":"The plan's last update datetime: absent until the plan is updated for the first time.","example":"2019-11-15T12:34:56Z","uniqueKey":"item.updatedAt","typeLabel":"string"},"updatedBy":{"type":"string","description":"The username of the user who last updated this plan: absent until the plan is updated for the first time.","readOnly":true,"example":"jane.doe","uniqueKey":"item.updatedBy","typeLabel":"string"},"archivedAt":{"type":"string","description":"The plan's archiving datetime: if this property is present, the plan is archived.","example":"2019-11-15T12:34:56Z","uniqueKey":"item.archivedAt","typeLabel":"string"},"lateDeparture":{"description":"Allows resources to depart later than the earliest feasible moment in their `workingTimeWindow`, when doing so does not hurt the objectives.\n\n> **Default.** `false`: resources always leave as early as possible.\n","type":"boolean","default":false,"uniqueKey":"item.lateDeparture","typeLabel":"boolean"},"sharedCapacities":{"description":"Sets how the engine treats a `pickup` whose quantity is negative. A vehicle's ceiling always applies to everything on board, whatever the order, and this flag does not change that.\n\nWith `false`, the engine treats a pickup with a negative quantity as a delivery only. The goods are loaded at departure, and the stop takes them off the vehicle. With `true`, the stop stays a normal pickup that removes load. The pickup of another order can then fill the vehicle before it.\n\nFor example, a truck has a `weight` ceiling of 100 kg. It collects a bin of 80 kg with a `pickup` that has `capacities: {\"weight\": 80}`. The bin is open from 08:00 to 09:00. The dump site is a `pickup` of another order, with `capacities: {\"weight\": -80}`. The dump site is open from 12:00 to 13:00, so the truck visits the bin first. With `true`, the load is 80 kg after the bin and 0 kg after the dump site. With `false`, the engine would load the 80 kg of the dump site at departure. The load would then reach 160 kg after the bin, over the ceiling. The engine therefore leaves the dump-site stop in `unaffectedStopIds`. The solution shows no violation.\n\n> **When to use.** Set `true` for waste collection, when you write the emptying at the dump site as a `pickup` with a negative quantity. It is the recommended setting for that model. For any other model, keep `false`.\n\n> **Default.** `false`: a pickup with a negative quantity is loaded at departure, then removed at the stop.\n","type":"boolean","default":false,"uniqueKey":"item.sharedCapacities","typeLabel":"boolean"},"emptyThresholdByCapacityByResourceTag":{"description":"Thresholds for capacities below which a resource is considered \"empty\" for empty distance calculation, grouped by resource tag. A resource is \"empty\" (kilometres travelled count as empty distance) when all capacities are at or below their threshold. The wildcard tag \"*\" matches all resources.\n","type":"object","additionalProperties":{"type":"object","description":"Free-form map from a capacity name to a quantity, tracked as its own independent dimension on both resources and stops. For every key a resource declares, the running total never exceeds the resource's value for that key at any point in the tour. A key the stop consumes but the resource doesn't declare is unconstrained on that resource.\n\n> **When to use.** For a vehicle carrying exactly one item at a time whose size varies by trip, a count-based ceiling (`{\"containers\": 1}`) is robust to size variance; a size-based ceiling (`{\"volume\": \u003cmax item size>}`) is needed only when overflow or partial-load reporting matters.\n\n> **Modelling pitfall.** Capacity keys are matched by exact string, with no case-folding. A typo such as `weight` on a resource against `Weight` on a stop raises no error: it silently leaves that dimension unlimited for the stop instead of enforcing the resource's ceiling.\n","example":{"volume":9.5,"weight":2200,"nbPackages":23},"additionalProperties":{"type":"number","uniqueKey":"item.emptyThresholdByCapacityByResourceTag.additionalProperties.additionalProperties","typeLabel":"number"},"uniqueKey":"item.emptyThresholdByCapacityByResourceTag.additionalProperties","typeLabel":"object"},"example":{"heavy":{"weight":150,"volume":75},"*":{"weight":50}},"uniqueKey":"item.emptyThresholdByCapacityByResourceTag","typeLabel":"object"},"avoidEarlyLoadingsByResourceTag":{"type":"object","description":"Early loading declarations grouped by resource tag. The wildcard tag \"*\" matches all resources. Each entry names a stop tag for the `minimizeEarlyLoadings` objective, and optionally the capacities to track. A plan with declarations must also list that objective in `objectives`. Otherwise, the plan is refused with a `400`. See `AvoidEarlyLoading`.\n","additionalProperties":{"type":"array","items":{"type":"object","description":"Declares a stop tag where loading early should be avoided, for the `minimizeEarlyLoadings` objective. A loading is early when a vehicle loads an order at a stop with this tag, such as a depot, then comes back to a stop with the tag before delivering the order. The objective also tracks orders going the other way, such as a return that a vehicle collects elsewhere and brings back to a depot.\n\nA pass is a visit to a stop with the tag. Consecutive stops with the tag count as one pass. For each tracked order, the objective counts the passes between the moment the order is loaded and the moment it is delivered. The pass where the order is loaded or unloaded at a stop with the tag counts too.\n\nThese declarations and the `minimizeEarlyLoadings` objective go together. A plan with one and not the other is refused with a `400` `INVALID_INPUT`. This includes a plan that omits `objectives`, because the default list doesn't contain `minimizeEarlyLoadings`.\n\n> **Modelling pitfall.** A declaration can track nothing without raising any error, for example with a `stopTag` that no stop carries, a plan-level key that no resource carries, or `capacities` that no loaded stop carries. The objective is then missing from the solution, or its value is 0.\n","required":["stopTag"],"example":{"stopTag":"depot1","capacities":["weight","volume"]},"properties":{"stopTag":{"type":"string","description":"Stop tag of the stops where loading early should be avoided, for example a depot's tag.","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","example":"depot1","isRequired":true,"uniqueKey":"item.avoidEarlyLoadingsByResourceTag.additionalProperties.items.[INDEX].stopTag","typeLabel":"string"},"capacities":{"type":"array","description":"Capacities whose loads are tracked. Only orders that load or unload one of these capacities at a stop with `stopTag` count. If the list is empty or omitted, all capacities are tracked.\n","items":{"type":"string","uniqueKey":"item.avoidEarlyLoadingsByResourceTag.additionalProperties.items.[INDEX].capacities.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"uniqueKey":"item.avoidEarlyLoadingsByResourceTag.additionalProperties.items.[INDEX].capacities","typeLabel":"string[]"}},"uniqueKey":"item.avoidEarlyLoadingsByResourceTag.additionalProperties.items.[INDEX]","typeLabel":"object"},"uniqueKey":"item.avoidEarlyLoadingsByResourceTag.additionalProperties","typeLabel":"object[]"},"example":{"*":[{"stopTag":"depot1","capacities":["weight","volume"]}],"heavy":[{"stopTag":"warehouse"}]},"uniqueKey":"item.avoidEarlyLoadingsByResourceTag","typeLabel":"object"},"CO2EmissionCalculationByResourceTag":{"type":"object","description":"Optional CO2 emission calculation parameters grouped by resource tag. Each value is a `Cost`-shaped object. Applies to every resource carrying the corresponding tag. When set, the resulting emissions are reported on tours as `CO2Emission` and aggregated on the solution as `CO2Emission`. If a resource matches multiple tags, only its first declared matching tag is used. Overridden by the resource-level declaration.\n","additionalProperties":{"type":"object","description":"Cost structure of a resource. Fields are cumulative: the total cost of a tour is the sum of the contributions of every field that is set.\n\n> **Modelling pitfall.** Each field applies to a different base. The same cost must be expressed only once; setting both `using` and a `costFloor` on `km` applies a flat cost and a floor to the same distance rather than two independent contributions.\n","properties":{"workedHours":{"type":"object","description":"Cost proportional to worked hours, in currency unit per hour.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.workedHours.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.workedHours","typeLabel":"object"},"km":{"type":"object","description":"Cost proportional to travelled distance, in currency unit per kilometre.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.km.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.km.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.km.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.km.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.km.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.km","typeLabel":"object"},"using":{"description":"Flat cost added once per resource actually used in the plan, in currency unit.\n\n> **Modelling pitfall.** Independent of distance, duration, and capacity. A per-kilometre rate belongs in `km`, an hourly rate in `workedHours`.\n","type":"number","example":120,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.using","typeLabel":"number"},"costsByStopTag":{"description":"Additional cost floors and coefficients on the stops that carry a given tag, by stop tag. The base is the number of visited stops carrying that tag, and floors apply once to the tour total.\n\n> **Modelling pitfall.** `constantCost` is paid once per tour that visits at least one stop of the tag, never once per stop. A tour with no stop of the tag pays nothing. An amount per stop goes in `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag.additionalProperties","typeLabel":"object"},"example":{"warehouse":{"costCoeff":5}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByStopTag","typeLabel":"object"},"costsByCapacity":{"description":"Additional cost floors and coefficients on the quantities handled at the tour's stops, by capacity name, further scoped to specific stop tags. Each stop adds the absolute value of its quantity, whatever its `kind` or sign, and floors apply once to the tour total.\n\n> **Modelling pitfall.** The base is the quantity handled, not the vehicle's load: loading at departure doesn't count, and a pickup and a delivery of the same 100 units count 200. It applies to any capacity the stops carry, declared on the resource or not, and a tour that handles none of the capacity pays no `constantCost`. A minimum that must also hold on such a tour comes from `using`, because `costFloor` only delays `costCoeff`.\n","type":"object","additionalProperties":{"type":"object","description":"Cost floor and coefficient (see `CostFloorsAndCoeffs`), further scoped to the stop tags listed in `stopTags`.","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.overcostCoeff","typeLabel":"number"},"stopTags":{"description":"Stop tags this cost applies to.\n\n> **Default.** If empty or omitted, the cost applies regardless of stop tag.\n\n> **Modelling pitfall.** A tag that no stop carries makes the cost zero, with no error. Floors apply to the total of the matching stops only.\n","type":"array","items":{"type":"string","description":"At least one character among those allowed: unaccented alpha-numeric characters, \"-\", \".\", \"_\", \"~\", \":\", \"@\", \"!\", \"$\", \",\".\n\nId-uniqueness is scoped per collection, not global: `resources[].id`, `orders[].id`, and `stops[].id` are each their own namespace, so the same string can be reused across `resources`, `orders`, and `stops` in the same plan without a collision.\n","pattern":"^[a-zA-Z0-9-._~:@!$,]+$","uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags.items.[INDEX]","typeLabel":"string"},"uniqueItems":true,"example":["warehouse","stop"],"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties.stopTags","typeLabel":"string[]"}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity.additionalProperties","typeLabel":"object"},"example":{"weight":{"stopTags":["warehouse"],"costCoeff":0.1}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costsByCapacity","typeLabel":"object"},"costPerCapacityPerTravelledKm":{"type":"object","description":"Contribution to cost proportional to travelled distance and transported capacity, in currency unit per capacity unit per kilometre (for example `EUR/tonne/km`). For each capacity, the contribution is `costCoeff x distance(km) x transportedCapacity`.\n\n> **Default.** Cumulable with `costPerCapacityPerTravelledHour` and with the other cost fields; the two travelled-cost maps are independent.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.2},"volume":{"costCoeff":0.1}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledKm","typeLabel":"object"},"costPerCapacityPerTravelledHour":{"type":"object","description":"Contribution to cost proportional to travel duration and transported capacity, in currency unit per capacity unit per hour (for example `EUR/tonne/h`). For each capacity, the contribution is `costCoeff x travelDuration(h) x transportedCapacity`.\n\n> **Modelling pitfall.** The \"Travelled\" qualifier means travel duration only, not total working time; it does not include service time or waiting.\n","additionalProperties":{"type":"object","description":"Cost floor and coefficient for one cost base. A cost cannot be empty.\n\n> **Modelling pitfall.** An overcost cannot be set if there is no cost, and `overcostFloor` must be greater than `costFloor`.\n\n> **Modelling pitfall.** A non-zero `overcostCoeff` needs an `overcostFloor` greater than 0. A plan that sets one without it is refused with a `400` error `INVALID_VALUE`, and the details say `an overcostCoeff cannot be set without overcostFloor`.\n\n> **Modelling pitfall.** A field that is not listed here, such as `using`, raises no error: it is silently ignored. `using` belongs on `Cost`, not on a cost base.\n","properties":{"constantCost":{"description":"Fixed cost added once per tour as soon as the base is greater than zero, whatever `costFloor` is, in currency unit. A tour whose base is 0 pays nothing, not even this amount.","type":"number","example":50,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.constantCost","typeLabel":"number"},"costFloor":{"description":"Minimum value of the base (distance, duration, capacity, or number of tagged stops) below which no cost applies, in the base's own unit.","type":"number","example":10,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costFloor","typeLabel":"number"},"costCoeff":{"description":"Cost per unit of the base exceeding `costFloor`, in currency unit per base unit.","type":"number","example":0.2,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.costCoeff","typeLabel":"number"},"overcostFloor":{"description":"Value of the base beyond which `overcostCoeff` applies instead of `costCoeff`, in the base's own unit. The overcost rate is usually higher. When you set no `overcostCoeff`, or set it to 0, the cost stops growing past an `overcostFloor` greater than 0.","type":"number","example":100,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostFloor","typeLabel":"number"},"overcostCoeff":{"description":"Cost per unit of the base exceeding `overcostFloor`, in currency unit per base unit. A value other than 0 needs an `overcostFloor` greater than 0.","type":"number","example":0.5,"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties.overcostCoeff","typeLabel":"number"}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour.additionalProperties","typeLabel":"object"},"example":{"weight":{"costCoeff":0.05}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties.costPerCapacityPerTravelledHour","typeLabel":"object"}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag.additionalProperties","typeLabel":"object"},"example":{"resTag2":{"km":{"costCoeff":0.55},"costPerCapacityPerTravelledKm":{"weight":{"costCoeff":0.2}}}},"uniqueKey":"item.CO2EmissionCalculationByResourceTag","typeLabel":"object"}},"uniqueKey":"item","typeLabel":"object"},"agencyId":{"type":"string","description":"Identifier of the Kardinal tenant/account the plan is scoped to, derived automatically from the access token used to make the request.\n\n> **Modelling pitfall.** Not a physical-depot or site partition key. A single fleet based at several physical depots is still one `Plan`; do not split it into several `Plan` objects just because resources have different `departure`/`arrival` positions.\n","pattern":"^BLD[0-9]{7}_[a-zA-Z0-9-._~:@!$,]+$","example":"BLD1234567_production","uniqueKey":"agencyId","typeLabel":"string"},"planId":{"type":"string","description":"The plan id.","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","readOnly":true,"example":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","uniqueKey":"planId","typeLabel":"string\u003cuuid>"},"planVersion":{"type":"integer","description":"The plan version.","minimum":1,"example":42,"uniqueKey":"planVersion","typeLabel":"integer"},"warnings":{"type":"array","description":"Amendments applied, and probable mistakes found, while processing this request, if any.","items":{"type":"object","description":"A warning has the same structure as an `Error`, but a different semantic. It is present when an accepted payload was amended. Currently, the API makes three amendments. In the sandbox, it turns traffic off and forces crow-fly distances. In every agency, it clamps `maxOptimizationDuration` to the agency's cap. `properties.path` names the amended field and is stable. `properties.details` describes the change in English and contains the internal agency id. It is not stable at the moment, so build any message for a person from `properties.path` and the stored value.\n\nA warning can also flag an accepted value that is probably a mistake, with no amendment: for example, a tag in the `costsByResourceTag` of a `maxCumulatedCost` constraint that no resource carries. `properties.path` then points to that value.\n\nWarnings can also accompany the errors of a rejected payload: they then describe the amendments applied before the rejecting error was found.\n\n> **Modelling pitfall.** Warnings are only returned in the response to the `POST` or `PUT` that produced them. They aren't stored with the plan, so a later `GET` never returns them: read them from that response, since afterwards only the amended value remains visible.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"warnings.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"warnings.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"warnings","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"addUrgentOrder":{"title":"addUrgentOrder","summary":"Response after adding the urgent order","value":{"item":{"id":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","agencyId":"BLD1234567_production","version":2,"status":{"waitingRoom":{"waitingVersion":2,"runningVersion":2},"creation":{"waitingVersion":2,"runningVersion":2},"optimization":{"waitingVersion":2,"runningVersion":2}},"tz":"Europe/Paris","resources":[{"id":"resource1","vehicleProfile":{"type":"fly","kmph":20},"workingTimeWindow":{"begin":"2026-03-21T08:00:00+01:00","end":"2026-03-21T23:00:00+01:00"}}],"orders":[{"id":"order-1","stops":[{"type":"single","id":"Balard","position":{"lon":2.279424,"lat":48.835749},"kind":"pickup","operationDuration":"PT5M30S"}]},{"id":"order-2","stops":[{"type":"single","id":"Dauphine","position":{"lon":2.274264,"lat":48.870087},"kind":"pickup","operationDuration":"PT5M30S"}]},{"id":"order-3","stops":[{"type":"single","id":"Station-f","position":{"lon":2.370564,"lat":48.83476},"kind":"pickup","operationDuration":"PT5M30S"}]},{"id":"order-4","stops":[{"type":"single","id":"Republique","position":{"lon":2.363103,"lat":48.867347},"kind":"pickup","operationDuration":"PT5M30S"}]}]},"agencyId":"BLD1234567_production","planId":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","planVersion":2}}},"exampleType":"examples"}},"exampleType":"examples"},"164383fd-2e72-4e4c-9fc9-62e041142180":{"description":"The server could not understand the request due to invalid content (bad syntax, bad format, bad values, etc).\n\nSeveral distinct business `code` values are returned under this same `400` status. Branch your error handling on `code`, not on this description. See the examples below and the `Error` schema for the full catalogue.\n","content":{"application/json":{"schema":{"type":"object","description":"Envelope wrapping one or more business errors, returned on every error response regardless of HTTP status, except a `429` temporary overload, which comes with an empty body.","properties":{"agencyId":{"type":"string","description":"The agency the failed action was scoped to.\n\n> **Default.** Absent when the action isn't tied to any agency at all — for example a `401` `NOT_AUTHENTICATED` response, returned before any agency could be resolved from the token.\n","pattern":"^BLD[0-9]{7}_[a-zA-Z0-9-._~:@!$,]+$","example":"BLD1234567_production","uniqueKey":"agencyId","typeLabel":"string"},"planId":{"type":"string","description":"The plan the failed action was scoped to.\n\n> **Default.** Absent whenever the action concerns an agency but no specific plan, or when `agencyId` itself is absent.\n","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","example":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","uniqueKey":"planId","typeLabel":"string\u003cuuid>"},"errors":{"type":"array","description":"The business errors that occurred. A `400` on plan or resource creation can report several invalid fields at once.","items":{"type":"object","description":"A single business error. Every error response, whatever the HTTP status, wraps one or more `Error` objects in an `EnvelopedErrors` envelope; a single response (typically a `400` on plan/resource creation) can report several invalid fields at once. The one exception is a `429` temporary overload, which comes with an empty body.\n\n**Always branch your error handling on `code`, not on the HTTP status alone or on this response's `description` in this spec.** Several `code` values can share the same status. In particular, all of `INVALID_INPUT`, `ID_NOT_UNIQUE`, `KEYS_NOT_UNIQUE`, `INVALID_ID_REFERENCE`, `INVALID_VALUE`, `PRECONDITION_FAILED`, and `NOT_IMPLEMENTED` return `400`.\n\nA code's status in the following table applies when that code is returned on its own. A plan that exceeds a size limit of its agency returns a `403` carrying one `INVALID_VALUE` per exceeded limit, each naming the field (`properties.path`) and the limit (`properties.details`), and a single `NOT_ALLOWED`. Read every error in the response, not only the first.\n\n## Business error codes\n\n| `code` | HTTP status | Default message | Returned when |\n| ------------------------ | ----------- | ---------------- | ------------- |\n| `INVALID_INPUT` | 400 | The payload cannot be parsed. | The request body isn't valid JSON, or doesn't match the expected schema (wrong type, missing required field). Also returned for a datetime the API cannot read, such as a `T` with no `Z` and no offset, or a local datetime in a plan without `tz` (see [Dates and time zones](https://developers.kardinal.ai/reference/data-model#dates-and-time-zones)). |\n| `ID_NOT_UNIQUE` | 400 | The payload contains a collection with an id repeated multiple times. | A collection in the payload (for example `resources`, `orders`) has the same `id` on more than one item. |\n| `KEYS_NOT_UNIQUE` | 400 | The payload contains a collection with the keys repeated multiple times. | A collection has a repeated business key other than `id` (for example a tag or reference field expected to be unique). |\n| `INVALID_ID_REFERENCE` | 400 | The id reference contains an id that does not exist. | A field references an `id` that doesn't match anything else in the payload or system (for example a `resourceId` that doesn't exist). |\n| `INVALID_VALUE` | 400 | The field value is not valid. | A field's value fails a validation rule: format, range, or allowed values. |\n| `PRECONDITION_FAILED` | 400 | A precondition failed. | The action requires the target resource to be in a particular state, and it isn't (for example acting on an already-deleted object). |\n| `NOT_IMPLEMENTED` | 400 | Not yet implemented. | The requested behaviour is recognized but not available yet. Despite the name, this returns `400`, not `501`; treat it as a client-facing \"not supported\" rather than a server capability gap. |\n| `NOT_AUTHENTICATED` | 401 | The caller is not authenticated. | No access token was sent, or it's missing, malformed, or expired. A token revoked or regenerated in the Console gets a `403` `NOT_ALLOWED` instead. |\n| `NOT_ALLOWED` | 403 | The requested action is not allowed. | Usually an agency limit was reached: an optimization quota, a plan size limit, or insufficient credits. Two other cases return it and are not limits: a token revoked or regenerated in the Console (`properties.details` is `the token is invalid`), and an update, stop or restart of an archived plan without `force`. `properties.details` states which case applies. |\n| `NOT_FOUND` | 404 | The requested object could not be found. | The resource addressed by the URL doesn't exist, or isn't visible to the caller (the API doesn't distinguish the two, to avoid leaking existence of resources you can't access). |\n| `INTERNAL_SERVER_ERROR` | 500 | The server encountered an unexpected condition that prevented it from fulfilling the request. | Unexpected server-side failure, unrelated to the request's content. If this persists, contact support with the request's timestamp. |\n\nThis enum reflects the codes returned by the current server implementation. New codes may be added in future non-breaking releases; treat an unrecognized `code` value defensively (fall back to the HTTP status and `message`) rather than assuming this list is closed.\n\nOne thing this catalogue does not cover: **infeasible plans are not an error.** Submitting a plan the engine can't fully satisfy still returns a normal `200`/`201`. The plan is accepted, and unplanned stops or constraint violations show up in the solution (`unaffectedStopIds`, `tours[].violations` and, when present, `globalViolations`) rather than as an `Error`.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"errors.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"errors.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"warnings":{"type":"array","description":"Amendments applied, and probable mistakes found, in the payload before the preceding errors were found, if any.","items":{"type":"object","description":"A warning has the same structure as an `Error`, but a different semantic. It is present when an accepted payload was amended. Currently, the API makes three amendments. In the sandbox, it turns traffic off and forces crow-fly distances. In every agency, it clamps `maxOptimizationDuration` to the agency's cap. `properties.path` names the amended field and is stable. `properties.details` describes the change in English and contains the internal agency id. It is not stable at the moment, so build any message for a person from `properties.path` and the stored value.\n\nA warning can also flag an accepted value that is probably a mistake, with no amendment: for example, a tag in the `costsByResourceTag` of a `maxCumulatedCost` constraint that no resource carries. `properties.path` then points to that value.\n\nWarnings can also accompany the errors of a rejected payload: they then describe the amendments applied before the rejecting error was found.\n\n> **Modelling pitfall.** Warnings are only returned in the response to the `POST` or `PUT` that produced them. They aren't stored with the plan, so a later `GET` never returns them: read them from that response, since afterwards only the amended value remains visible.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"warnings.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"warnings.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"warnings","typeLabel":"object[]"}},"example":{"errors":[{"code":"INVALID_VALUE","message":"The field value is not valid."}]},"uniqueKey":"","typeLabel":"object"},"examples":{"invalidInput":{"title":"invalidInput","summary":"INVALID_INPUT","value":{"errors":[{"code":"INVALID_INPUT","message":"The payload cannot be parsed."}]}},"idNotUnique":{"title":"idNotUnique","summary":"ID_NOT_UNIQUE","value":{"errors":[{"code":"ID_NOT_UNIQUE","message":"The payload contains a collection with an id repeated multiple times."}]}},"keysNotUnique":{"title":"keysNotUnique","summary":"KEYS_NOT_UNIQUE","value":{"errors":[{"code":"KEYS_NOT_UNIQUE","message":"The payload contains a collection with the keys repeated multiple times."}]}},"invalidIdReference":{"title":"invalidIdReference","summary":"INVALID_ID_REFERENCE","value":{"errors":[{"code":"INVALID_ID_REFERENCE","message":"The id reference contains an id that does not exist."}]}},"invalidValue":{"title":"invalidValue","summary":"INVALID_VALUE","value":{"errors":[{"code":"INVALID_VALUE","message":"The field value is not valid."}]}},"preconditionFailed":{"title":"preconditionFailed","summary":"PRECONDITION_FAILED","value":{"errors":[{"code":"PRECONDITION_FAILED","message":"A precondition failed."}]}},"notImplemented":{"title":"notImplemented","summary":"NOT_IMPLEMENTED","value":{"errors":[{"code":"NOT_IMPLEMENTED","message":"Not yet implemented."}]}}},"exampleType":"examples"}},"exampleType":"examples"},"6631723f-b0fc-41ef-a977-a08819a60131":{"description":"The caller is not authenticated (`code: NOT_AUTHENTICATED`): no access token was sent, or it's missing, malformed, or expired. A token revoked or regenerated in the Console doesn't get a `401`: it gets a `403` `NOT_ALLOWED` instead (see the `403` response).\n","content":{"application/json":{"schema":{"type":"object","description":"Envelope wrapping one or more business errors, returned on every error response regardless of HTTP status, except a `429` temporary overload, which comes with an empty body.","properties":{"agencyId":{"type":"string","description":"The agency the failed action was scoped to.\n\n> **Default.** Absent when the action isn't tied to any agency at all — for example a `401` `NOT_AUTHENTICATED` response, returned before any agency could be resolved from the token.\n","pattern":"^BLD[0-9]{7}_[a-zA-Z0-9-._~:@!$,]+$","example":"BLD1234567_production","uniqueKey":"agencyId","typeLabel":"string"},"planId":{"type":"string","description":"The plan the failed action was scoped to.\n\n> **Default.** Absent whenever the action concerns an agency but no specific plan, or when `agencyId` itself is absent.\n","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","example":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","uniqueKey":"planId","typeLabel":"string\u003cuuid>"},"errors":{"type":"array","description":"The business errors that occurred. A `400` on plan or resource creation can report several invalid fields at once.","items":{"type":"object","description":"A single business error. Every error response, whatever the HTTP status, wraps one or more `Error` objects in an `EnvelopedErrors` envelope; a single response (typically a `400` on plan/resource creation) can report several invalid fields at once. The one exception is a `429` temporary overload, which comes with an empty body.\n\n**Always branch your error handling on `code`, not on the HTTP status alone or on this response's `description` in this spec.** Several `code` values can share the same status. In particular, all of `INVALID_INPUT`, `ID_NOT_UNIQUE`, `KEYS_NOT_UNIQUE`, `INVALID_ID_REFERENCE`, `INVALID_VALUE`, `PRECONDITION_FAILED`, and `NOT_IMPLEMENTED` return `400`.\n\nA code's status in the following table applies when that code is returned on its own. A plan that exceeds a size limit of its agency returns a `403` carrying one `INVALID_VALUE` per exceeded limit, each naming the field (`properties.path`) and the limit (`properties.details`), and a single `NOT_ALLOWED`. Read every error in the response, not only the first.\n\n## Business error codes\n\n| `code` | HTTP status | Default message | Returned when |\n| ------------------------ | ----------- | ---------------- | ------------- |\n| `INVALID_INPUT` | 400 | The payload cannot be parsed. | The request body isn't valid JSON, or doesn't match the expected schema (wrong type, missing required field). Also returned for a datetime the API cannot read, such as a `T` with no `Z` and no offset, or a local datetime in a plan without `tz` (see [Dates and time zones](https://developers.kardinal.ai/reference/data-model#dates-and-time-zones)). |\n| `ID_NOT_UNIQUE` | 400 | The payload contains a collection with an id repeated multiple times. | A collection in the payload (for example `resources`, `orders`) has the same `id` on more than one item. |\n| `KEYS_NOT_UNIQUE` | 400 | The payload contains a collection with the keys repeated multiple times. | A collection has a repeated business key other than `id` (for example a tag or reference field expected to be unique). |\n| `INVALID_ID_REFERENCE` | 400 | The id reference contains an id that does not exist. | A field references an `id` that doesn't match anything else in the payload or system (for example a `resourceId` that doesn't exist). |\n| `INVALID_VALUE` | 400 | The field value is not valid. | A field's value fails a validation rule: format, range, or allowed values. |\n| `PRECONDITION_FAILED` | 400 | A precondition failed. | The action requires the target resource to be in a particular state, and it isn't (for example acting on an already-deleted object). |\n| `NOT_IMPLEMENTED` | 400 | Not yet implemented. | The requested behaviour is recognized but not available yet. Despite the name, this returns `400`, not `501`; treat it as a client-facing \"not supported\" rather than a server capability gap. |\n| `NOT_AUTHENTICATED` | 401 | The caller is not authenticated. | No access token was sent, or it's missing, malformed, or expired. A token revoked or regenerated in the Console gets a `403` `NOT_ALLOWED` instead. |\n| `NOT_ALLOWED` | 403 | The requested action is not allowed. | Usually an agency limit was reached: an optimization quota, a plan size limit, or insufficient credits. Two other cases return it and are not limits: a token revoked or regenerated in the Console (`properties.details` is `the token is invalid`), and an update, stop or restart of an archived plan without `force`. `properties.details` states which case applies. |\n| `NOT_FOUND` | 404 | The requested object could not be found. | The resource addressed by the URL doesn't exist, or isn't visible to the caller (the API doesn't distinguish the two, to avoid leaking existence of resources you can't access). |\n| `INTERNAL_SERVER_ERROR` | 500 | The server encountered an unexpected condition that prevented it from fulfilling the request. | Unexpected server-side failure, unrelated to the request's content. If this persists, contact support with the request's timestamp. |\n\nThis enum reflects the codes returned by the current server implementation. New codes may be added in future non-breaking releases; treat an unrecognized `code` value defensively (fall back to the HTTP status and `message`) rather than assuming this list is closed.\n\nOne thing this catalogue does not cover: **infeasible plans are not an error.** Submitting a plan the engine can't fully satisfy still returns a normal `200`/`201`. The plan is accepted, and unplanned stops or constraint violations show up in the solution (`unaffectedStopIds`, `tours[].violations` and, when present, `globalViolations`) rather than as an `Error`.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"errors.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"errors.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"warnings":{"type":"array","description":"Amendments applied, and probable mistakes found, in the payload before the preceding errors were found, if any.","items":{"type":"object","description":"A warning has the same structure as an `Error`, but a different semantic. It is present when an accepted payload was amended. Currently, the API makes three amendments. In the sandbox, it turns traffic off and forces crow-fly distances. In every agency, it clamps `maxOptimizationDuration` to the agency's cap. `properties.path` names the amended field and is stable. `properties.details` describes the change in English and contains the internal agency id. It is not stable at the moment, so build any message for a person from `properties.path` and the stored value.\n\nA warning can also flag an accepted value that is probably a mistake, with no amendment: for example, a tag in the `costsByResourceTag` of a `maxCumulatedCost` constraint that no resource carries. `properties.path` then points to that value.\n\nWarnings can also accompany the errors of a rejected payload: they then describe the amendments applied before the rejecting error was found.\n\n> **Modelling pitfall.** Warnings are only returned in the response to the `POST` or `PUT` that produced them. They aren't stored with the plan, so a later `GET` never returns them: read them from that response, since afterwards only the amended value remains visible.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"warnings.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"warnings.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"warnings","typeLabel":"object[]"}},"example":{"errors":[{"code":"INVALID_VALUE","message":"The field value is not valid."}]},"uniqueKey":"","typeLabel":"object"},"examples":{"notAuthenticated":{"title":"notAuthenticated","summary":"NOT_AUTHENTICATED","value":{"errors":[{"code":"NOT_AUTHENTICATED","message":"The caller is not authenticated."}]}}},"exampleType":"examples"}},"exampleType":"examples"},"8e3afe18-7d84-4ac0-96ab-e8b7a5433b47":{"description":"The caller is not allowed to perform this action (`code: NOT_ALLOWED`): this usually means that an agency limit was reached, whether an optimization quota, a plan size limit, or insufficient credits. Two other situations return the same `403`, and neither is a limit: a token revoked or regenerated in the Console, which gets this `403` on every endpoint, reads and `DELETE` included, and an update, stop or restart of an archived plan without `force`. `properties.details` states which case applies. See [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas).\n","content":{"application/json":{"schema":{"type":"object","description":"Envelope wrapping one or more business errors, returned on every error response regardless of HTTP status, except a `429` temporary overload, which comes with an empty body.","properties":{"agencyId":{"type":"string","description":"The agency the failed action was scoped to.\n\n> **Default.** Absent when the action isn't tied to any agency at all — for example a `401` `NOT_AUTHENTICATED` response, returned before any agency could be resolved from the token.\n","pattern":"^BLD[0-9]{7}_[a-zA-Z0-9-._~:@!$,]+$","example":"BLD1234567_production","uniqueKey":"agencyId","typeLabel":"string"},"planId":{"type":"string","description":"The plan the failed action was scoped to.\n\n> **Default.** Absent whenever the action concerns an agency but no specific plan, or when `agencyId` itself is absent.\n","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","example":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","uniqueKey":"planId","typeLabel":"string\u003cuuid>"},"errors":{"type":"array","description":"The business errors that occurred. A `400` on plan or resource creation can report several invalid fields at once.","items":{"type":"object","description":"A single business error. Every error response, whatever the HTTP status, wraps one or more `Error` objects in an `EnvelopedErrors` envelope; a single response (typically a `400` on plan/resource creation) can report several invalid fields at once. The one exception is a `429` temporary overload, which comes with an empty body.\n\n**Always branch your error handling on `code`, not on the HTTP status alone or on this response's `description` in this spec.** Several `code` values can share the same status. In particular, all of `INVALID_INPUT`, `ID_NOT_UNIQUE`, `KEYS_NOT_UNIQUE`, `INVALID_ID_REFERENCE`, `INVALID_VALUE`, `PRECONDITION_FAILED`, and `NOT_IMPLEMENTED` return `400`.\n\nA code's status in the following table applies when that code is returned on its own. A plan that exceeds a size limit of its agency returns a `403` carrying one `INVALID_VALUE` per exceeded limit, each naming the field (`properties.path`) and the limit (`properties.details`), and a single `NOT_ALLOWED`. Read every error in the response, not only the first.\n\n## Business error codes\n\n| `code` | HTTP status | Default message | Returned when |\n| ------------------------ | ----------- | ---------------- | ------------- |\n| `INVALID_INPUT` | 400 | The payload cannot be parsed. | The request body isn't valid JSON, or doesn't match the expected schema (wrong type, missing required field). Also returned for a datetime the API cannot read, such as a `T` with no `Z` and no offset, or a local datetime in a plan without `tz` (see [Dates and time zones](https://developers.kardinal.ai/reference/data-model#dates-and-time-zones)). |\n| `ID_NOT_UNIQUE` | 400 | The payload contains a collection with an id repeated multiple times. | A collection in the payload (for example `resources`, `orders`) has the same `id` on more than one item. |\n| `KEYS_NOT_UNIQUE` | 400 | The payload contains a collection with the keys repeated multiple times. | A collection has a repeated business key other than `id` (for example a tag or reference field expected to be unique). |\n| `INVALID_ID_REFERENCE` | 400 | The id reference contains an id that does not exist. | A field references an `id` that doesn't match anything else in the payload or system (for example a `resourceId` that doesn't exist). |\n| `INVALID_VALUE` | 400 | The field value is not valid. | A field's value fails a validation rule: format, range, or allowed values. |\n| `PRECONDITION_FAILED` | 400 | A precondition failed. | The action requires the target resource to be in a particular state, and it isn't (for example acting on an already-deleted object). |\n| `NOT_IMPLEMENTED` | 400 | Not yet implemented. | The requested behaviour is recognized but not available yet. Despite the name, this returns `400`, not `501`; treat it as a client-facing \"not supported\" rather than a server capability gap. |\n| `NOT_AUTHENTICATED` | 401 | The caller is not authenticated. | No access token was sent, or it's missing, malformed, or expired. A token revoked or regenerated in the Console gets a `403` `NOT_ALLOWED` instead. |\n| `NOT_ALLOWED` | 403 | The requested action is not allowed. | Usually an agency limit was reached: an optimization quota, a plan size limit, or insufficient credits. Two other cases return it and are not limits: a token revoked or regenerated in the Console (`properties.details` is `the token is invalid`), and an update, stop or restart of an archived plan without `force`. `properties.details` states which case applies. |\n| `NOT_FOUND` | 404 | The requested object could not be found. | The resource addressed by the URL doesn't exist, or isn't visible to the caller (the API doesn't distinguish the two, to avoid leaking existence of resources you can't access). |\n| `INTERNAL_SERVER_ERROR` | 500 | The server encountered an unexpected condition that prevented it from fulfilling the request. | Unexpected server-side failure, unrelated to the request's content. If this persists, contact support with the request's timestamp. |\n\nThis enum reflects the codes returned by the current server implementation. New codes may be added in future non-breaking releases; treat an unrecognized `code` value defensively (fall back to the HTTP status and `message`) rather than assuming this list is closed.\n\nOne thing this catalogue does not cover: **infeasible plans are not an error.** Submitting a plan the engine can't fully satisfy still returns a normal `200`/`201`. The plan is accepted, and unplanned stops or constraint violations show up in the solution (`unaffectedStopIds`, `tours[].violations` and, when present, `globalViolations`) rather than as an `Error`.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"errors.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"errors.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"warnings":{"type":"array","description":"Amendments applied, and probable mistakes found, in the payload before the preceding errors were found, if any.","items":{"type":"object","description":"A warning has the same structure as an `Error`, but a different semantic. It is present when an accepted payload was amended. Currently, the API makes three amendments. In the sandbox, it turns traffic off and forces crow-fly distances. In every agency, it clamps `maxOptimizationDuration` to the agency's cap. `properties.path` names the amended field and is stable. `properties.details` describes the change in English and contains the internal agency id. It is not stable at the moment, so build any message for a person from `properties.path` and the stored value.\n\nA warning can also flag an accepted value that is probably a mistake, with no amendment: for example, a tag in the `costsByResourceTag` of a `maxCumulatedCost` constraint that no resource carries. `properties.path` then points to that value.\n\nWarnings can also accompany the errors of a rejected payload: they then describe the amendments applied before the rejecting error was found.\n\n> **Modelling pitfall.** Warnings are only returned in the response to the `POST` or `PUT` that produced them. They aren't stored with the plan, so a later `GET` never returns them: read them from that response, since afterwards only the amended value remains visible.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"warnings.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"warnings.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"warnings","typeLabel":"object[]"}},"example":{"errors":[{"code":"INVALID_VALUE","message":"The field value is not valid."}]},"uniqueKey":"","typeLabel":"object"},"examples":{"dailyQuotaExceeded":{"title":"dailyQuotaExceeded","summary":"NOT_ALLOWED — daily optimization quota reached","value":{"agencyId":"BLD1234567_sandbox","planId":"f7ee9aa5-36e5-4ce5-a978-8d69892f7831","errors":[{"code":"NOT_ALLOWED","message":"The requested action is not allowed.","properties":{"details":"The maximum number of optimizations per day (1500) has been reached for agency BLD1234567_sandbox"}}]}},"insufficientCredits":{"title":"insufficientCredits","summary":"NOT_ALLOWED — insufficient credits","value":{"agencyId":"BLD1234567_production","planId":"f7ee9aa5-36e5-4ce5-a978-8d69892f7831","errors":[{"code":"NOT_ALLOWED","message":"The requested action is not allowed.","properties":{"details":"Insufficient credits","remaining":"17"}}]}},"agencyQuotaConfigViolation":{"title":"agencyQuotaConfigViolation","summary":"NOT_ALLOWED — plan size limit exceeded","value":{"agencyId":"BLD1234567_sandbox","planId":"f7ee9aa5-36e5-4ce5-a978-8d69892f7831","errors":[{"code":"INVALID_VALUE","message":"The field value is not valid.","properties":{"details":"The plan's number of resources (251) is greater than the allowed value (250) for agency BLD1234567_sandbox","path":"resources"}},{"code":"NOT_ALLOWED","message":"The requested action is not allowed.","properties":{"details":"The resulting plan violates the quotas configuration of the agency"}}]}},"invalidToken":{"title":"invalidToken","summary":"NOT_ALLOWED — token revoked or regenerated","value":{"errors":[{"code":"NOT_ALLOWED","message":"The requested action is not allowed.","properties":{"details":"the token is invalid"}}]}}},"exampleType":"examples"}},"exampleType":"examples"},"8c8ab25b-584f-41a1-be7e-6e5a7c9979f4":{"description":"The specified resource was not found (`code: NOT_FOUND`): the resource addressed by the URL doesn't exist, or isn't visible to the caller (the API doesn't distinguish the two, to avoid leaking the existence of resources the caller can't access).\n\nOn `GET /plans/{planId}/solution`, only `properties.details` tells two cases apart: `Plan not found` means the plan doesn't exist or was deleted; `Solution version not found.` means the plan exists but has no solution yet, as while it's `waiting` or `processing`.\n","content":{"application/json":{"schema":{"type":"object","description":"Envelope wrapping one or more business errors, returned on every error response regardless of HTTP status, except a `429` temporary overload, which comes with an empty body.","properties":{"agencyId":{"type":"string","description":"The agency the failed action was scoped to.\n\n> **Default.** Absent when the action isn't tied to any agency at all — for example a `401` `NOT_AUTHENTICATED` response, returned before any agency could be resolved from the token.\n","pattern":"^BLD[0-9]{7}_[a-zA-Z0-9-._~:@!$,]+$","example":"BLD1234567_production","uniqueKey":"agencyId","typeLabel":"string"},"planId":{"type":"string","description":"The plan the failed action was scoped to.\n\n> **Default.** Absent whenever the action concerns an agency but no specific plan, or when `agencyId` itself is absent.\n","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","example":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","uniqueKey":"planId","typeLabel":"string\u003cuuid>"},"errors":{"type":"array","description":"The business errors that occurred. A `400` on plan or resource creation can report several invalid fields at once.","items":{"type":"object","description":"A single business error. Every error response, whatever the HTTP status, wraps one or more `Error` objects in an `EnvelopedErrors` envelope; a single response (typically a `400` on plan/resource creation) can report several invalid fields at once. The one exception is a `429` temporary overload, which comes with an empty body.\n\n**Always branch your error handling on `code`, not on the HTTP status alone or on this response's `description` in this spec.** Several `code` values can share the same status. In particular, all of `INVALID_INPUT`, `ID_NOT_UNIQUE`, `KEYS_NOT_UNIQUE`, `INVALID_ID_REFERENCE`, `INVALID_VALUE`, `PRECONDITION_FAILED`, and `NOT_IMPLEMENTED` return `400`.\n\nA code's status in the following table applies when that code is returned on its own. A plan that exceeds a size limit of its agency returns a `403` carrying one `INVALID_VALUE` per exceeded limit, each naming the field (`properties.path`) and the limit (`properties.details`), and a single `NOT_ALLOWED`. Read every error in the response, not only the first.\n\n## Business error codes\n\n| `code` | HTTP status | Default message | Returned when |\n| ------------------------ | ----------- | ---------------- | ------------- |\n| `INVALID_INPUT` | 400 | The payload cannot be parsed. | The request body isn't valid JSON, or doesn't match the expected schema (wrong type, missing required field). Also returned for a datetime the API cannot read, such as a `T` with no `Z` and no offset, or a local datetime in a plan without `tz` (see [Dates and time zones](https://developers.kardinal.ai/reference/data-model#dates-and-time-zones)). |\n| `ID_NOT_UNIQUE` | 400 | The payload contains a collection with an id repeated multiple times. | A collection in the payload (for example `resources`, `orders`) has the same `id` on more than one item. |\n| `KEYS_NOT_UNIQUE` | 400 | The payload contains a collection with the keys repeated multiple times. | A collection has a repeated business key other than `id` (for example a tag or reference field expected to be unique). |\n| `INVALID_ID_REFERENCE` | 400 | The id reference contains an id that does not exist. | A field references an `id` that doesn't match anything else in the payload or system (for example a `resourceId` that doesn't exist). |\n| `INVALID_VALUE` | 400 | The field value is not valid. | A field's value fails a validation rule: format, range, or allowed values. |\n| `PRECONDITION_FAILED` | 400 | A precondition failed. | The action requires the target resource to be in a particular state, and it isn't (for example acting on an already-deleted object). |\n| `NOT_IMPLEMENTED` | 400 | Not yet implemented. | The requested behaviour is recognized but not available yet. Despite the name, this returns `400`, not `501`; treat it as a client-facing \"not supported\" rather than a server capability gap. |\n| `NOT_AUTHENTICATED` | 401 | The caller is not authenticated. | No access token was sent, or it's missing, malformed, or expired. A token revoked or regenerated in the Console gets a `403` `NOT_ALLOWED` instead. |\n| `NOT_ALLOWED` | 403 | The requested action is not allowed. | Usually an agency limit was reached: an optimization quota, a plan size limit, or insufficient credits. Two other cases return it and are not limits: a token revoked or regenerated in the Console (`properties.details` is `the token is invalid`), and an update, stop or restart of an archived plan without `force`. `properties.details` states which case applies. |\n| `NOT_FOUND` | 404 | The requested object could not be found. | The resource addressed by the URL doesn't exist, or isn't visible to the caller (the API doesn't distinguish the two, to avoid leaking existence of resources you can't access). |\n| `INTERNAL_SERVER_ERROR` | 500 | The server encountered an unexpected condition that prevented it from fulfilling the request. | Unexpected server-side failure, unrelated to the request's content. If this persists, contact support with the request's timestamp. |\n\nThis enum reflects the codes returned by the current server implementation. New codes may be added in future non-breaking releases; treat an unrecognized `code` value defensively (fall back to the HTTP status and `message`) rather than assuming this list is closed.\n\nOne thing this catalogue does not cover: **infeasible plans are not an error.** Submitting a plan the engine can't fully satisfy still returns a normal `200`/`201`. The plan is accepted, and unplanned stops or constraint violations show up in the solution (`unaffectedStopIds`, `tours[].violations` and, when present, `globalViolations`) rather than as an `Error`.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"errors.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"errors.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"warnings":{"type":"array","description":"Amendments applied, and probable mistakes found, in the payload before the preceding errors were found, if any.","items":{"type":"object","description":"A warning has the same structure as an `Error`, but a different semantic. It is present when an accepted payload was amended. Currently, the API makes three amendments. In the sandbox, it turns traffic off and forces crow-fly distances. In every agency, it clamps `maxOptimizationDuration` to the agency's cap. `properties.path` names the amended field and is stable. `properties.details` describes the change in English and contains the internal agency id. It is not stable at the moment, so build any message for a person from `properties.path` and the stored value.\n\nA warning can also flag an accepted value that is probably a mistake, with no amendment: for example, a tag in the `costsByResourceTag` of a `maxCumulatedCost` constraint that no resource carries. `properties.path` then points to that value.\n\nWarnings can also accompany the errors of a rejected payload: they then describe the amendments applied before the rejecting error was found.\n\n> **Modelling pitfall.** Warnings are only returned in the response to the `POST` or `PUT` that produced them. They aren't stored with the plan, so a later `GET` never returns them: read them from that response, since afterwards only the amended value remains visible.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"warnings.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"warnings.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"warnings","typeLabel":"object[]"}},"example":{"errors":[{"code":"INVALID_VALUE","message":"The field value is not valid."}]},"uniqueKey":"","typeLabel":"object"},"examples":{"notFound":{"title":"notFound","summary":"NOT_FOUND","value":{"errors":[{"code":"NOT_FOUND","message":"The requested object could not be found."}]}}},"exampleType":"examples"}},"exampleType":"examples"},"559e1561-b17a-4ebd-9502-e2ac1a350764":{"description":"An internal server error has occurred (`code: INTERNAL_SERVER_ERROR`): an unexpected server-side failure, unrelated to the request's content. If this persists, contact support with the request's timestamp.\n","content":{"application/json":{"schema":{"type":"object","description":"Envelope wrapping one or more business errors, returned on every error response regardless of HTTP status, except a `429` temporary overload, which comes with an empty body.","properties":{"agencyId":{"type":"string","description":"The agency the failed action was scoped to.\n\n> **Default.** Absent when the action isn't tied to any agency at all — for example a `401` `NOT_AUTHENTICATED` response, returned before any agency could be resolved from the token.\n","pattern":"^BLD[0-9]{7}_[a-zA-Z0-9-._~:@!$,]+$","example":"BLD1234567_production","uniqueKey":"agencyId","typeLabel":"string"},"planId":{"type":"string","description":"The plan the failed action was scoped to.\n\n> **Default.** Absent whenever the action concerns an agency but no specific plan, or when `agencyId` itself is absent.\n","format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","example":"4cbd0ab8-282c-4b30-b981-29e1ed8a2016","uniqueKey":"planId","typeLabel":"string\u003cuuid>"},"errors":{"type":"array","description":"The business errors that occurred. A `400` on plan or resource creation can report several invalid fields at once.","items":{"type":"object","description":"A single business error. Every error response, whatever the HTTP status, wraps one or more `Error` objects in an `EnvelopedErrors` envelope; a single response (typically a `400` on plan/resource creation) can report several invalid fields at once. The one exception is a `429` temporary overload, which comes with an empty body.\n\n**Always branch your error handling on `code`, not on the HTTP status alone or on this response's `description` in this spec.** Several `code` values can share the same status. In particular, all of `INVALID_INPUT`, `ID_NOT_UNIQUE`, `KEYS_NOT_UNIQUE`, `INVALID_ID_REFERENCE`, `INVALID_VALUE`, `PRECONDITION_FAILED`, and `NOT_IMPLEMENTED` return `400`.\n\nA code's status in the following table applies when that code is returned on its own. A plan that exceeds a size limit of its agency returns a `403` carrying one `INVALID_VALUE` per exceeded limit, each naming the field (`properties.path`) and the limit (`properties.details`), and a single `NOT_ALLOWED`. Read every error in the response, not only the first.\n\n## Business error codes\n\n| `code` | HTTP status | Default message | Returned when |\n| ------------------------ | ----------- | ---------------- | ------------- |\n| `INVALID_INPUT` | 400 | The payload cannot be parsed. | The request body isn't valid JSON, or doesn't match the expected schema (wrong type, missing required field). Also returned for a datetime the API cannot read, such as a `T` with no `Z` and no offset, or a local datetime in a plan without `tz` (see [Dates and time zones](https://developers.kardinal.ai/reference/data-model#dates-and-time-zones)). |\n| `ID_NOT_UNIQUE` | 400 | The payload contains a collection with an id repeated multiple times. | A collection in the payload (for example `resources`, `orders`) has the same `id` on more than one item. |\n| `KEYS_NOT_UNIQUE` | 400 | The payload contains a collection with the keys repeated multiple times. | A collection has a repeated business key other than `id` (for example a tag or reference field expected to be unique). |\n| `INVALID_ID_REFERENCE` | 400 | The id reference contains an id that does not exist. | A field references an `id` that doesn't match anything else in the payload or system (for example a `resourceId` that doesn't exist). |\n| `INVALID_VALUE` | 400 | The field value is not valid. | A field's value fails a validation rule: format, range, or allowed values. |\n| `PRECONDITION_FAILED` | 400 | A precondition failed. | The action requires the target resource to be in a particular state, and it isn't (for example acting on an already-deleted object). |\n| `NOT_IMPLEMENTED` | 400 | Not yet implemented. | The requested behaviour is recognized but not available yet. Despite the name, this returns `400`, not `501`; treat it as a client-facing \"not supported\" rather than a server capability gap. |\n| `NOT_AUTHENTICATED` | 401 | The caller is not authenticated. | No access token was sent, or it's missing, malformed, or expired. A token revoked or regenerated in the Console gets a `403` `NOT_ALLOWED` instead. |\n| `NOT_ALLOWED` | 403 | The requested action is not allowed. | Usually an agency limit was reached: an optimization quota, a plan size limit, or insufficient credits. Two other cases return it and are not limits: a token revoked or regenerated in the Console (`properties.details` is `the token is invalid`), and an update, stop or restart of an archived plan without `force`. `properties.details` states which case applies. |\n| `NOT_FOUND` | 404 | The requested object could not be found. | The resource addressed by the URL doesn't exist, or isn't visible to the caller (the API doesn't distinguish the two, to avoid leaking existence of resources you can't access). |\n| `INTERNAL_SERVER_ERROR` | 500 | The server encountered an unexpected condition that prevented it from fulfilling the request. | Unexpected server-side failure, unrelated to the request's content. If this persists, contact support with the request's timestamp. |\n\nThis enum reflects the codes returned by the current server implementation. New codes may be added in future non-breaking releases; treat an unrecognized `code` value defensively (fall back to the HTTP status and `message`) rather than assuming this list is closed.\n\nOne thing this catalogue does not cover: **infeasible plans are not an error.** Submitting a plan the engine can't fully satisfy still returns a normal `200`/`201`. The plan is accepted, and unplanned stops or constraint violations show up in the solution (`unaffectedStopIds`, `tours[].violations` and, when present, `globalViolations`) rather than as an `Error`.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"errors.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"errors.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"warnings":{"type":"array","description":"Amendments applied, and probable mistakes found, in the payload before the preceding errors were found, if any.","items":{"type":"object","description":"A warning has the same structure as an `Error`, but a different semantic. It is present when an accepted payload was amended. Currently, the API makes three amendments. In the sandbox, it turns traffic off and forces crow-fly distances. In every agency, it clamps `maxOptimizationDuration` to the agency's cap. `properties.path` names the amended field and is stable. `properties.details` describes the change in English and contains the internal agency id. It is not stable at the moment, so build any message for a person from `properties.path` and the stored value.\n\nA warning can also flag an accepted value that is probably a mistake, with no amendment: for example, a tag in the `costsByResourceTag` of a `maxCumulatedCost` constraint that no resource carries. `properties.path` then points to that value.\n\nWarnings can also accompany the errors of a rejected payload: they then describe the amendments applied before the rejecting error was found.\n\n> **Modelling pitfall.** Warnings are only returned in the response to the `POST` or `PUT` that produced them. They aren't stored with the plan, so a later `GET` never returns them: read them from that response, since afterwards only the amended value remains visible.\n","required":["message","code"],"properties":{"code":{"type":"string","description":"Stable identifier for the error type. Branch your error handling on this field, not on the HTTP status alone or on this response's `description` in this spec. Several `code` values can share the same status. See the preceding table.\n","enum":["INVALID_INPUT","ID_NOT_UNIQUE","KEYS_NOT_UNIQUE","INVALID_ID_REFERENCE","INVALID_VALUE","PRECONDITION_FAILED","NOT_IMPLEMENTED","NOT_AUTHENTICATED","NOT_ALLOWED","NOT_FOUND","INTERNAL_SERVER_ERROR"],"example":"INVALID_VALUE","isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Default, human-readable message. Useful for logs; not meant to be parsed.","example":"The field value is not valid.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"properties":{"type":"object","description":"Optional extra context for the error, when the API provides any.\n\nThe exact keys returned in `properties` for a given `code` (for example, which field name or invalid value is included in an `INVALID_VALUE` or `INVALID_ID_REFERENCE` error) are not yet documented per `code`. Treat any `properties` content as informational and not stable. The one exception is `properties.path` on a `Warning`, which is stable.\n","additionalProperties":{"type":"string","uniqueKey":"warnings.items.[INDEX].properties.additionalProperties","typeLabel":"string"},"uniqueKey":"warnings.items.[INDEX].properties","typeLabel":"object"}},"uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"warnings","typeLabel":"object[]"}},"example":{"errors":[{"code":"INVALID_VALUE","message":"The field value is not valid."}]},"uniqueKey":"","typeLabel":"object"},"examples":{"internalServerError":{"title":"internalServerError","summary":"INTERNAL_SERVER_ERROR","value":{"errors":[{"code":"INTERNAL_SERVER_ERROR","message":"The server encountered an unexpected condition that prevented it from fulfilling the request."}]}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"6e4ca5fd-8ff5-4034-84ba-5f3a2d7a9439":{"access_token":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT bearer token, sent as `Authorization: Bearer \u003ctoken>`. Two kinds of token are accepted:\n\n- A **session token** (1 hour), obtained through the interactive Console login flow. Used to sign in to the Console; not meant to be used against this API.\n- A **long-term API token** (366 days), obtained once via the Console and meant to be stored by your integration. It is the credential recommended for backend use, since it does not depend on repeating the interactive login flow.\n","scopes":[],"schemeName":"access_token"}}},"servers":{"7059483f-0edd-4dc4-97aa-9452eec3a505":{"url":"https://app.kardinal.ai/api/v2","description":"Production and sandbox (same host; the API token used determines which agency a call applies to)."},"7951acdd-f991-4536-895f-9dda3c02d02d":{"url":"/api/v2","description":"Relative path, for environments where the host is supplied separately."}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT bearer token, sent as `Authorization: Bearer \u003ctoken>`. Two kinds of token are accepted:\n\n- A **session token** (1 hour), obtained through the interactive Console login flow. Used to sign in to the Console; not meant to be used against this API.\n- A **long-term API token** (366 days), obtained once via the Console and meant to be stored by your integration. It is the credential recommended for backend use, since it does not depend on repeating the interactive login flow.\n","scopes":[],"schemeName":"access_token"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"JWT bearer token, sent as `Authorization: Bearer \u003ctoken>`. Two kinds of token are accepted:\n\n- A **session token** (1 hour), obtained through the interactive Console login flow. Used to sign in to the Console; not meant to be used against this API.\n- A **long-term API token** (366 days), obtained once via the Console and meant to be stored by your integration. It is the credential recommended for backend use, since it does not depend on repeating the interactive login flow.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"access_token","name":"Authorization"}],"title":"access_token"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"kardinal","siteName":"Kardinal Route Optimization API","title":"Update a plan - Kardinal Route Optimization API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/plan/update-a-plan","matchLevel":0}}},"lastModified":"2026-11-26T06:28:29.695Z","originalFileLocation":"api-reference/plan/update-a-plan.mdx","locale":"en"},"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=\"Replaces the plan\u0026#x27;s data for this id, keeping the same id. The version is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same version, and isn\u0026#x27;t billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a 404 if no plan exists with this id — use POST /plans to create one instead. This operation consumes credits — see Pricing and credits. \u0026gt; Modelling pitfall. force=true on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don\u0026#x27;t set it by default.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Kardinal Route Optimization API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/kardinal/4VnUJAe0ozIKpmRZ/_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/kardinal/4VnUJAe0ozIKpmRZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/kardinal/4VnUJAe0ozIKpmRZ/_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/kardinal/4VnUJAe0ozIKpmRZ/_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/kardinal/4VnUJAe0ozIKpmRZ/_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/kardinal/4VnUJAe0ozIKpmRZ/_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/kardinal/4VnUJAe0ozIKpmRZ/_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/kardinal/4VnUJAe0ozIKpmRZ/_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/kardinal/4VnUJAe0ozIKpmRZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a plan - Kardinal Route Optimization API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Replaces the plan\u0026#x27;s data for this id, keeping the same id. The version is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same version, and isn\u0026#x27;t billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a 404 if no plan exists with this id — use POST /plans to create one instead. This operation consumes credits — see Pricing and credits. \u0026gt; Modelling pitfall. force=true on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don\u0026#x27;t set it by default.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Kardinal Route Optimization API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.kardinal.ai/api-reference/plan/update-a-plan\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://kardinal.mintlify.site/_mintlify/api/og/v2?division=Plan\u0026amp;title=Update+a+plan\u0026amp;description=Replaces+the+plan%27s+data+for+this+%60id%60%2C+keeping+the+same+%60id%60.+The+%60version%60+is+incremented%2C+and+the+plan+re-optimized%2C+only+if+its+content+changed%3A+a+body+iden\u0026amp;theme=31f7f39032a766cc65aea301\u0026amp;signature=711363c097d2f22fffbd84955af99d05b6df59e18f1c4212795ef8bca5a013d6\">\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=\"Update a plan - Kardinal Route Optimization API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Replaces the plan\u0026#x27;s data for this id, keeping the same id. The version is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same version, and isn\u0026#x27;t billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a 404 if no plan exists with this id — use POST /plans to create one instead. This operation consumes credits — see Pricing and credits. \u0026gt; Modelling pitfall. force=true on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don\u0026#x27;t set it by default.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://kardinal.mintlify.site/_mintlify/api/og/v2?division=Plan\u0026amp;title=Update+a+plan\u0026amp;description=Replaces+the+plan%27s+data+for+this+%60id%60%2C+keeping+the+same+%60id%60.+The+%60version%60+is+incremented%2C+and+the+plan+re-optimized%2C+only+if+its+content+changed%3A+a+body+iden\u0026amp;theme=31f7f39032a766cc65aea301\u0026amp;signature=711363c097d2f22fffbd84955af99d05b6df59e18f1c4212795ef8bca5a013d6\">\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/kardinal/4VnUJAe0ozIKpmRZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Kardinal Route Optimization API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4D6AFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.kardinal.ai/api-reference/plan/update-a-plan\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/plan/update-a-plan.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://kardinal.ai/#organization\",\"name\":\"Kardinal\",\"url\":\"https://kardinal.ai/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/kardinal/NzVu4E70FNnktm7V/images/Logo-blue-black.png?fit=max\u0026auto=format\u0026n=NzVu4E70FNnktm7V\u0026q=85\u0026s=877e4130943370aa62e85ed76662c9bc\"},\"sameAs\":[\"https://www.linkedin.com/company/kardinalai\",\"https://github.com/KardinalAI\"]},{\"@type\":\"WebSite\",\"@id\":\"https://developers.kardinal.ai#website\",\"name\":\"Kardinal Route Optimization API\",\"url\":\"https://developers.kardinal.ai\",\"publisher\":{\"@id\":\"https://kardinal.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.kardinal.ai/api-reference/plan/update-a-plan#webpage\",\"url\":\"https://developers.kardinal.ai/api-reference/plan/update-a-plan\",\"name\":\"Update a plan\",\"description\":\"Replaces the plan's data for this id, keeping the same id. The version is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same version, and isn't billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a 404 if no plan exists with this id — use POST /plans to create one instead. This operation consumes credits — see Pricing and credits. > Modelling pitfall. force=true on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don't set it by default.\",\"dateModified\":\"2026-11-26T06:28:29.695Z\",\"isPartOf\":{\"@id\":\"https://developers.kardinal.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developers.kardinal.ai/api-reference/plan/update-a-plan#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.kardinal.ai/api-reference/plan/update-a-plan#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API\",\"item\":\"https://developers.kardinal.ai/api-reference/plan/retrieve-the-list-of-plans-in-a-light-representation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Plan\",\"item\":\"https://developers.kardinal.ai/api-reference/plan/retrieve-the-list-of-plans-in-a-light-representation\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update a plan\",\"item\":\"https://developers.kardinal.ai/api-reference/plan/update-a-plan\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.kardinal.ai/api-reference/plan/update-a-plan#apireference\",\"headline\":\"Update a plan\",\"name\":\"Update a plan\",\"description\":\"Replaces the plan's data for this id, keeping the same id. The version is incremented, and the plan re-optimized, only if its content changed: a body identical to the stored plan changes nothing, keeps the same version, and isn't billed. The engine treats a changed plan as an update to the same problem and re-optimizes from the previous solution rather than from scratch. The body must be the complete plan: every resource and order to keep, plus any change. This is not a partial update, so anything omitted from the body is removed from the plan. Returns a 404 if no plan exists with this id — use POST /plans to create one instead. This operation consumes credits — see Pricing and credits. > Modelling pitfall. force=true on an archived plan always creates a new version and bills every stop again, even if the content is identical. Don't set it by default.\",\"url\":\"https://developers.kardinal.ai/api-reference/plan/update-a-plan\",\"mainEntityOfPage\":{\"@id\":\"https://developers.kardinal.ai/api-reference/plan/update-a-plan#webpage\"},\"dateModified\":\"2026-11-26T06:28:29.695Z\",\"publisher\":{\"@id\":\"https://kardinal.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.kardinal.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Kardinal Route Optimization API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Kardinal\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/plan/update-a-plan.md","siteName":"Kardinal Route Optimization API","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Getting started","pages":[{"title":"Getting started","href":""}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/concepts/how-the-optimization-engine-works"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/vocabulary-mapping"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"API Reference","groups":[{"group":"API","pages":[{"group":"Plan","pages":[{"title":"Retrieve the list of plans, in a light representation","deprecated":null,"version":null,"openapi":"/openapi.yaml get /plans","href":"/api-reference/plan/retrieve-the-list-of-plans-in-a-light-representation"},{"title":"Create a plan","deprecated":null,"version":null,"openapi":"/openapi.yaml post /plans","href":"/api-reference/plan/create-a-plan"},{"title":"Retrieve a plan","description":"Returns the plan currently stored for this `id`, reflecting any updates applied since it was created.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /plans/{planId}","href":"/api-reference/plan/retrieve-a-plan"},{"title":"Update a plan","deprecated":null,"version":null,"openapi":"/openapi.yaml put /plans/{planId}","href":"/api-reference/plan/update-a-plan"},{"title":"Delete a plan","description":"Permanently deletes the plan and its solution; any optimization in progress is stopped.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /plans/{planId}","href":"/api-reference/plan/delete-a-plan"},{"title":"Stop or restart the optimization of a plan","deprecated":null,"version":null,"openapi":"/openapi.yaml put /plans/{planId}/running","href":"/api-reference/plan/stop-or-restart-the-optimization-of-a-plan"},{"title":"Retrieve the latest state of a plan","deprecated":null,"version":null,"openapi":"/openapi.yaml get /plans/{planId}/state","href":"/api-reference/plan/retrieve-the-latest-state-of-a-plan"}]},{"group":"Solution","pages":[{"title":"Retrieve a plan solution","deprecated":null,"version":null,"openapi":"/openapi.yaml get /plans/{planId}/solution","href":"/api-reference/solution/retrieve-a-plan-solution"},{"title":"Retrieve the objectives of a plan solution","deprecated":null,"version":null,"openapi":"/openapi.yaml get /plans/{planId}/solution/objectives","href":"/api-reference/solution/retrieve-the-objectives-of-a-plan-solution"}]}]},{"group":"Data model \u0026 glossary","pages":[{"title":"Route plan data model","sidebarTitle":"Data model","mode":"wide","href":"/reference/data-model"},{"title":"Vehicle routing (VRP) glossary","sidebarTitle":"Glossary","mode":"wide","href":"/reference/glossary"}]},{"group":"Usage, limits \u0026 billing","pages":[{"title":"Limits and quotas","mode":"wide","href":"/reference/limits-and-quotas"},{"title":"Pricing and credits","href":"/reference/pricing-and-credits"},{"title":"Changelog","mode":"center","href":"/reference/changelog"}]}]},{"tab":"Modeling examples by industry","pages":[{"title":"Modeling examples by industry","href":"/case-studies/overview"}]}]}]},"basePath":"","title":"Update a plan - Kardinal Route Optimization API","deploymentId":"dpl_4DWa5VHHws8GyZotTfaG5njNqY1w","buildId":"dpl_4DWa5VHHws8GyZotTfaG5njNqY1w","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-DyzLiT8c.js","dist-C_2TOOIX.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-BSmGr6_d.js","snippetPresets-ScYHtgPH.js","utils-CEQwJl7d.js","style-to-object-BY3JEAdk.js","utils-B22OY4jq.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-D7Wy8St1.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BR14VZ6P.js","_Uint8Array-C_Hiqjf5.js","isObject-FP1Yky1u.js","ApiExamples-rpsi2T43.js","usePlaygroundInputsStore-CUAKkrDg.js","shallow-Bpslp4zw.js","isEqual-HLimTTXg.js","CodeSnippets-CZ_WZFtq.js","CodeSnippet-SObXR_MO.js","use-playground-group-access-B94EDetc.js","Page-BkBC9rKz.js","api-description-markdown-viF3flEw.js","DynamicMarkdown-ChHD_AmO.js","SectionHeading-BXzqAgc6.js","MethodPill-D2328AeU.js","getPastedJson-BDyiAD6x.js","Check2Icon-8iE1_yY_.js","axios-CsQoIw0U.js","Markdown-ChbbJS-9.js","AssistantPageLink-DbSMdE4V.js"]}