Skip to content

Enums, limits and rules

Reference · API reference

Objective

Set objective inside problem. It takes either a built-in code or a strategy name.

Value Name Meaning
1 minimizeTravelTime Minimize total travel time (default)
2 minimizeRoutes Minimize number of routes (vehicles used)
3 balanceWorkLoad Balance workload among routes
4 minimizeTravelDistance Minimize total travel distance
5 balanceWorkLoadHours Balance workload by hours on the road
string An account-configured custom strategy name

Codes 4 and 5 depend on your engine version

Accounts on engine v1 accept codes 13 only; 4 and 5 are available on engine v2. If you are unsure which one is behind your account, ask DDS.

For what each objective trades away and how to pick between them, see Choosing an objective.

Configuration values

Field Allowed Default
polylineType none, plain, encoded none
units metric, imperial metric
enforceLockedTasks full, order, vehicle
unassignedTasks true / false false
statistics true / false false
freezeWindowLength integer (minutes)

Task status (re-optimization)

Value Meaning
pending Not yet started.
in_progress Currently being performed.
performed Completed.

Location format

  • Array [latitude, longitude] or object { "lat": …, "lng": … }.
  • Use at least 5 decimal places for accuracy.

Timestamps

  • ISO 8601 with time zone offset — e.g. 2026-07-31T14:45:30-08:00.
  • Keep one consistent time zone across the whole payload; the output uses the same one.

Time windows

  • A window is a two-element array: ["2026-07-31T09:00:00-07:00", "2026-07-31T12:00:00-07:00"].
  • serviceWindows is an array of those, so a single window is [[start, end]].
  • Every task needs at least one. A task without one is rejected.
  • A pickup window that has already closed at the moment you submit is rejected with error 10405. Date your problem for a day that is still ahead of the clock.

Job rules

  • At least one job and one vehicle are required.
  • All ids must be unique within their kind (jobs, tasks, vehicles).
  • A job supports pickup-only, delivery-only, or pickup-and-delivery — but not multiple pickups and multiple deliveries together.
  • For pickup-and-delivery, the anchor is determined by which side carries the service window.

Other limits

  • Total time span of a problem: max 33 hours from the earliest timestamp.
  • maxRideTable bands must not overlap or leave gaps.

Related: The Problem object · The Solution object · Rate limits and errors