Todo
idinteger · requiredThe todo ID
titlestring · requiredThe todo title
completedboolean · requiredWhether the todo is completed
userIdinteger · requiredThe user ID who owns the todo
CreateTodo
titlestring · requiredThe todo title
userIdinteger · requiredThe user ID who owns the todo
completedbooleanWhether the todo is completed
Default: false
UpdateTodo
titlestringThe todo title
completedbooleanWhether the todo is completed
userIdintegerThe user ID who owns the todo
Problem
problemTypestring · enum · requiredEnum values:pickup-deliveryvehicle-routing
problemDataobjectThis schema defines the problem data for an optimization Problem. The particular data objects used will depend on the problemType.
timeSettingsobjectThis 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).
TimeSettings
timeUnitstring · enumThe 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.
Enum values:integerclockDefault: integertimeFormatstringThe 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.
Default: nullmultipleDaysA boolean field indicating whether to allow the optimization time period to extend multiple days. This field is relevant only when timeUnit = "datetime".
Default: falsedateUnitstring · enumThe 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:integercalendarDefault: integerdateFormatstringThe 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.
Default: null
RequestAccepted
problemIdstringThe unique identifier for this optimization run. You will want to store this locally so that you can use in your GET request for /problem.
ProblemStatus
statusstring · enum · requiredThe status of the optimization problem identified by the problemId parameter.
Enum values:failedcompletedrunningqueued
ProblemResult
problemIdstring · requiredThe unique identifier for this optimization run.
ProblemStatusobjectThe status of the optimization problem identified by the problemId parameter.
ProblemMetaDataobjectMetadata about the optimization problem
totalCostnumber · floatThe total cost (objective function) of the optimization run. This is the sum of all travel costs plus fixed vehicle costs (if applicable).
RouteStopsobject[]A list of stops that were visited by vehicles during the optimization run. Each stop represents a location that was visited by a vehicle.
RouteStopsFullobject[]A list of stops that were visited by vehicles during the optimization run, along with additional details about the location and vehicle.
UnassignedLocationsobject[]A list of locations that were not visited by any vehicle during the optimization run.
UnassignedLocationsFullobject[]A list of locations that were not visited by any vehicle during the optimization run, along with additional details about the location.
UnassignedTripsobject[]A list of trips that were not serviced by any vehicle during the optimization run.
UnassignedTripsFullobject[]A list of trips that were not serviced by any vehicle during the optimization run, along with additional details about the trip.
Pathsobject[]A list of paths taken by vehicles during the optimization run. Each path represents a sequence of stops made by a vehicle.
Default: []
CostMatrixResponse
TravelCostResponsesobject[]A list of travel costs between pairs of locations. Each travel cost represents the duration, distance, and cost of travel between two locations.
TravelCostErrorsobject[]A list of errors encountered during the cost matrix calculation. Each error represents a problem with calculating the travel cost between two locations.
TravelCostResponses
fromLocationIdstring · requiredThe locationId of the origin location for this travel cost
toLocationIdstring · requiredThe locationId of the destination location for this travel cost.
fromLocationNamestringThe name of the origin location for this travel cost.
toLocationNamestringThe name of the destination location for this travel cost.
vehicleTypeIdstringThe vehicleTypeId for this travel cost. If null, then the travel cost will apply to all vehicle types.
vehicleTypestringThe name of the vehicle type for this travel cost. If null, then the travel cost will apply to all vehicle types.
durationnumber · floatThe travel duration between these two locations.
distancenumber · floatThe travel distance between these two locations.
costnumber · floatThe cost of travel between these two locations.
statusstring · enumThe status of the travel cost calculation. This will be "s" for success, "e" for error, and "w" for warning (i.e. calculated with a fallback method).
Enum values:sewDefault: serrorMessagestringIf 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.
Default: null
TravelCostErrors
errorMessagestring · enum · requiredA 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.
errorDescriptionstringA more detailed description of the error encountered during the cost matrix calculation.
RouteStop
stopIdstring · requiredA unique identifier for this stop, represented as a UUID.
locationIdstring · requiredThe locationId of the stop.
vehicleIdstring · requiredThe vehicleId of the vehicle that visited this stop.
stopCostnumber · float · requiredThe cost of stopping at this location, including the travel cost incurred to get to this location.
serviceDurationnumber · float · min: 0 · requiredThe amount of time the vehicle spent servicing this stop.
Default: 0stopNumberinteger · requiredThe stop number for this stop in the route. This is a 1-based index.
capacityServedinteger · requiredThe amount of capacity served at this stop.
tripIdstringThe tripId of the trip that visited this stop, if applicable for this problem type.
arrivalTimeIntintegerThe time at which the vehicle arrived at this stop, in integer time units. This is the number of time units from the start of the optimization run.
arrivalTimeStrstringThe time at which the vehicle arrived at this stop, in the clock time format specified in the ProblemData.timeSettings.timeFormat field.
Default: nulldepartureTimeIntintegerThe 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.
Default: nulldepartureTimeStrstringThe time at which the vehicle departed from this stop, in the clock time format specified in the ProblemData.timeSettings.timeFormat field.
Default: nullwaitDurationStartnumber · float · min: 0The amount of time the vehicle waited at this stop before servicing the location.
Default: 0waitDurationEndnumber · float · min: 0The amount of time the vehicle waited at this stop after servicing the location.
Default: 0stopTypestring · enumThe type of stop. This indicates whether the stop is a location visit, pickup, delivery, route start, route end, break start, break end, or restock.
Enum values:location_visitpickupdeliveryroute_startroute_endbreak_startbreak_endrestockactionstringThe 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".
RouteStopFull
stopIdstring · requiredA unique identifier for this stop, represented as a UUID.
locationIdstring · requiredThe locationId of the stop.
vehicleIdstring · requiredThe vehicleId of the vehicle that visited this stop.
stopCostnumber · float · requiredThe cost of stopping at this location, including the travel cost incurred to get to this location.
serviceDurationnumber · float · min: 0 · requiredThe amount of time the vehicle spent servicing this stop.
Default: 0stopNumberinteger · requiredThe stop number for this stop in the route. This is a 1-based index.
capacityServedinteger · requiredThe amount of capacity served at this stop.
locationNamestring · requiredThe name of the location for this stop.
colorstring · requiredThe color associated with this stop, represented as a hex color code.
tripIdstringThe tripId of the trip that visited this stop, if applicable for this problem type.
arrivalTimeIntintegerThe time at which the vehicle arrived at this stop, in integer time units. This is the number of time units from the start of the optimization run.
arrivalTimeStrstringThe time at which the vehicle arrived at this stop, in the clock time format specified in the ProblemData.timeSettings.timeFormat field.
Default: nulldepartureTimeIntintegerThe 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.
Default: nulldepartureTimeStrstringThe time at which the vehicle departed from this stop, in the clock time format specified in the ProblemData.timeSettings.timeFormat field.
Default: nullwaitDurationStartnumber · float · min: 0The amount of time the vehicle waited at this stop before servicing the location.
Default: 0waitDurationEndnumber · float · min: 0The amount of time the vehicle waited at this stop after servicing the location.
Default: 0stopTypestring · enumThe type of stop. This indicates whether the stop is a location visit, pickup, delivery, route start, route end, break start, break end, or restock.
Enum values:location_visitpickupdeliveryroute_startroute_endbreak_startbreak_endrestockactionstringThe 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".
UnassignedLocation
locationIdstring · requiredThe locationId of the unassigned location.
demandDroppedinteger · min: 0 · requiredThe amount of demand that was not served at this location.
UnassignedLocationFull
locationIdstring · requiredThe locationId of the unassigned location.
demandDroppedinteger · min: 0 · requiredThe amount of demand that was not served at this location.
locationNamestring · requiredThe name of the unassigned location.
latitudenumber · floatThe latitude of the unassigned location.
longitudenumber · floatThe longitude of the unassigned location.
isDepotOnlybooleanWhether this unassigned location serves only as a depot (true) or if this location should be serviced (false).
Default: false
ProcessUploadedTravelCostRequest
UploadedDataobject[] · requiredAn array of objects representing the uploaded travel cost data. Each object should contain the necessary fields to process the travel costs.
Locationsarray · requiredThe locations to use for processing the uploaded travel cost data.
TravelCostsarray · requiredThe travel costs to use for processing the uploaded travel cost data.
CostSettingsrequiredThe 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.
overwriteExistingEntriesboolean · requiredWhether to overwrite existing travel cost entries with the uploaded data. If true, existing entries will be replaced with the new data. If false, new entries will be added without modifying existing ones.
Default: true
VehicleTypesarrayThe vehicle types to use for processing the uploaded travel cost data. Required only if the travel costs are dependent on vehicle types.
ProcessUploadedTravelCostResponse
TravelCostResponsesobject[]A list of travel costs that were successfully processed from the uploaded data. Each travel cost represents the duration, distance, and cost of travel between two locations.
UploadedTravelCostNotificationsobject[]A list of notifications about the processing of the uploaded travel cost data. Each notification provides information about the processing status of each entry.
NewLocationsarrayA list of new locations that were added to the system as a result of processing the uploaded travel cost data.
NewVehicleTypesarrayA list of new vehicle types that were added to the system as a result of processing the uploaded travel cost data.
UploadedTravelCostNotification
typestring · enum · requiredThe type of the processing notification for this travel cost entry.
Enum values:successwarningerrormessagestring · requiredA message providing additional information about the processing status, such as errors encountered or successful processing confirmation.
UnassignedTrip
tripIdstring · requiredThe tripId of the unassigned trip.
demandDroppedinteger · min: 0 · requiredThe amount of demand that was not able to be served by any vehicle for this trip.
capacityServedinteger · min: 0 · requiredThe 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.
UnassignedTripFull
tripIdstring · requiredThe tripId of the unassigned trip.
demandDroppedinteger · min: 0 · requiredThe amount of demand that was not able to be served by any vehicle for this trip.
capacityServedinteger · min: 0 · requiredThe 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.
tripNamestring · requiredThe name of the unassigned trip.
fromLocationNamestring · requiredThe name of the origin location for this trip.
toLocationNamestring · requiredThe name of the destination location for this trip.
fromLocationIdstring · requiredThe locationId of the origin location for this trip.
toLocationIdstring · requiredThe locationId of the destination location for this trip.
fromLatitudenumber · float · requiredThe latitude of the origin location for this trip.
fromLongitudenumber · float · requiredThe longitude of the origin location for this trip.
toLatitudenumber · float · requiredThe latitude of the destination location for this trip.
toLongitudenumber · float · requiredThe longitude of the destination location for this trip.
ProblemMetaData
problemTypestring · enum · requiredThe type of optimization problem that was run.
Enum values:pickup-deliveryvehicle-routingsubmissionTimestampinteger · int64 · requiredThe date and time when the optimization problem was submitted, in unix timestamp in seconds
queueTimenumber · float · requiredThe time spent in the queue before the optimization run started, in seconds.
optimizationTimenumber · floatThe time taken to run the optimization, in seconds.
CostMatrixRequest
Locationsarray · requiredThe locations to use for calculating the cost matrix.
CostSettingsrequiredThe 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.
TravelCostsarrayThe 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.
CostMultiplier
vehicleTypeDependenceboolean · requiredWhether 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
baseMultipliernumber · floatThe multiplier to apply to the base cost metric (duration or distance) to calculate the final travel cost.
Default: 1vehicleTypeMultipliersobject[]
CostAdder
vehicleTypeDependenceboolean · requiredWhether 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
baseAddernumber · floatThe adder to apply to the base cost metric (duration or distance) to calculate the final travel cost.
Default: 0vehicleTypeAddersobject[]
