Optimiciti Developer PortalOptimiciti Developer Portal
  • Pricing
  • Documentation
  • API Reference
  • Back to Optimiciti
Information
Problem
    Submit an optimization runpostPoll a run's status (never its routes)getCancel the optimization run identified by the problemId parameterpost
Utilities
    Health Checkget
Billing
    This month's task usagegetList public plansget
History
    Get User RunspostGet Run IdspostGet Run SummariespostList Example ScenariospostGet Run ResultspostGet a published example scenariogetUpdate Run NamepostDelete Runpost
Data-processing
    Calculate a cost matrix for the given locationspost
Optimization
    Get Run StatuspostCancel Runpost
System
    Read Rootget
Schemas
powered by Zuplo
Optimiciti API Specification
Optimiciti API Specification

Schemas


SolveRequest

The complete request payload for the /problem endpoint.
​ProblemRequest · required

The Problem object embedded within the main solve request.

userId
​string | null

Your identity for ownership comes from your API key (or Clerk token), never from this field, so a run is owned by the credential that submitted it — POST /user_runs returns the runs your key made regardless of what userId you send. Required only when you call without a credential: an API-key or token request may omit it (the value is then ignored), but a request with neither a key nor a token must supply a non-empty userId as a self-assigned id, or it is rejected with 400 MISSING_USER_ID. The browser app's legacy soft-auth path uses it this way.

exampleSlug
​string

Optional. The slug of the published example scenario this solve was loaded from (as returned by /list_examples). Published examples legitimately exceed the free tier's size limits, so sending this grants a bounded allowance sized from that example's own row counts plus a small edit margin - enough to run and tweak the demo, and never more than the named example's real size. Omit it for a user's own scenarios; an unrecognised slug is ignored.

ProblemRequest

The Problem object embedded within the main solve request.
problemType
​string · enum · required
Enum values:
pickup-delivery
vehicle-routing
Example: vehicle-routing
​ProblemData · required

This schema defines the problem data for an optimization Problem. The particular data objects used will depend on the problemType.

​TimeSettings

This schema defines how to interpet the input time field settings. Optimiciti allows for input times to be specified as absolute numeric values (i.e 0, 12, 60, etc.) or as date/time values (i.e. 1/1/2024, 2:24pm).

coordinateSystem
​CoordinateSystem · enum

Which coordinate family this problem's locations use. geographic (the default, and what every existing payload means) uses latitude/longitude on the Earth. cartesian uses unbounded x/y on an arbitrary plane, for scenarios with positions but no addresses. It describes the DATA, not the costing, so it is set once per request rather than per cost setting - and it decides which distance/duration methods are valid.

Enum values:
geographic
cartesian
Default: geographic

StandardResponse

A standardized response envelope used across the API.
success
​boolean

Indicates if the request was successful

Default: true
data
​

The main response payload. Can be an object, array, boolean, or string.

​ResponseError

ResponseError

code
​string · required

Internal error code

message
​string · required

Human readable error message

details
​object | null

Additional error context

RunIdRequest

run_id
​string · required

The unique Run ID

RunItem

run_id
​string · required
run_datetime_unix
​integer · required

RunSummaryEntry

One run in `POST /run_summaries_by_user`, keyed by its `run_id` in the enclosing object.
run_datetime_unix
​integer | null · required

When the run was submitted, as a Unix timestamp in seconds. An integer, the same type POST /user_runs returns for this run.

Example: 1789703114
status
​string · enum · required

The run's lifecycle status, the same value POST /run_status reports: queued, running, succeeded, failed or cancelled. Runs from before the lifecycle field existed are all finished and read succeeded.

Enum values:
queued
running
succeeded
failed
cancelled
Example: succeeded
​object · required

A compact summary of the finished run: the assignmentSummary, routeSummary and costSummary parts of the result's resultSummary, key for key (the full result, including timingSummary, is in POST /run_results_by_run_id). Empty ({}) for runs finished before 2026-09-18, which predate the summary being written; there is no backfill.

run_name
​string

The name given with POST /update_run_name. Absent until the run has been renamed.

Example: Tuesday routes

UpdateRunRequest

run_id
​string · required
run_name
​string · required

UserHistoryRequest

user_id
​string · required

The unique User ID

UserRunsResponse

​RunItem[] · required

ProblemData

This schema defines the problem data for an optimization Problem. The particular data objects used will depend on the problemType.
​Location[]
​Trip[]
​Vehicle[]
​VehicleType[]
​TravelCost[]

TimeSettings

This schema defines how to interpet the input time field settings. Optimiciti allows for input times to be specified as absolute numeric values (i.e 0, 12, 60, etc.) or as date/time values (i.e. 1/1/2024, 2:24pm).
timeUnit
​string · enum

The time unit to use for optimization. This time unit will apply, as applicable, to location open and close windows, trip open and close windows, vehicle operating times, and travel durations. Integer (default) indicates that all times are in absolute time units from an arbitrarily defined time 0. Clock indicates that times will be interpreted as literal clock times and calendar dates. Which time fields are READ depends on this: integer reads only the *TimeInt fields; clock reads only the *TimeStr fields, plus *DayInt as a day offset to them. integer is also what you get when timeSettings is omitted, so clock times such as 9:00 AM need timeSettings with timeUnit: clock at the top level of the problem (not inside problemData). A request whose time values would be ignored under the unit it declares is refused with 400 IGNORED_TIME_WINDOW.

Enum values:
integer
clock
Default: integer
timeFormat
​string

The format to expect all time fields in. This field is only relevant when timeUnit = "clock". Formattings should match the formats described by the python pandas.Period.strftime class. For example, if the format used matches 09:32pm, then '%I:%M%p'. If null is passed, then the pandas.to_datetime function will be used to detect the format.

Example: I:%M%p
Default: null
multipleDays
​

A boolean field indicating whether to allow the optimization time period to extend multiple days. This field is relevant only when timeUnit = "datetime".

Default: false
dateUnit
​string · enum

The date unit to use for optimization. This field is only relevant when timeUnit = "clock" and multipleDays = true. If this field is integer, then days will be measured as absolute days from an arbitrarily defined day 0. Calendar indidates that dates will be interpreted as literal calendar dates.

Enum values:
integer
calendar
Default: integer
dateFormat
​string

The format to expect all dates fields in. This field is only relevant when dateUnit = "calendar", multipleDays = true, and timeUnit = "clock". Formattings should match the formats described by the python pandas.Period.strftime class. For example, if the format used matches 2024-12-31, then '%Y-%m-%d' should be passed for this parameter. If null is passed, then the pandas.to_datetime function will be used to detect the format.

Example: %Y-%m-%d
Default: null

Location

locationId
​string · required

A string that uniquely identifies this location.

Example: 550e8400-e29b-41d4-a716-446655440000
locationName
​string · required

A name for this location. Required: a request whose location has no locationName is refused with 422. It is echoed on every route stop that visits the location (RouteStop.locationName) and on unassignedLocationsFull, so a route sheet is readable without re-joining the input.

Example: Chicago
demand
​integer · min: 0

The amount of vehicle capacity this location consumes

Example: 10
Default: 1
latitude
​number · float · min: -90 · max: 90

The latitude for this location. Required only if autoCalculateDuration or autoCalculateDistance is true.

Example: 39.791
longitude
​number · float · min: -180 · max: 180

The longitude for this location. Required only if autoCalculateDuration or autoCalculateDistance is true.

Example: -86.148003
x
​number | null

Cartesian x position on an arbitrary plane (warehouse floor, factory layout, PCB). Unbounded - deliberately NOT range-validated, unlike longitude. Use with coordinateSystem=cartesian; x is the exact counterpart of longitude (x = longitude, y = latitude), so a scenario can migrate between the two families without reordering. Supply either latitude/longitude or x/y, never both.

Example: 1250.5
y
​number | null

Cartesian y position on an arbitrary plane. Unbounded - deliberately NOT range-validated, unlike latitude. Use with coordinateSystem=cartesian; y is the exact counterpart of latitude. Supply either latitude/longitude or x/y, never both.

Example: 880.25
isDepot
​boolean

Whether this location serves only as a depot for vehicles (true) or if this location should be serviced.

Default: false
serviceDuration
​number · float · min: 0

How long service at this location takes, in the problem's time unit (minutes under timeSettings.timeUnit: clock; your integer unit otherwise). Charged at the stop; defaults to 0.

Example: 15.5
Default: 0
minArrivalTimeInt
​integer | null · min: 0

An integer value representing the earliest time this location can be serviced (time t=0 is the earliest start time). Leave empty if there are no time restrictions on arrival. Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and minArrivalTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 10
Default: null
minArrivalTimeStr
​string | null

A string value representing the earliest time this location can be serviced (time t=0 is the earliest start time). Leave empty if there are no time restrictions on arrival. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and minArrivalTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 12:00:00am
Default: null
minArrivalDayInt
​integer | null · min: 0

An integer value representing the earliest day this location can be serviced. Read only when timeSettings.timeUnit is clock, as a day offset added to the matching minArrivalTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on arrival.

Example: 1
Default: null
maxArrivalTimeInt
​integer | null · min: 0

An integer value representing the latest time this location can be serviced (time t=0 is the earliest start time). Leave empty if there are no time restrictions on arrival. Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and maxArrivalTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 100
Default: null
maxArrivalTimeStr
​string | null

A string value representing the latest time this location can be serviced (time t=0 is the earliest start time). Leave empty if there are no time restrictions on arrival. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and maxArrivalTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 11:59:59pm
Default: null
maxArrivalDayInt
​integer | null · min: 0

An integer value representing the latest day this location can be serviced. Read only when timeSettings.timeUnit is clock, as a day offset added to the matching maxArrivalTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on arrival.

Example: 1
Default: null
exactArrivalTimeInt
​integer | null · min: 0

An integer value representing the exact time this location must be serviced (time t=0 is the earliest start time). Leave empty if there are no time restrictions on arrival. This is a HARD PIN: the solver must arrive at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for this location, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the stop -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins). Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and exactArrivalTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 50
Default: null
exactArrivalTimeStr
​string | null

A string value representing the exact time this location must be serviced (time t=0 is the earliest start time). Leave empty if there are no time restrictions on arrival. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). This is a HARD PIN: the solver must arrive at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for this location, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the stop -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and exactArrivalTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 01:00:00am
Default: null
exactArrivalDayInt
​integer | null · min: 0

An integer value representing the exact day this location must be serviced. Read only when timeSettings.timeUnit is clock, as a day offset added to the matching exactArrivalTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on arrival. This is a HARD PIN: the solver must arrive at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for this location, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the stop -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins).

Example: 1
Default: null
color
​string

The color to use for this location in the output. Accepts a hex code ("#FF0000") or a CSS color name ("crimson").

Example: #FF0000
vehicleTypeIds
​array | null

The vehicleTypeIds that can service this location. These vehicleTypeIds must exist in the VehicleTypes passed in ProblemData for this problem. Leave empty if there are no restrictions on which vehicle types can service this location.

Example: {"0":"550e8400-e29b-41d4-a716-446655440000","1":"550e8400-e29b-41d4-a716-446655440001"}
fixedVehicleId
​string | null

Optional. Pin this location to a specific vehicle: the solve must use this vehicle to serve this stop. The vehicleId must exist in the Vehicles passed in ProblemData. If the pin cannot be satisfied - the vehicle does not exist, or its type is excluded by this location's vehicleTypeIds - the location is returned unassigned rather than served by a different vehicle. Leave null for no pin.

Example: 550e8400-e29b-41d4-a716-446655440000

Trip

tripId
​string · required

A unique identifier for this trip. It must be a whole number written as a string, for example "1", with no leading zeros. Any other value (a UUID, "trip-1", "1.5") makes the run fail, and a padded one ("007") comes back as "7".

Example: 1
fromLocationId
​string · required

The locationId for the origin location of this trip. This locationId must exist in the Locations passed in ProblemData for this problem.

Example: 550e8400-e29b-41d4-a716-446655440000
toLocationId
​string · required

The locationId for the destination location of this trip. This locationId must exist in the Locations passed in ProblemData for this problem.

Example: 550e8400-e29b-41d4-a716-446655440001
tripName
​string

A name for this trip (optional).

Example: Trip 1
vehicleTypeIds
​string[]

The vehicleTypeIds that can be used to service this trip. These vehicleTypeIds must exist in the VehicleTypes passed in ProblemData for this problem.

Example: {"0":"550e8400-e29b-41d4-a716-446655440000","1":"550e8400-e29b-41d4-a716-446655440001"}
fixedVehicleId
​string | null

Optional. Pin this trip to a specific vehicle: the solve must use this vehicle for both the pickup and the delivery. The vehicleId must exist in the Vehicles passed in ProblemData. If the pin cannot be satisfied - the vehicle does not exist, or its type is excluded by this trip's vehicleTypeIds - the trip is returned unassigned rather than served by a different vehicle. Leave null for no pin.

Example: 550e8400-e29b-41d4-a716-446655440000
minPickupTimeInt
​integer | null · min: 0

An integer value representing the earliest time this trip can be picked up (time t=0 is the earliest start time). Leave empty if there are no time restrictions on pickup. Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and minPickupTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 10
Default: null
minPickupTimeStr
​string | null

A string value representing the earliest time this trip can be picked up. Leave empty if there are no time restrictions on pickup. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and minPickupTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 12:00:00am
Default: null
minPickupDayInt
​integer | null · min: 0

An integer value representing the earliest day this trip can be picked up. Read only when timeSettings.timeUnit is clock, as a day offset added to the matching minPickupTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on pickup.

Example: 1
Default: null
maxPickupTimeInt
​integer | null · min: 0

An integer value representing the latest time this trip can be picked up (time t=0 is the earliest start time). Leave empty if there are no time restrictions on pickup. Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and maxPickupTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 100
Default: null
maxPickupTimeStr
​string | null

A string value representing the latest time this trip can be picked up. Leave empty if there are no time restrictions on pickup. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and maxPickupTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 11:59:59pm
Default: null
maxPickupDayInt
​integer | null · min: 0

An integer value representing the latest day this trip can be picked up. Read only when timeSettings.timeUnit is clock, as a day offset added to the matching maxPickupTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on pickup.

Example: 1
Default: null
exactPickupTimeInt
​integer | null · min: 0

An integer value representing the exact time this trip must be picked up (time t=0 is the earliest start time). Leave empty if there are no time restrictions on pickup. This is a HARD PIN: the solver must pick up at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for the same end, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the trip -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins). Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and exactPickupTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 15
Default: null
exactPickupTimeStr
​string | null

A string value representing the exact time this trip must be picked up. Leave empty if there are no time restrictions on pickup. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). This is a HARD PIN: the solver must pick up at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for the same end, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the trip -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and exactPickupTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 12:15:00am
Default: null
exactPickupDayInt
​integer | null · min: 0

An integer value representing the exact day this trip must be picked up. Leave empty if there are no restrictions on pickup. This is a HARD PIN: the solver must pick up at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for the same end, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the trip -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins). Read only when timeSettings.timeUnit is clock, as a day offset added to the matching exactPickupTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW.

Example: 1
Default: null
minDeliveryTimeInt
​integer | null · min: 0

An integer value representing the earliest time this trip can be delivered (time t=0 is the earliest start time). Leave empty if there are no time restrictions on delivery. Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and minDeliveryTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 20
Default: null
minDeliveryTimeStr
​string | null

A string value representing the earliest time this trip can be delivered. Leave empty if there are no time restrictions on delivery. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and minDeliveryTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 12:30:00am
Default: null
minDeliveryDayInt
​integer | null · min: 0

An integer value representing the earliest day this trip can be delivered. Read only when timeSettings.timeUnit is clock, as a day offset added to the matching minDeliveryTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on delivery.

Example: 1
Default: null
maxDeliveryTimeInt
​integer | null · min: 0

An integer value representing the latest time this trip can be delivered (time t=0 is the earliest start time). Leave empty if there are no time restrictions on delivery. Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and maxDeliveryTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 200
Default: null
maxDeliveryTimeStr
​string | null

A string value representing the latest time this trip can be delivered. Leave empty if there are no time restrictions on delivery. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and maxDeliveryTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 11:59:59pm
Default: null
maxDeliveryDayInt
​integer | null · min: 0

An integer value representing the latest day this trip can be delivered. Read only when timeSettings.timeUnit is clock, as a day offset added to the matching maxDeliveryTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on delivery.

Example: 1
Default: null
exactDeliveryTimeInt
​integer | null · min: 0

An integer value representing the exact time this trip must be delivered (time t=0 is the earliest start time). Leave empty if there are no time restrictions on delivery. This is a HARD PIN: the solver must deliver at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for the same end, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the trip -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); for an exact delivery, also if it is earlier than the trip's pickup (pinned or earliest possible) plus the pickup's service time plus the travel from pickup to delivery -- when both ends are pinned the error names both times and the travel time between them; or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins). Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and exactDeliveryTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 50
Default: null
exactDeliveryTimeStr
​string | null

A string value representing the exact time this trip must be delivered. Leave empty if there are no time restrictions on delivery. The time format should correspond to the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). This is a HARD PIN: the solver must deliver at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for the same end, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the trip -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); for an exact delivery, also if it is earlier than the trip's pickup (pinned or earliest possible) plus the pickup's service time plus the travel from pickup to delivery -- when both ends are pinned the error names both times and the travel time between them; or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and exactDeliveryTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 01:00:00am
Default: null
exactDeliveryDayInt
​integer | null · min: 0

An integer value representing the exact day this trip must be delivered. Leave empty if there are no restrictions on delivery. This is a HARD PIN: the solver must deliver at exactly this time, applied as an equal min/max window. Set EITHER the exact* fields OR the min*/max* window for the same end, never both. These are checked when the run starts, not when it is submitted: POST /problem accepts the request (202), and the run then ends with status: failed, an error saying what to fix and an error_code (EXACT_ARRIVAL_CONFLICT, EXACT_ARRIVAL_INFEASIBLE or EXACT_ARRIVAL_UNSERVABLE; see RunStatus.error_code), never by silently dropping the trip -- if the exact time and a window are both set; if no vehicle can reach it in time (the error names the earliest feasible time); for an exact delivery, also if it is earlier than the trip's pickup (pinned or earliest possible) plus the pickup's service time plus the travel from pickup to delivery -- when both ends are pinned the error names both times and the travel time between them; or if it is reachable on its own but unsatisfiable with the rest of the problem (fleet size, capacity, competing pins). Read only when timeSettings.timeUnit is clock, as a day offset added to the matching exactDeliveryTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW.

Example: 1
Default: null
demand
​integer · min: 0

The amount of vehicle capacity this trip consumes.

Example: 10
Default: 1
excessTravelTime
​number | null · min: 0

Maximum minutes the actual pickup->delivery transit may exceed the direct travel time for this trip (caps detours from pooling). Null = no cap.

Example: 20
pickupServiceDuration
​number · float · min: 0

Minutes to service the pickup (e.g. park and load) at the trip's origin. Charged at the pickup stop. Defaults to 0.

Example: 3
Default: 0
deliveryServiceDuration
​number · float · min: 0

Minutes to service the drop-off (e.g. park and unload) at the trip's destination. Charged at the delivery stop. Defaults to 0.

Example: 2
Default: 0

Vehicle

vehicleId
​string · required

A unique identifier for this vehicle. Any non-empty string that is unique among your vehicles works — it is not required to be a UUID and the format is not validated. It is echoed back on each route stop as vehicleId.

Example: 550e8400-e29b-41d4-a716-446655440000
vehicleTypeId
​string · required

The vehicleTypeId for this vehicle. This vehicleTypeId must exist in the VehicleTypes passed in ProblemData for this problem.

Example: 550e8400-e29b-41d4-a716-446655440000
startLocationId
​string · required

The locationId of the depot for this vehicle type. This locationId must exist in the Locations passed in ProblemData for this problem.

vehicleName
​string

A name for this vehicle (optional).

Example: Truck 1
fixedCost
​number · float · min: 0

The fixed cost for using this vehicle.

Example: 100
Default: 0
minStartTimeInt
​integer | null · min: 0

An integer value representing the earliest time this vehicle can depart from its depot to begin its route(s) (time t=0 is the earliest start time). Leave empty if there are no restrictions on when the vehicle can start. Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and minStartTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 0
Default: 0
minStartTimeStr
​string | null

A string value representing the earliest time this vehicle can depart from its depot to begin its route(s). Leave empty if there are no restrictions on when the vehicle can start. The time format should match the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and minStartTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 12:00:00am
Default: null
minStartDayInt
​integer | null · min: 0

An integer value representing the earliest day this vehicle can depart from its depot to begin its route(s). Read only when timeSettings.timeUnit is clock, as a day offset added to the matching minStartTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on when the vehicle can start.

Example: 0
Default: 0
maxEndTimeInt
​integer | null · min: 0

An integer value representing the latest time this vehicle must return to its depot after completing its route(s) (time t=0 is the earliest start time). Leave empty if there are no restrictions on when the vehicle must finish. Read only when timeSettings.timeUnit is integer (the default, including when timeSettings is omitted). Under clock it is ignored and maxEndTimeStr is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 100
Default: null
maxEndTimeStr
​string | null

A string value representing the latest time this vehicle must return to its depot after completing its route(s). Leave empty if there are no restrictions on when the vehicle must finish. The time format should match the timeFormat field in timeSettings (at the top level of the problem, not inside problemData). Read only when timeSettings.timeUnit is clock. The default is integer, including when timeSettings is omitted, and then this field is ignored and maxEndTimeInt is read instead; a request that sets only this form there is refused with 400 IGNORED_TIME_WINDOW rather than solved without it.

Example: 2024-01-01 11:59:59pm
Default: null
maxEndDayInt
​integer | null · min: 0

An integer value representing the latest day this vehicle must return to its depot after completing its route(s). Read only when timeSettings.timeUnit is clock, as a day offset added to the matching maxEndTimeStr time; ignored under integer or without that time, and a request that sets it where it would be ignored is refused with 400 IGNORED_TIME_WINDOW. Leave empty if there are no restrictions on when the vehicle must finish.

Example: 1
Default: 0
endLocationId
​string

The locationId of the depot for this vehicle type. If null, then the startLocationId will be used as the end location. This locationId must exist in the Locations passed in ProblemData for this problem.

Default: null
color
​string

The color to use for this vehicle in the output. Accepts a hex code ("#FF0000") or a CSS color name ("crimson").

Example: #FF0000
Default: #FFFFFF

VehicleType

vehicleTypeId
​string · required

A unique identifier for this vehicle type.

Example: 550e8400-e29b-41d4-a716-446655440000
vehicleType
​string

A name for this vehicle type.

Example: Truck
capacity
​integer · min: 0

The maximum capacity of this vehicle type, in units of demand. Leave null if this vehicle type has no capacity limit.

Example: 10
Default: null
allowResupply
​boolean

Whether this vehicle type can be resupplied during an optimization run.

Default: false

TravelCost

This schema defines a travel cost between two locations. The travel cost can be used to specify the duration, distance, and cost of travel between two locations. An entry is required in this table for each pair of locations in the locations table.
fromLocationId
​string · required

The locationId of the origin location for this travel cost. This locationId must exist in the Locations passed in ProblemData for this problem.

Example: 550e8400-e29b-41d4-a716-446655440000
toLocationId
​string · required

The locationId of the destination location for this travel cost. This locationId must exist in the Locations passed in ProblemData for this problem.

Example: 550e8400-e29b-41d4-a716-446655440001
vehicleTypeId
​string

The vehicleTypeId for this travel cost. This vehicleTypeId must exist in the VehicleTypes passed in ProblemData for this problem. If null, then the travel cost will apply to all vehicle types.

Example: 550e8400-e29b-41d4-a716-446655440000
vehicleType
​string

The name of the vehicle type for this travel cost. This field is optional and is provided for convenience only.

Example: Truck
duration
​number | null · float · min: 0

The travel duration between these two locations, in the problem's time unit: minutes when timeSettings.timeUnit is clock (a value of 30 arrives half an hour later), and your own integer time unit when it is integer. The solver uses the number as-is and never rescales it, so a duration supplied in seconds under clock time makes every leg sixty times too long. POST /cost_matrix returns durations in minutes. If null, the travel duration will be calculated automatically based on the latitude and longitude of the locations.

Example: 15
Default: null
distance
​number | null · float · min: 0

The travel distance between these two locations. Any unit can be used, as long as it is the same for every entry: the solver never converts it, and every distance in the results (travelDistanceFromPreviousStop, totalDistanceTraveled) is reported in this same unit — there is no distance-unit setting anywhere in the problem. A matrix from POST /cost_matrix is in statute miles for geographic (latitude/longitude) coordinates and in the coordinates' own unit for cartesian (x/y) ones. If null, the travel distance will be calculated automatically based on the latitude and longitude of the locations.

Example: 10
Default: null
cost
​number | null · float · min: 0

The cost of travel between these two locations.

Example: 1.5
Default: null

RequestAccepted

The body of the `202 Accepted` response to `POST /problem`. The run is queued and the solver runs in the background; poll for its status and then fetch results separately.
success
​boolean
Example: true
Default: true
​object

UsageSummary

This UTC month's optimization-task usage for the calling account. Present on every `202` from `POST /problem` for plans that include a monthly allowance, and returned by `GET /usage`. Absent from the `202` for plans that do not meter tasks (the web tiers).
tasksUsed
​integer

Tasks counted against this month so far: stops or trips served by runs that reached succeeded, including any run that just succeeded. Not the run being submitted, whose tasks are only known when it succeeds.

Example: 9840
tasksIncluded
​integer | null

Tasks the plan includes per UTC month. null for a plan that does not meter tasks.

Example: 10000
period
​string

The UTC calendar month these numbers are for, as YYYY-MM.

Example: 2026-09
resetsAt
​string · date-time

When the allowance resets: the first instant of the next UTC month.

Example: 2026-10-01T00:00:00Z
plan
​string

The plan tier the allowance comes from (as listed by GET /plans).

Example: developer

ProblemStatus

status
​string · enum · required

The solver's completion marker carried inside a results payload (ProblemResult.problemStatus). It is always completed: a results payload exists only for a run that finished, and the current solver writes no other value here (the other names in this enum are kept so old stored results still validate). This is not the value you poll for — the run lifecycle status returned by GET /problem/{problemId} and POST /run_status is queued/running/succeeded/failed/cancelled (see RunStatus); succeeded there and completed here describe the same finished run.

Enum values:
failed
completed
running
queued
Example: completed

RunStatus

The run lifecycle status returned by `GET /problem/{problemId}` and `POST /run_status`. This is what a poller branches on. It is deliberately small — it never carries the routes; fetch those from `POST /run_results_by_run_id` once the run has succeeded.
status
​string · enum · required

A run starts queued, becomes running, and reaches exactly one terminal state: succeeded, failed, or cancelled. Poll until the status is terminal — there is no completed value here.

Enum values:
queued
running
succeeded
failed
cancelled
Example: succeeded
run_id
​string

The run this status is for.

progress
​number | null

Always null. The key is kept so existing clients keep parsing; the solver does not report intermediate progress, and a progress bar cannot be built from it. Poll status instead.

error
​string | null

A human-readable reason, present only when status is failed. To act on a failure in code, branch on error_code; this wording may change.

error_code
​string | null

Why the run failed, as a stable code: present when status is failed, and null otherwise. Branch on this, not on error -- the sentence is written to be read and its wording may improve; the code will not change. These conditions are found while the run is being solved, after POST /problem has already answered 202, so they never arrive as an HTTP error: poll for them here. One of: NO_FEASIBLE_SOLUTION (no plan satisfies the problem as specified -- conflicting time windows, capacities, vehicle shifts, or missing travel costs between stops that must reach each other), SOLVE_TIMEOUT (no solution was found within the maximum solve time), INVERTED_TIME_WINDOW (a location, trip or vehicle has a time window that ends before it starts), INVALID_TRAVEL_COSTS (specific pickup-delivery pairs have a missing or null travel cost), EXACT_ARRIVAL_CONFLICT (a stop or trip end sets an exact time AND a min/max window), EXACT_ARRIVAL_INFEASIBLE (an exact time no vehicle can make), EXACT_ARRIVAL_UNSERVABLE (exact times each reachable alone but unsatisfiable together), or INTERNAL_SERVER_ERROR -- the failure was ours, not your problem's; error still says what happened, and a code is always present so the absence of one never has to be read as meaning anything. A run that failed before this field existed has error_code: null.

Example: NO_FEASIBLE_SOLUTION
run_datetime_unix
​number | null

When the run was submitted, as a Unix timestamp.

ProblemResult

This schema defines the results of an optimization problem. The actual fields returned will depend on the type of optimization problem submitted.
problemId
​string · required

The unique identifier for this optimization run.

Example: 550e8400-e29b-41d4-a716-446655440000
​ProblemStatus

The status of the optimization problem identified by the problemId parameter.

​ProblemMetaData

Metadata about the optimization problem

​array | null

A compact list of the stops visited, in order. Not populated by the solver: expect null. Read the plan from routeStopsFull instead, which is the populated, self-contained version. routeStops is retained for backward compatibility and may be absent or null even on a successful run.

​RouteStopFull[]

The optimized plan: every stop each vehicle visits, in order, with the full location and vehicle details attached. This is the field to read for the route. A run can succeed while assigning fewer than all of your stops (an over-constrained problem, or travel costs with null entries), so always check that every stop you submitted appears here (a depot appears only as a route's start and end), and treat succeeded with fewer stops served than submitted — or with all-zero distances — as an incomplete solve rather than a clean one. Unserved stops appear under unassignedLocationsFull (vehicle-routing) or unassignedTripsFull (pickup-delivery).

​array | null

Not populated by the solver: expect null, even on a run that left a stop unassigned. A null here says nothing about whether stops were dropped. Read unassignedLocationsFull, which is the list the solver fills. Retained for backward compatibility.

​UnassignedLocationFull[]

A list of locations that were not visited by any vehicle during the optimization run, along with additional details about the location.

​array | null

Not populated by the solver: expect null, even on a run that left a trip unassigned. A null here says nothing about whether trips were dropped. Read unassignedTripsFull, which is the list the solver fills. Retained for backward compatibility.

​UnassignedTripFull[]

A list of trips that were not serviced by any vehicle during the optimization run, along with additional details about the trip.

paths
​

Per-vehicle route geometry. Can be null. Each element's path field is a JSON-encoded string (not a nested object) — JSON.parse it before use.

Default: {}
​VehicleUsage[]

A list of vehicle usage summaries for the optimization run.

Default: []

VehicleUsage

Summarizes whether a vehicle was used during the optimization run and the fixed cost it incurred.
vehicleId
​string · required

The unique identifier of the vehicle.

Example: 550e8400-e29b-41d4-a716-446655440000
used
​boolean · required

Whether the vehicle was used (assigned at least one stop) during the optimization run.

Example: true
fixedCostIncurred
​number · float · required

The fixed cost incurred by this vehicle. This equals the vehicle's fixed cost if the vehicle was used, otherwise 0.

Example: 100

VehiclesAssigned

Summary of vehicle assignment counts for an optimization run.
assigned
​integer

The number of vehicles assigned at least one stop.

Example: 8
available
​integer

The number of vehicles supplied in the problem (the fleet size), whether or not they were used. A vehicle that restocks and makes several trips counts once.

Example: 10

LocationsAssigned

How many locations were served. `assigned == total` means nothing was left unassigned. Neither number counts depots, so neither is the number of locations you submitted.
assigned
​integer

The number of distinct locations visited as a stop on a vehicle's route. A route's start and end (the depot) are not counted.

Example: 45
total
​integer

assigned plus everything left unassigned: the unassigned locations of a vehicle-routing problem, or the unassigned trips of a pickup-delivery problem. Depots are not counted, so this is smaller than the number of locations you submitted: a depot and two stops give total: 2. It is null, not 0, only when the problem had no stops to visit (every location a depot), which POST /problem now refuses with 400 NO_STOPS_TO_VISIT; you will see it only on runs submitted before that check.

Example: 50

AssignmentSummary

High-level counts of vehicles and locations that were assigned during the optimization run.
​VehiclesAssigned

Summary of vehicle assignment counts for an optimization run.

​LocationsAssigned

How many locations were served. assigned == total means nothing was left unassigned. Neither number counts depots, so neither is the number of locations you submitted.

RouteSummary

Aggregate travel metrics across all vehicle routes in the optimization run.
totalDistanceTraveled
​number · float

Total distance traveled across all vehicle routes, in the same unit as the distance values in the submitted travelCosts (there is no distance-unit setting; the solver reports what it was given). When the matrix came from POST /cost_matrix that is statute miles for geographic coordinates and the coordinates' own unit for cartesian.

Example: 5555
totalMinutesTraveled
​number · float

Total travel time in minutes across all vehicle routes.

Example: 6232
totalTravelCost
​number · float

Total travel cost across all vehicle routes.

Example: 12023

CostSummary

Breakdown of fixed and variable costs for the optimization run.
fixedCost
​number · float

Sum of fixed costs for all vehicles used in the solution.

Example: 500
travelCost
​number · float

Sum of distance- or time-based travel costs across all routes.

Example: 12023

TimingSummary

Timing information for the optimization run.
solveTime
​number · float

Wall-clock time in seconds taken by the solver to produce a solution.

Example: 3.47

ResultSummary

A high-level summary of the optimization result, covering assignments, route metrics, costs, and solve timing.
​AssignmentSummary

High-level counts of vehicles and locations that were assigned during the optimization run.

​RouteSummary

Aggregate travel metrics across all vehicle routes in the optimization run.

​CostSummary

Breakdown of fixed and variable costs for the optimization run.

​TimingSummary

Timing information for the optimization run.

ProblemResponse

The complete response for a solved optimization problem, combining the full result data with a high-level summary.
​ProblemResult · required

The full optimization result including routes, stops, and unassigned locations.

​ResultSummary

A high-level summary of key metrics from the optimization run.

CostMatrixResponse

The response schema for a cost matrix calculation request. This includes the travel costs and any errors encountered during the calculation.
​object[]

A list of travel costs between pairs of locations. Each travel cost represents the duration, distance, and cost of travel between two locations.

​object[]

A list of errors encountered during the cost matrix calculation. Each error represents a problem with calculating the travel cost between two locations.

TravelCostResponses

​object[]

This schema defines the response for travel costs between pairs of locations.

fromLocationId
​string · required

The locationId of the origin location for this travel cost

Example: 550e8400-e29b-41d4-a716-446655440000
toLocationId
​string · required

The locationId of the destination location for this travel cost.

Example: 550e8400-e29b-41d4-a716-446655440001
fromLocationName
​string

The name of the origin location for this travel cost.

Example: Chicago
toLocationName
​string

The name of the destination location for this travel cost.

Example: Indianapolis
vehicleTypeId
​string

The vehicleTypeId for this travel cost. If null, then the travel cost will apply to all vehicle types.

Example: 550e8400-e29b-41d4-a716-446655440000
vehicleType
​string

The name of the vehicle type for this travel cost. If null, then the travel cost will apply to all vehicle types.

Example: Truck
duration
​number | null · float

The travel duration between these two locations, in minutes (road-network durations are converted from seconds; the other methods derive minutes from the distance at averageSpeed, times roadCircuityFactor). Null when the pair could not be computed — see status.

distance
​number | null · float

The travel distance between these two locations: statute miles for geographic (latitude/longitude) coordinates, whatever unit the coordinates are in for cartesian (x/y) ones — no unit setting exists, and the solver later reports distances in this same unit. Null when the pair could not be computed — see status.

cost
​number | null · float

The cost of travel between these two locations.

status
​string · enum

Whether this pair was computed. s: computed (this is also what the zero-cost self-pairs carry). w: the road network could not serve it — the two points are unreachable from each other by car, or the routing service was unavailable — and duration/distance are null with errorMessage saying which; the pair is not filled in by another method. e: a location is missing coordinates, so nothing could be computed for it. A null off-diagonal value in a submitted travelCosts matrix means "unreachable" to the solver; it is never treated as zero.

Enum values:
s
e
w
Example: s
Default: s
errorMessage
​string | null

If an error was encountered during the calculation of this travel cost, this field will contain a human-readable message describing the error. If no error was encountered, this field will be null.

Example: null
Default: null

TravelCostErrors

​object[]

This schema defines an error encountered during the cost matrix calculation. Each error represents a problem with calculating the travel cost between two locations.

errorMessage
​string · enum · required

A human-readable message describing the error encountered during the cost matrix calculation.

Enum values:
Missing latitude or longitude for at least one location.
Invalid vehicle type specified for at least one entry.
Routing service unavailable.
Unable to calculate travel cost between at least one pair of locations.
Unknown error.
errorDescription
​string | null

A more detailed description of the error encountered during the cost matrix calculation.

Example: One or both locations are missing latitude or longitude.

RouteStop

A route stop represents a location that was visited by a vehicle during the optimization run.
stopId
​string · required

A unique identifier for this stop, represented as a UUID.

Example: 550e8400-e29b-41d4-a716-446655440000
locationId
​string · required

The locationId of the stop.

Example: 550e8400-e29b-41d4-a716-446655440000
vehicleId
​string · required

The vehicleId of the vehicle that visited this stop.

Example: 660e8400-e29b-41d4-a716-446655440000
serviceDuration
​number · float · min: 0 · required

The amount of time the vehicle spent servicing this stop, in the problem's time unit (minutes under timeSettings.timeUnit: clock).

Example: 15.5
Default: 0
stopNumber
​integer · required

The position of this stop in its vehicle's route, 0-based: index 0 is the vehicle's departure from its start depot (route_start), the first customer stop is 1, and the final return to the depot (route_end) is the last index. Consecutive within a vehicle's route; use it directly as an array index, never stopNumber - 1.

Example: 0
capacityServed
​integer · required

The amount of capacity served at this stop.

Example: 10
tripId
​string

The tripId of the trip that visited this stop, if applicable for this problem type.

Example: 1
arrivalTimeInt
​integer | null

The time at which the vehicle arrived at this stop, in integer time units from the start of the run. Rounded to the nearest whole time unit.

Example: 10
arrivalTimeStr
​string | null

The time at which the vehicle arrived at this stop, in the clock time format specified in the timeSettings.timeFormat field.

Example: 2024-01-01 12:00:00am
Default: null
departureTimeInt
​integer | null

The time at which the vehicle departed from this stop, in integer time units. This is the number of time units from the start of the optimization run.

Example: 12
Default: null
departureTimeStr
​string | null

The time at which the vehicle departed from this stop, in the clock time format specified in the timeSettings.timeFormat field.

Example: 2024-01-01 12:15:00am
Default: null
travelCostFromPreviousStop
​number · float

The cost of the leg from the previous stop to this stop (0 on route_start), in the same units as travelCostTo. Sums to routeSummary.totalTravelCost. Absent on results saved before it existed: for those, shift travelCostTo one stop later within each route.

Example: 5
waitDurationStart
​number · float · min: 0

The amount of time the vehicle waited at this stop before servicing the location, in the problem's time unit (minutes under timeSettings.timeUnit: clock).

Example: 2.5
Default: 0
waitDurationEnd
​number · float · min: 0

The amount of time the vehicle waited at this stop after servicing the location, in the problem's time unit (minutes under timeSettings.timeUnit: clock).

Example: 3
Default: 0
stopType
​string · enum

The role this stop plays on the route: location_visit (a plain vehicle-routing visit), pickup and delivery (the two ends of a pickup-delivery trip), route_start and route_end (the depot legs that open and close a vehicle's route), break_start and break_end (a scheduled driver break), restock (a return to a depot to reload mid-route), and drop (a forced-unassigned stop the solver could not serve).

Enum values:
location_visit
pickup
delivery
route_start
route_end
break_start
break_end
restock
Example: location_visit
action
​string

The action taken at this stop. This is a human-readable description of the action taken at this stop, such as "Pickup 5 passengers at Chicago for Trip 1" or "Deliver 10 packages to New York".

Example: Pickup 5 passengers at Chicago for Trip 1
travelDurationFromPreviousStop
​number · float

The travel duration from the previous stop to this stop, in the problem's time unit: minutes when timeSettings.timeUnit is clock, your integer time unit otherwise.

Example: 10
travelDistanceFromPreviousStop
​number · float

The travel distance from the previous stop to this stop, in the same unit as the distance values in the submitted travelCosts (there is no distance-unit setting; the solver reports what it was given). When the matrix came from POST /cost_matrix that is statute miles for geographic coordinates and the coordinates' own unit for cartesian.

Example: 5
travelCostTo
​number · float · deprecated

Deprecated: read travelCostFromPreviousStop. This holds the cost of the leg from this stop to the NEXT one (0 on route_end), not the cost of reaching this stop, despite its name. It keeps that meaning so that results saved before travelCostFromPreviousStop existed still read the same.

Example: 5

RouteStopFull

A route stop represents a location that was visited by a vehicle during the optimization run, along with additional details about the location and vehicle.
stopId
​string · required

A unique identifier for this stop, represented as a UUID.

Example: 550e8400-e29b-41d4-a716-446655440000
locationId
​string · required

The locationId of the stop.

Example: 550e8400-e29b-41d4-a716-446655440000
vehicleId
​string · required

The vehicleId of the vehicle that visited this stop.

Example: 660e8400-e29b-41d4-a716-446655440000
serviceDuration
​number · float · min: 0 · required

The amount of time the vehicle spent servicing this stop, in the problem's time unit (minutes under timeSettings.timeUnit: clock).

Example: 15.5
Default: 0
stopNumber
​integer · required

The position of this stop in its vehicle's route, 0-based: index 0 is the vehicle's departure from its start depot (route_start), the first customer stop is 1, and the final return to the depot (route_end) is the last index. Consecutive within a vehicle's route; use it directly as an array index, never stopNumber - 1.

Example: 0
capacityServed
​integer · required

The amount of capacity served at this stop.

Example: 10
locationName
​string · required

The name of the location for this stop.

Example: Chicago
color
​string · required

The color associated with this stop -- the serving vehicle's color, echoed back as supplied (hex code or CSS color name).

Example: #FF0000
tripId
​string

The tripId of the trip that visited this stop, if applicable for this problem type.

Example: 1
arrivalTimeInt
​integer | null

The time at which the vehicle arrived at this stop, in integer time units from the start of the run. Rounded to the nearest whole time unit.

Example: 10
arrivalTimeStr
​string | null

The time at which the vehicle arrived at this stop, in the clock time format specified in the timeSettings.timeFormat field.

Example: 2024-01-01 12:00:00am
Default: null
departureTimeInt
​integer | null

The time at which the vehicle departed from this stop, in integer time units. This is the number of time units from the start of the optimization run.

Example: 12
Default: null
departureTimeStr
​string | null

The time at which the vehicle departed from this stop, in the clock time format specified in the timeSettings.timeFormat field.

Example: 2024-01-01 12:15:00am
Default: null
travelCostFromPreviousStop
​number · float

The cost of the leg from the previous stop to this stop (0 on route_start), in the same units as travelCostTo. Sums to routeSummary.totalTravelCost. Absent on results saved before it existed: for those, shift travelCostTo one stop later within each route.

Example: 5
waitDurationStart
​number · float · min: 0

The amount of time the vehicle waited at this stop before servicing the location, in the problem's time unit (minutes under timeSettings.timeUnit: clock).

Example: 2.5
Default: 0
waitDurationEnd
​number · float · min: 0

The amount of time the vehicle waited at this stop after servicing the location, in the problem's time unit (minutes under timeSettings.timeUnit: clock).

Example: 3
Default: 0
stopType
​string · enum

The role this stop plays on the route: location_visit (a plain vehicle-routing visit), pickup and delivery (the two ends of a pickup-delivery trip), route_start and route_end (the depot legs that open and close a vehicle's route), break_start and break_end (a scheduled driver break), restock (a return to a depot to reload mid-route), and drop (a forced-unassigned stop the solver could not serve).

Enum values:
location_visit
pickup
delivery
route_start
route_end
break_start
break_end
restock
Example: location_visit
action
​string

The action taken at this stop. This is a human-readable description of the action taken at this stop, such as "Pickup 5 passengers at Chicago for Trip 1" or "Deliver 10 packages to New York".

Example: Pickup 5 passengers at Chicago for Trip 1
travelDurationFromPreviousStop
​number · float

The travel duration from the previous stop to this stop, in the problem's time unit: minutes when timeSettings.timeUnit is clock, your integer time unit otherwise.

Example: 10
travelDistanceFromPreviousStop
​number · float

The travel distance from the previous stop to this stop, in the same unit as the distance values in the submitted travelCosts (there is no distance-unit setting; the solver reports what it was given). When the matrix came from POST /cost_matrix that is statute miles for geographic coordinates and the coordinates' own unit for cartesian.

Example: 5
vehicleName
​string | null

The name of the vehicle serving this stop, when the user provided one. Denormalized from the submitted vehicle (like locationName) so a route sheet is readable without re-joining the input; null when the vehicle is unnamed.

Example: Truck 1
fixedVehicleId
​string | null

The vehicleId this stop was pinned to via the input's fixedVehicleId, or null if it was not pinned. Lets a client tell 'this vehicle was chosen by the solver' from 'this vehicle was required', without re-joining against the request.

Example: 550e8400-e29b-41d4-a716-446655440000
travelCostTo
​number · float · deprecated

Deprecated: read travelCostFromPreviousStop. This holds the cost of the leg from this stop to the NEXT one (0 on route_end), not the cost of reaching this stop, despite its name. It keeps that meaning so that results saved before travelCostFromPreviousStop existed still read the same.

Example: 5

UnassignedLocation

An unassigned object represents a location that was not visited by any vehicle during the optimization run.
locationId
​string · required

The locationId of the unassigned location.

Example: 550e8400-e29b-41d4-a716-446655440000
demandDropped
​integer · min: 0 · required

The amount of demand that was not served at this location.

Example: 10

UnassignedLocationFull

An unassigned object represents a location that was not visited by any vehicle during the optimization run, along with additional details about the location.
locationId
​string · required

The locationId of the unassigned location.

Example: 550e8400-e29b-41d4-a716-446655440000
demandDropped
​integer · min: 0 · required

The amount of demand that was not served at this location.

Example: 10
locationName
​string · required

The name of the unassigned location.

Example: Chicago
latitude
​number · float

The latitude of the unassigned location.

Example: 39.791
longitude
​number · float

The longitude of the unassigned location.

Example: -89.398
isDepot
​boolean

Whether this unassigned location serves only as a depot (true) or if this location should be serviced (false).

Default: false

UnassignedTrip

An unassigned trip represents a trip that was not serviced by any vehicle during the optimization run.
tripId
​string · required

The tripId of the unassigned trip.

Example: 1
demandDropped
​integer · min: 0 · required

The amount of demand that was not able to be served by any vehicle for this trip.

Example: 10
capacityServed
​integer · min: 0 · required

The amount of capacity that was served for this dropped trip. This will typically be 0, but in some cases (e.g. partial deliveries) it may be greater than 0.

Example: 0

UnassignedTripFull

An unassigned trip represents a trip that was not serviced by any vehicle during the optimization run, along with additional details about the trip.
tripId
​string · required

The tripId of the unassigned trip.

Example: 1
demandDropped
​integer · min: 0 · required

The amount of demand that was not able to be served by any vehicle for this trip.

Example: 10
capacityServed
​integer · min: 0 · required

The amount of capacity that was served for this dropped trip. This will typically be 0, but in some cases (e.g. partial deliveries) it may be greater than 0.

Example: 0
tripName
​string · required

The name of the unassigned trip.

Example: Trip 1
fromLocationName
​string · required

The name of the origin location for this trip.

Example: Chicago
toLocationName
​string · required

The name of the destination location for this trip.

Example: Indianapolis
fromLocationId
​string · required

The locationId of the origin location for this trip.

Example: 550e8400-e29b-41d4-a716-446655440000
toLocationId
​string · required

The locationId of the destination location for this trip.

Example: 550e8400-e29b-41d4-a716-446655440001
fromLatitude
​number · float · required

The latitude of the origin location for this trip.

Example: 39.791
fromLongitude
​number · float · required

The longitude of the origin location for this trip.

Example: -89.398
toLatitude
​number · float · required

The latitude of the destination location for this trip.

Example: 39.768
toLongitude
​number · float · required

The longitude of the destination location for this trip.

Example: -86.158

ProblemMetaData

Metadata about the optimization problem, such as the problem type and the time settings used for the optimization run.
problemType
​string · enum · required

The type of optimization problem that was run.

Enum values:
pickup-delivery
vehicle-routing
Example: vehicle-routing
submissionTimestamp
​integer · int64 · required

The date and time when the optimization problem was submitted, in unix timestamp in seconds

Example: 1704067200
queueTime
​number · float · required

The time spent in the queue before the optimization run started, in seconds.

Example: 5
optimizationTime
​number · float

The time taken to run the optimization, in seconds.

Example: 120

CostMatrixRequest

This schema defines the request body for calculating a cost matrix. It includes the locations and travel costs to use for calculating the cost matrix.
​Location[] · required

The locations to use for calculating the cost matrix.

costSettings
​CostSettings · required

The settings to use for calculating travel costs between locations. This includes the cost metric (duration or distance), cost multiplier, cost adder, and methods for calculating distances and durations.

​TravelCost[]

The travel costs to use for calculating the cost matrix. If not provided, the cost matrix will be calculated automatically based on the latitude and longitude of the locations. A partial cost matrix can be provided to avoid recalculating travel durations and distances between locations.

coordinateSystem
​CoordinateSystem · enum

Which coordinate family this problem's locations use. geographic (the default, and what every existing payload means) uses latitude/longitude on the Earth. cartesian uses unbounded x/y on an arbitrary plane, for scenarios with positions but no addresses. It describes the DATA, not the costing, so it is set once per request rather than per cost setting - and it decides which distance/duration methods are valid.

Enum values:
geographic
cartesian
Default: geographic

CostSettings

This schema defines the settings to use for calculating travel costs between locations. It includes the cost metric (duration or distance), cost multiplier, cost adder, and methods for calculating distances and durations.
costMetric
​string · enum · required

Required — there is no default; a costSettings without a costMetric is rejected with 422. The metric used as the base for the travel cost, before any multiplier or adder. duration bases cost on travel time, distance on travel distance, and custom uses the cost values you supply directly in travelCosts.

Enum values:
duration
distance
custom
Example: duration
​CostMultiplier

The cost multiplier to apply to the base cost metric (duration or distance) to calculate the final travel cost.

​CostAdder

The cost adder to apply to the base cost metric (duration or distance) to calculate the final travel cost.

autoCalculateDuration
​boolean

Whether POST /cost_matrix should compute travel durations from each location's coordinates. When omitted, it defaults to true if you supply no travelCosts, and to false if you do — so your own matrix is never silently recomputed. An explicit null is rejected (send true/false or omit it). The road network (driving) is used when you name driving as the durationMethod, or when an omitted durationMethod inherits driving from a driving distanceMethod because you explicitly sent autoCalculateDuration: true; the default method (geo) never calls the road network.

autoCalculateDistance
​boolean

Whether POST /cost_matrix should compute travel distances from each location's coordinates. When omitted, it defaults to true if you supply no travelCosts, and to false if you do — so your own matrix is never silently recomputed. An explicit null is rejected (send true/false or omit it). The road network (driving) is used only when you name driving as the distanceMethod; the default method (geo) never calls the road network.

distanceMethod
​string · enum

The method for calculating distances. geo (the default) is the ellipsoidal geodesic distance on the WGS84 ellipsoid, reported in statute miles; driving uses OpenRouteService for real road distances. euclidean is the planar straight-line distance and manhattan the right-angle (grid) distance. euclidean is accepted only for cartesian (x/y) coordinates: on geographic coordinates it would treat degrees as planar units, so the request is refused with 400 INVALID_METHOD_FOR_COORDINATE_SYSTEM — the straight-line method on the globe is geo. manhattan works for both: on the plane it is |dx| + |dy| in the coordinates' unit; on geographic coordinates it is the sum of the two geodesic legs (the north–south and east–west separations), in statute miles. driving is likewise geographic-only.

Enum values:
driving
geo
manhattan
euclidean
Default: geo
durationMethod
​string · enum

The method to use for calculating durations between locations. geo derives a duration from the ellipsoidal geodesic (WGS84) distance; driving uses OpenRouteService for real road durations; manhattan/euclidean derive it from the planar (cartesian) or, for geographic coordinates, geodesic distance. There is no fixed default — if you omit durationMethod it is inherited from distanceMethod so the two stay consistent (do not rely on a geo default: an SDK that fills one would break a cartesian request). An omitted durationMethod inherits driving from distanceMethod only when you explicitly send autoCalculateDuration: true; otherwise it falls back to geo.

Enum values:
driving
geo
manhattan
euclidean
averageSpeed
​number | null

Average travel speed used to turn a computed DISTANCE into a DURATION for the non-driving methods (geo, manhattan, euclidean), in distance units per hour. Ignored when durationMethod is "driving", where the road network supplies real durations.

This exists because a straight-line distance is not a time. Before it, geo durations were the distance number itself, which meant every vehicle travelled at exactly 60 mph between adjacent stops. The default of 30 suits urban and suburban work; raise it for long inter-city legs, lower it for dense city centres or mountain roads.

Example: 30
Default: 30
roadCircuityFactor
​number | null

Multiplier applied to a straight-line distance when deriving DURATION, to account for roads not running as the crow flies. Affects duration only - the reported distance stays the true geodesic value the method name promises. 1.25 is a common urban rule of thumb; use 1.0 to model travel that really is direct.

Example: 1.25
Default: 1.25

CostMultiplier

This schema defines a cost multiplier to apply to the base cost metric (duration or distance) to calculate the final travel cost.
vehicleTypeDependence
​boolean · required

Whether the cost multiplier should depend on the vehicle type. If true, then the cost multiplier will be applied separately for each vehicle type. If false, then the cost multiplier will be applied based on the first vehicle type in the VehicleTypes list.

Default: false
baseMultiplier
​number · float

The multiplier to apply to the base cost metric (duration or distance) to calculate the final travel cost.

Example: 1.5
Default: 1
​object[]

CostAdder

This schema defines a cost adder to apply to the base cost metric (duration or distance) to calculate the final travel cost.
vehicleTypeDependence
​boolean · required

Whether the cost adder should depend on the vehicle type. If true, then the cost adder will be applied separately for each vehicle type. If false, then the cost adder will be applied based on the first vehicle type in the VehicleTypes list.

Default: false
baseAdder
​number · float

The adder to apply to the base cost metric (duration or distance) to calculate the final travel cost.

Example: 10
Default: 0
​object[]

TableLimit

maxRows
​integer · required

Maximum number of rows allowed for this table

PlanLimits

​TableLimit · required

Limits for locations table

​TableLimit · required

Limits for trips table

​TableLimit · required

Limits for vehicles table

​TableLimit · required

Limits for vehicle types table

saved_scenarios
​integer | null

Maximum saved scenarios (null for unlimited)

Default: null
run_history_days
​integer | null

Days of run history retention (null for unlimited)

Default: null
max_concurrent_solves
​integer

Maximum number of solves (queued + running) the user may have in flight at once

Default: 2
monthly_included_tasks
​integer | null

Optimization tasks included per month on this plan (null for tiers that do not meter tasks, i.e. the web tiers). A billable task is one stop or trip served by a SUCCEEDED solve; unassigned stops, and failed or cancelled runs, cost nothing.

PublicPlan

A public, subscribable plan tier returned by GET /plans. The single source of truth for pricing/entitlement limits so the front end never restates them.
tier
​string · required

Stable internal tier key (never changes), e.g. "free" or "professional".

Example: professional
planName
​string | null

Customer-facing display name as configured in the Clerk dashboard, e.g. "Professional".

Example: Professional
​PlanLimits

Resolved per-tier limits.

​object

Capability flags keyed by feature; absent keys default to allowed.

ExampleScenarioCard

A published example scenario as a lightweight card for the gallery. Load the full scenario with `GET /example_scenario/{slug}`, using `slug`.
instance_id
​string · required

Unique id of the stored scenario behind this example. To load the example, use slug with GET /example_scenario/{slug}.

slug
​string · required

Stable, URL-safe unique key ([a-z0-9-]).

scenario_name
​string

Full display name of the scenario.

model_type
​string

Model type, e.g. "pickup-delivery" or "vehicle-routing".

title
​string

Short card heading (may be empty).

brief_description
​string

1-3 sentence blurb shown under the title.

banner_image
​string

Card image URL; empty when none is set.

constraints
​string[]

Key constraints shown as bullets.

tags
​string[]

Tags for gallery filtering and card chips.

​object[]

Small stat objects, e.g. [{"Locations":17},{"Trips":12}].

industry
​string

Industry/vertical for gallery filtering, e.g. "healthcare", "transportation" (empty when not set).

secondary_industries
​string[]

Additional industries this example also belongs to, beside the primary industry. A gallery filter should treat an example as matching if the requested industry is the primary OR appears here. Optional and additive: an absent or empty array behaves exactly as a card with only industry set, so clients that ignore it are unaffected. Exists because some scenarios genuinely sit in two verticals - special-needs school transport is education and healthcare; roll-off container swaps are public-works and logistics - and forcing one label makes an industry page look emptier than the library actually is.

Example: {"0":"transportation"}
​ExampleGeography

Where an example scenario is set, for gallery filtering.

scale
​string

Derived instance size bucket: "small", "medium", or "large" (empty when not set).

constraints_tags
​string[]

Constraint-shape tags for gallery filtering (e.g. "time windows", "vehicle types"), distinct from industry.

colorDimension
​string · enum

Which fact this example's per-location colours encode. The same light-to-dark ramp means time of day on one example and demand on another, so a legend must read this rather than infer meaning from the swatches. "none" means the example's stops are uniform and are deliberately left uncoloured.

Enum values:
vehicle_eligibility
time_of_day
demand
none
Example: vehicle_eligibility
colorDimensionLabel
​string | null

Display name for colorDimension, rendered verbatim as a legend title. Null when colorDimension is "none".

Example: Vehicle eligibility
colorScale
​string | null · enum

How to render the legend: "categorical" for a swatch per group, "ramp" for an ordered light-to-dark strip. Null when colorDimension is "none".

Enum values:
categorical
ramp
Example: categorical
colorBuckets
​string[]

Only the colours this example actually uses, in scale order, so a legend shows the two steps in play rather than every step of the scale. Empty when colorDimension is "none".

Example: {"0":"slategray","1":"darkkhaki"}

ExampleGeography

Where an example scenario is set, for gallery filtering.
city
​string
region
​string
country
​string

ScenarioTables

Canonical tables of a persisted scenario (the input_object 'data' block). Rows use the canonical component-model fields (canonical names/casing) only; the front end derives display/working fields, geoJson, and denormalized coords on load. Trips reference locations by fromLocationId/toLocationId (no coordinates).
​Location[]
​Trip[]
​Vehicle[]
​VehicleType[]
​TravelCost[]
​RouteStop[]

CoordinateSystem

string · enum
Enum values:
geographic
cartesian

Which coordinate family this problem's locations use. geographic (the default, and what every existing payload means) uses latitude/longitude on the Earth. cartesian uses unbounded x/y on an arbitrary plane, for scenarios with positions but no addresses. It describes the DATA, not the costing, so it is set once per request rather than per cost setting - and it decides which distance/duration methods are valid.

Default: geographic
On this page
  • SolveRequest
  • ProblemRequest
  • StandardResponse
  • ResponseError
  • RunIdRequest
  • RunItem
  • RunSummaryEntry
  • UpdateRunRequest
  • UserHistoryRequest
  • UserRunsResponse
  • ProblemData
  • TimeSettings
  • Location
  • Trip
  • Vehicle
  • VehicleType
  • TravelCost
  • RequestAccepted
  • UsageSummary
  • ProblemStatus
  • RunStatus
  • ProblemResult
  • VehicleUsage
  • VehiclesAssigned
  • LocationsAssigned
  • AssignmentSummary
  • RouteSummary
  • CostSummary
  • TimingSummary
  • ResultSummary
  • ProblemResponse
  • CostMatrixResponse
  • TravelCostResponses
  • TravelCostErrors
  • RouteStop
  • RouteStopFull
  • UnassignedLocation
  • UnassignedLocationFull
  • UnassignedTrip
  • UnassignedTripFull
  • ProblemMetaData
  • CostMatrixRequest
  • CostSettings
  • CostMultiplier
  • CostAdder
  • TableLimit
  • PlanLimits
  • PublicPlan
  • ExampleScenarioCard
  • ExampleGeography
  • ScenarioTables
  • CoordinateSystem