Skip to content

Conundra Resources API (1.27.2)

The Resources API provides the resources necessary to create a planning.

Download OpenAPI description
Servers
Mock server
https://developer.conundra.eu/_mock/apis/resource-management/resources-api
Resources API Production
https://api.conundra.eu/resource-management/v1

Health check

Miscellaneous endpoints for general API functionality

Operations

Employee

Endpoints used for managing the general information regarding your Employees. These endpoints are meant for managing Employees whose role is relevant for the functionality in Resource Management, ie: typically only those Employees capable of operating TransportResources.

Operations

Get cursor-based employees

Request

Retrieve employees in bulk using cursor-based paging (see the Cursor-based pagination documentation on the PTV Developer Portal).

Security
clientCredentials
Query
cursorstring

The cursor of the page to return. No cursor is expected for the initial request. The cursors returned by this endpoint can be used for subsequent requests.

limitinteger[ 1 .. 1000 ]

Number of results to return per page.

Default 100

Responses

The results for the current paged request and optional pointers to related result pages.

Bodyapplication/json
dataArray of objects

The set of results for the current page.

cursorsobject(Cursors)

The cursors represent pointers to pages of results in relation to the page that was retrieved by the current request. These pointers are nullable. For more information on these pointers, view the Developer Portal.

Response
application/json
{ "data": [ {} ], "cursors": { "previous": "string", "self": "string", "next": "string" } }

Upsert Employee

Request

Create or update an Employee. A unique ID (business_id) is required to identify the Employee. Calling this endpoint with an existing business_id will update the Employee.

Modifying (or retrieving) an Employee will provide the caller with a version number for this Employee. This version can be passed to the upsert endpoint as a weak ETag in the If-Match header. This allows the caller to ensure that the Employee has not been modified since the last time it was retrieved.

Security
clientCredentials
Path
business_idstring^[a-zA-Z0-9.~\-_]{1,512}$required

Unique identifier for this Employee. Should only contain characters which do not need URL encoding.

Headers
PreferArray of strings

The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240).

The following behavior (see Examples) is supported by this API:

  • return=<minimal|representation> is used to suggest the server to return using 204 without resource (minimal) or using 200 or 201 with resource (representation) in the response body on success.
Examples:

Indicate no response is needed, can be omitted

return=minimal

Request the result of the operation as response

return=representation
If-Matchstring

Weak Etag used for optimistic locking.

Example: W/"24"
Bodyapplication/json
nameobject(EmployeeName)

The name of this Employee. Both properties are nullable to allow for regional differences.

driver_skillsArray of strings

driver_skills are only meaningful in relation to a linked TransportResource. They are skills of the Employee that determine the feasibility of a ResourceCombination and the resulting capabilities of this ResourceCombination.

Example: ["digital side mirrors","driving license D"]
skillsArray of strings

skills are inherent to the Employee regardless of the vehicle they are operating, such as language skills. They are available to the ResourceCombination, regardless of the linked TransportResource.

Example: ["Dutch","English"]
start_locationobject(NamedGeoAddress)

An ad-hoc location from which this Employee will start each work shift, unless otherwise specified on more specific entities. When using an ad-hoc location, the Employee will only be assigned to TransportResources with a matching start_location (name-based match).

Either address information or geo point must be provided. Resolved address information will be read only and be filled out after resolving.

Either a home_base or a start_location must be provided.

home_baseobject(LinkedHomeBase)

The business_id of a known HomeBase in the system. This represents the location from which this Employee will start each work shift, unless otherwise specified on more specific entities. When located at a HomeBase, the Employee will only be assigned to TransportResources with a matching home_base. This is conceptually the same as using an ad-hoc start_location, but with centralized address management which automatically propagates changes on the root entity.

Either a home_base or a start_location must be provided.

linked_resourcestring

A reference to the TransportResource (by business_id) which should be linked to this Employee if possible. The algorithm will try to adhere to this requirement as much as possible, but this may not be possible in case of:

  • differing start_location/home_base
  • conflicting linked_resource on another Employee with overlapping availabilities
  • unavailability of the TransportResource.
Example: "0-ABC-123"
wont_doArray of strings

Allows you to control the capabilities of a ResourceCombination for this Employee. This property can be used to disable a TransportResource's capabilities.

A use case could be disabling one type of cargo due. Suppose the Employee is unable to handle the big bag cargo type, but you chose to define cargo types as capabilities on the TransportResource, you can add big bag to this Employee's won't do.

Example: ["big bag"]
costobject(Cost)

Costs associated with this Employee, which will be combined with assigned TransportResources in the resulting ResourceCombination. These costs help steer the optimization algorithm towards an optimal solution.

The addition of costs maintains a precision of 4.

labelsArray of strings

Labels provided by the Employee to its ResourceCombination. Using labels allows you to select subsets of ResourceCombinations for use in an optimization by configuring them in the Resource Filter.

Example: ["Employee-label-A"]
route_settingsobject

[EXPERIMENTAL] Various properties that will have an impact on the planning of a route in PTV OptiFlow.

custom_dataobject(CustomData)

Custom data is an extendable hashmap of key-value pairs for client usage. These values have no meaning in the context of Resource Management, but can be used to enrich the data in OptiFlow with relevant information for the end users.

Keys should not be blank nor contain periods.

Responses

Employee created or updated

Headers
ETagstring

A weak Etag (ex W/"<etag_value>") which contains the current version of the entity

Example: "W/\"25\""
Preference-Appliedstring

Indicates whether a preference has been applied. (ex return=representation)

Locationstring(URI)

A URI to access the result of the operation.

Bodyapplication/json
business_idstring^[a-zA-Z0-9.~\-_]+$read-onlyrequired

Unique identifier for this Employee.

Example: "employee-42"
nameobject(EmployeeName)

The name of this Employee. Both properties are nullable to allow for regional differences.

driver_skillsArray of strings

driver_skills are only meaningful in relation to a linked TransportResource. They are skills of the Employee that determine the feasibility of a ResourceCombination and the resulting capabilities of this ResourceCombination.

Example: ["digital side mirrors","driving license D"]
skillsArray of strings

skills are inherent to the Employee regardless of the vehicle they are operating, such as language skills. They are available to the ResourceCombination, regardless of the linked TransportResource.

Example: ["Dutch","English"]
start_locationobject(NamedGeoAddress)

An ad-hoc location from which this Employee will start each work shift, unless otherwise specified on more specific entities. When using an ad-hoc location, the Employee will only be assigned to TransportResources with a matching start_location (name-based match).

Either address information or geo point must be provided. Resolved address information will be read only and be filled out after resolving.

Either a home_base or a start_location must be provided.

home_baseobject(LinkedHomeBase)

The business_id of a known HomeBase in the system. This represents the location from which this Employee will start each work shift, unless otherwise specified on more specific entities. When located at a HomeBase, the Employee will only be assigned to TransportResources with a matching home_base. This is conceptually the same as using an ad-hoc start_location, but with centralized address management which automatically propagates changes on the root entity.

Either a home_base or a start_location must be provided.

linked_resourcestring

A reference to the TransportResource (by business_id) which should be linked to this Employee if possible. The algorithm will try to adhere to this requirement as much as possible, but this may not be possible in case of:

  • differing start_location/home_base
  • conflicting linked_resource on another Employee with overlapping availabilities
  • unavailability of the TransportResource.
Example: "0-ABC-123"
wont_doArray of strings

Allows you to control the capabilities of a ResourceCombination for this Employee. This property can be used to disable a TransportResource's capabilities.

A use case could be disabling one type of cargo due. Suppose the Employee is unable to handle the big bag cargo type, but you chose to define cargo types as capabilities on the TransportResource, you can add big bag to this Employee's won't do.

Example: ["big bag"]
costobject(Cost)

Costs associated with this Employee, which will be combined with assigned TransportResources in the resulting ResourceCombination. These costs help steer the optimization algorithm towards an optimal solution.

The addition of costs maintains a precision of 4.

labelsArray of strings

Labels provided by the Employee to its ResourceCombination. Using labels allows you to select subsets of ResourceCombinations for use in an optimization by configuring them in the Resource Filter.

Example: ["Employee-label-A"]
route_settingsobject

[EXPERIMENTAL] Various properties that will have an impact on the planning of a route in PTV OptiFlow.

custom_dataobject(CustomData)

Custom data is an extendable hashmap of key-value pairs for client usage. These values have no meaning in the context of Resource Management, but can be used to enrich the data in OptiFlow with relevant information for the end users.

Keys should not be blank nor contain periods.

Response
application/json
{ "business_id": "employee-42", "name": { "first_name": "Jan", "last_name": "Van den Berghe" }, "driver_skills": [ "digital side mirrors", "driving license D" ], "skills": [ "Dutch", "English" ], "start_location": { "name": "Conundra", "address_line": "Voordries 41b", "city": "Oosterzele", "zip_code": "9860", "country_code": "BE", "geo_point": {} }, "home_base": { "business_id": "depot-1" }, "linked_resource": "0-ABC-123", "wont_do": [ "big bag" ], "cost": { "per_kilometer": 0.9, "per_hour": 46.8, "fixed": 213 }, "labels": [ "Employee-label-A" ], "route_settings": { "driving_speed_factor": 1.25, "max_stops_per_shift": 3 }, "custom_data": { "shop_manager": "John Smith" } }

Get Employee

Request

Get an existing Employee, defined by their business_id.

Security
clientCredentials
Path
business_idstring^[a-zA-Z0-9.~\-_]{1,512}$required

The unique ID (business_id) used to create this Employee.

Responses

The Employee was successfully retrieved. Details are in the response body.

Headers
ETagstring

A weak Etag (ex W/"<etag_value>") which contains the current version of the entity

Example: "W/\"25\""
Bodyapplication/json
business_idstring^[a-zA-Z0-9.~\-_]+$read-onlyrequired

Unique identifier for this Employee.

Example: "employee-42"
nameobject(EmployeeName)

The name of this Employee. Both properties are nullable to allow for regional differences.

driver_skillsArray of strings

driver_skills are only meaningful in relation to a linked TransportResource. They are skills of the Employee that determine the feasibility of a ResourceCombination and the resulting capabilities of this ResourceCombination.

Example: ["digital side mirrors","driving license D"]
skillsArray of strings

skills are inherent to the Employee regardless of the vehicle they are operating, such as language skills. They are available to the ResourceCombination, regardless of the linked TransportResource.

Example: ["Dutch","English"]
start_locationobject(NamedGeoAddress)

An ad-hoc location from which this Employee will start each work shift, unless otherwise specified on more specific entities. When using an ad-hoc location, the Employee will only be assigned to TransportResources with a matching start_location (name-based match).

Either address information or geo point must be provided. Resolved address information will be read only and be filled out after resolving.

Either a home_base or a start_location must be provided.

home_baseobject(LinkedHomeBase)

The business_id of a known HomeBase in the system. This represents the location from which this Employee will start each work shift, unless otherwise specified on more specific entities. When located at a HomeBase, the Employee will only be assigned to TransportResources with a matching home_base. This is conceptually the same as using an ad-hoc start_location, but with centralized address management which automatically propagates changes on the root entity.

Either a home_base or a start_location must be provided.

linked_resourcestring

A reference to the TransportResource (by business_id) which should be linked to this Employee if possible. The algorithm will try to adhere to this requirement as much as possible, but this may not be possible in case of:

  • differing start_location/home_base
  • conflicting linked_resource on another Employee with overlapping availabilities
  • unavailability of the TransportResource.
Example: "0-ABC-123"
wont_doArray of strings

Allows you to control the capabilities of a ResourceCombination for this Employee. This property can be used to disable a TransportResource's capabilities.

A use case could be disabling one type of cargo due. Suppose the Employee is unable to handle the big bag cargo type, but you chose to define cargo types as capabilities on the TransportResource, you can add big bag to this Employee's won't do.

Example: ["big bag"]
costobject(Cost)

Costs associated with this Employee, which will be combined with assigned TransportResources in the resulting ResourceCombination. These costs help steer the optimization algorithm towards an optimal solution.

The addition of costs maintains a precision of 4.

labelsArray of strings

Labels provided by the Employee to its ResourceCombination. Using labels allows you to select subsets of ResourceCombinations for use in an optimization by configuring them in the Resource Filter.

Example: ["Employee-label-A"]
route_settingsobject

[EXPERIMENTAL] Various properties that will have an impact on the planning of a route in PTV OptiFlow.

custom_dataobject(CustomData)

Custom data is an extendable hashmap of key-value pairs for client usage. These values have no meaning in the context of Resource Management, but can be used to enrich the data in OptiFlow with relevant information for the end users.

Keys should not be blank nor contain periods.

Response
application/json
{ "business_id": "employee-42", "name": { "first_name": "Jan", "last_name": "Van den Berghe" }, "driver_skills": [ "digital side mirrors", "driving license D" ], "skills": [ "Dutch", "English" ], "start_location": { "name": "Conundra", "address_line": "Voordries 41b", "city": "Oosterzele", "zip_code": "9860", "country_code": "BE", "geo_point": {} }, "home_base": { "business_id": "depot-1" }, "linked_resource": "0-ABC-123", "wont_do": [ "big bag" ], "cost": { "per_kilometer": 0.9, "per_hour": 46.8, "fixed": 213 }, "labels": [ "Employee-label-A" ], "route_settings": { "driving_speed_factor": 1.25, "max_stops_per_shift": 3 }, "custom_data": { "shop_manager": "John Smith" } }

Shift Schedule

ShiftSchedules can be used to describe the recurring pattern for an Employee's availability. They do not trigger availabilities themselves, but can be used to generate availabilities according to this schedule, through the application's user interface.

Providing ShiftSchedules enables planners to do long-term planning using the Employee Overview in the UI, since this allows us to predict when an Employee should be available.

Operations

Availability

Availabilities define a specific time range during which an Employee is available to execute tasks. These can either be derived from a ShiftSchedule (via the user interface) or created on an ad-hoc basis.

When an Availability is created or updated, it triggers a consolidation process that generates a snapshot of the corresponding Employee at that moment, referred to as an AvailableEmployee. This snapshot accounts for relocations (managed through the user interface) and Unavailabilities, ensuring a single source of truth for the Employee's status at that point in time.

Any modifications to this AvailableEmployee snapshot activate an algorithm that evaluates potential ResourceCombinations involving the Employee's Availability. During this evaluation, potential TransportResources are assessed. If the heuristic identifies that a specific ResourceCombination would enhance the overall solution's fitness, it is either created or updated.

Operations

Unavailability [EXPERIMENTAL]

Unavailabilities define a specific time range during which an Employee is unavailable to execute tasks. This can be due to sickness, holiday, or other temporary absences. During its duration, the employee can not be matched with a transport resource and used as part of the planning.

Operations

Transport Resource

Endpoints used for managing the general information regarding your Transport Resources. These can be Trucks, Trailers and Tractors.

Operations

Unavailability [EXPERIMENTAL]

Unavailabilities define a specific time range during which a TransportResource is unavailable. This can be due to, for example, technical issues. During its duration, the TransportResource can not be matched with an available Employee and used as part of the planning.

Operations

Home Base [EXPERIMENTAL]

A Home Base is a reusable address that is used to specify the location of Employees or Transport Resources. Instead of specifying a full address for each of these, the user can create a single reusable HomeBase and assign it to all.

Updates to an assigned HomeBase are propagated to all future resources using it.

Operations

Forecast [EXPERIMENTAL]

A forecast is the expected the number of shifts that will be required on the given day and location. They is used in the context of capacity planning: a difference in the forecast and the available shifts can indicate ue in the planning. The provided forecasts are only used to show to the end user and are not taken into account for any of the calculations made by the application.

Operations

Deployment [EXPERIMENTAL]

Endpoints used for managing Deployments. A Deployment represents the actual assignment of an Employee to one or more TransportResources for a specific time period and location. External deployments can be created to represent work assignments that are managed outside of the Resource Management system. Releasing or unreleasing routes in PTV OptiFlow also manages Deployments. These Deployments are managed internally by Resource Management and cannot be modified by this API.

Operations

Actual

Actuals capture the worked hours for an Employee during a completed work shift. This data is used to provide insights into actual worked hours compared to contractual hours, and also helps steer the optimization algorithm towards creating a balanced work week that fulfills contractual hours without significant undershooting or overshooting.

By their nature, Actuals should always represent completed work shifts and therefore should always be in the past, adding Actuals that end in the future could lead to undesired behaviour.

Operations