Skip to main content
PUT
Error

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agencyId
string
required

The agency id.

Pattern: ^[A-Z]{3,6}_[a-zA-Z0-9-._~:@!$,]+$
Example:

"LND_Agency-42"

planId
string
required

The plan id. At least one character among those allowed: unaccented alpha-numeric characters, "-", ".", "_", "~", ":", "@", "!", "$", ",".

Pattern: ^[a-zA-Z0-9-._~:@!$,]+$
resourceId
string
required

The resource id. At least one character among those allowed: unaccented alpha-numeric characters, "-", ".", "_", "~", ":", "@", "!", "$", ",".

Pattern: ^[a-zA-Z0-9-._~:@!$,]+$

Query Parameters

force
boolean
default:false

If true, on an archived item, the requested action will be forced and the item will be unarchived.

Body

application/json

The Resource to update.

[TO_VALIDATE] Description pending review by a Kardinal engineer.

id
string
required

Resource ids must be unique within a plan.

Pattern: ^[a-zA-Z0-9-._~:@!$,]+$
vehicleProfile
object
required

Describes how this resource travels between stops: the mode of transport and its constraints. One of fly, pedestrian, bicycle, scooter, motorbike, car, or truck, each exposing different parameters (for example traffic sensitivity, weight, or hazardous goods restrictions).

workingTimeWindow
object
required

The time window during which the resource is available to work. Often used together with maxWorkingDuration.

properties
object

Free-form key-value pairs (strings only) with no impact on optimization, such as the driver's name. Returned unchanged in the plan and its solution.

state
object

[TO_VALIDATE] Believed to describe the resource's manual-mode state (current mode and any forced stop/break assignments), used by the manual planning endpoints. Needs confirmation.

cost
object

Defines a custom cost model for this resource (for example per kilometer, per capacity unit transported, or a fixed cost), used by the minimizeCosts objective. See the Cost schema below for every available cost component and its semantics.

CO2EmissionCalculation
object

Optional CO2 emission calculation parameters for this resource. The object is Cost-shaped. Typical fields:

  • km: emission per travelled kilometre (e.g. costCoeff in g/km);
  • costPerCapacityPerTravelledKm: per-capacity emission per travelled kilometre;
  • costPerCapacityPerTravelledHour: per-capacity emission per travel hour (travel duration only). When set, the resulting emissions are reported on the tour as CO2Emission. Takes precedence over any matching plan-level declaration.
Example:
priority
integer
default:0

0 by default, can be negative.

skills
string[]

At least one character among those allowed: unaccented alpha-numeric characters, "-", ".", "_", "~", ":", "@", "!", "$", ",".

Pattern: ^[a-zA-Z0-9-._~:@!$,]+$
Example:
preferredStopTags
string[]

At least one character among those allowed: unaccented alpha-numeric characters, "-", ".", "_", "~", ":", "@", "!", "$", ",".

Pattern: ^[a-zA-Z0-9-._~:@!$,]+$
Example:
tags
string[]

At least one character among those allowed: unaccented alpha-numeric characters, "-", ".", "_", "~", ":", "@", "!", "$", ",".

Pattern: ^[a-zA-Z0-9-._~:@!$,]+$
Example:
capacities
object

The carrying capacity of the resource, as free-form key-value pairs (for example weight, volume, or temperature zones). The same capacity keys must also be declared on eligible stops for the algorithm to assign them to this resource.

Example:
departure
object

The starting location of the resource's route, typically a home or depot. If omitted, the algorithm assumes working time starts from the first visited stop.

Example:
arrival

The ending location of the resource's route, typically a home or depot. If omitted, the algorithm assumes working time ends at the last visited stop.

Example:
maxWorkingDuration
string

A period of time, expressed in the ISO8601 duration format.

Pattern: ^P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$
Example:

"PT4M"

maxDistanceInKm
number

The maximum distance the resource can travel, used to constrain its service area.

maxInterStopDistanceInKm

Maximum distance, in km, between two consecutive stops on a tour. Accepts either:

  • a scalar value — applied uniformly to every travel of the tour;
  • a structured object with independent bounds per segment (firstTravel, interStop, lastTravel); an absent key means no constraint on that segment.
Example:

50

maxInterStopDuration

Maximum duration between two consecutive stops on a tour. Accepts either:

  • a scalar value — applied uniformly to every travel of the tour;
  • a structured object with independent bounds per segment (firstTravel, interStop, lastTravel); an absent key means no constraint on that segment.
Pattern: ^P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$
Example:

"PT4M"

breaks
object[]

The breaks (lunch, legal driving/working breaks, etc.) the resource must take during its working time window. Breaks count as working time unless stated otherwise.

[TO_VALIDATE] Description pending review by a Kardinal engineer.

operationDurationPolicies
object[]
travelTimeCoefficient
number<float>

[TO_VALIDATE] Believed to be a multiplier applied to this resource's travel time calculations. Exact behavior needs confirmation.

Example:

1.05

emptyThresholdByCapacity
object

Thresholds for capacities below which a resource is considered "empty" for empty distance calculation. A resource is "empty" (kilometers traveled count as empty distance) when all capacities are at or below their threshold.

Example:
avoidEarlyLoadings
object[]

Early loading declarations for this resource. Each entry identifies a stop tag and optional capacities used to compute the minimizeEarlyLoadings objective.

Response

Resource response updated.

[TO_VALIDATE] Description pending review by a Kardinal engineer.

item
object

[TO_VALIDATE] Description pending review by a Kardinal engineer.

agencyId
string

The agency id.

Pattern: ^[A-Z]{3,6}_[a-zA-Z0-9-._~:@!$,]+$
Example:

"LND_Agency-42"

planId
string

The plan id.

Pattern: ^[a-zA-Z0-9-._~:@!$,]+$
Example:

"plan-AB"

planVersion
integer
read-only

The plan version.

Required range: x >= 1
Example:

42