# Upsert Transport Resource Upsert a single TransportResource. As a TransportResource is considered to be always available unless a TransportResourceUnavailability says otherwise, its presence will result in the application trying to create ResourceCombinations by matching AvailableEmployees with this TransportResource. Endpoint: PUT /transport-resource/{business_id} Version: 1.27.2 Security: clientCredentials ## Path parameters: - `business_id` (string, required) A unique identifier of an entity instance. Should only contain characters which do not need URL encoding. ## Header parameters: - `Prefer` (array) 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= 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. - `If-Match` (string) Weak Etag used for optimistic locking. Example: "W/\"24\"" ## Request fields (application/json): - `type` (string, required) A TRACTOR is a pulling unit, a TRAILER a cargo unit and a TRUCK is both a pulling and cargo unit. Enum: "TRACTOR", "TRAILER", "TRUCK" - `license_plate` (string) Example: "1-ABC-987" - `requirements` (array) List of requirements the Employee must fulfill to be allowed to use this TransportResource. Example: ["driving license CE"] - `capabilities` (array) Capabilities this TransportResource provides to the ResourceCombination. Example: ["big bag"] - `required_capabilities` (array) List of requirements the Employee must fulfill, which will be provided as capabilities to the ResourceCombination. Example: ["cooling compressor"] - `skilled_capabilities` (array) List of capabilities which will be provided to the ResourceCombination, if the Employee has matching driver_skills. Example: ["sideloading"] - `cant_do` (array) List of capabilities which will be disabled on the resulting ResourceCombination. For example: A TRACTOR with a faulty electric plug, can not be used with a TRAILER that exposes a capability which requires this plug. Example: ["adr-transport"] - `capacities` (array) These capacities mirror the Order Book capacities. - `capacities.type` (string) characterization of a capacity, default volume Enum: "volume", "weight", "loadingMeters", "capacity1", "capacity2", "capacity3", "capacity4", "capacity5" - `capacities.value` (number, required) Example: 20.02 - `linked_resource` (string) The business_id of another TransportResource on the same location that should be coupled with this one no matter what. This is known as a fixed coupling. By using this you can indicate that a tractor should always be coupled with a specific trailer (or the other way around). There is no need to specify the linking in both directions. This overwrites all requirements and as such could lead to seemingly invalid situations, but this is at the discretion of the planner. Example: "trailer-1" - `start_location` (object) The start_location where this TransportResource is based. Either address information or geo point must be provided. The resolved information will be read only and be filled out after resolving. Either a home_base or a start_location must be provided. - `start_location.name` (string, required) A name by which to identify this location. If used as a start_location, this is used for matching colocated entities. Example: "Conundra" - `start_location.address_line` (string) The address line of this location's address. Can contain street, house number, bus and more. Example: "Voordries 41b" - `start_location.city` (string) The name of the locality of this location. Required when no geo_point is provided. Example: "Oosterzele" - `start_location.zip_code` (string) The ZIP code of the locality of this location. Required when no geo_point is provided. Example: "9860" - `start_location.country_code` (string) The ISO3166-1 alpha-2 two letter country code for this location. Required when no geo_point is provided. - `start_location.geo_point` (object) - `start_location.geo_point.latitude` (number, required) Example: 50.9514048 - `start_location.geo_point.longitude` (number, required) Example: 3.8067878 - `home_base` (object) Conceptually the same as start_location, but with centralized address management. Either a home_base or a start_location must be provided. - `home_base.business_id` (string, required) The unique identifier of a HomeBase. Example: "depot-1" - `reference` (string) Optional, internal reference (eg: fleet number, ...) for the TransportResource. Example: "fleet-reference-47" - `custom_data` (object) 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. - `labels` (array) Labels provided by the TransportResource for its Combination. Example: ["Transport-resource-label-A"] - `inactive` (boolean) Flag to indicate whether a TransportResource can be used for creating ResourceCombinations. When set to true, all future ResourceCombinations will be removed. - `cost` (object) - `cost.per_kilometer` (number) A cost to be applied per kilometer in the optimization when utilizing this resource. Example: 0.9 - `cost.per_hour` (number) An hourly cost to be applied in the optimization when utilizing this resource. Example: 46.8 - `cost.fixed` (number) The fixed cost to be applied in the optimization when utilizing this resource. Example: 213 - `characteristics` (object) [EXPERIMENTAL] Technical characteristics of this TransportResource. - `characteristics.maximum_allowed_weight` (number) The maximum allowed weight for this cargo unit. This cannot be provided for transport resources of type TRACTOR. Example: 3500 - `route_settings` (object) Route settings for this TransportResource. - `route_settings.direct_trips` (boolean, required) Restricts this TransportResource to direct trips during planning. ## Response 201 fields (application/json): - `business_id` (string, required) Example: "tractor-1" - `type` (string, required) A TRACTOR is a pulling unit, a TRAILER a cargo unit and a TRUCK is both a pulling and cargo unit. Enum: "TRACTOR", "TRAILER", "TRUCK" - `license_plate` (string) Example: "1-ABC-987" - `requirements` (array) List of requirements the Employee must fulfill to be allowed to use this TransportResource. Example: ["driving license CE"] - `capabilities` (array) Capabilities this TransportResource provides to the ResourceCombination. Example: ["big bag"] - `required_capabilities` (array) List of requirements the Employee must fulfill, which will be provided as capabilities to the ResourceCombination. Example: ["cooling compressor"] - `skilled_capabilities` (array) List of capabilities which will be provided to the ResourceCombination, if the Employee has matching driver_skills. Example: ["sideloading"] - `cant_do` (array) List of capabilities which will be disabled on the resulting ResourceCombination. For example: A TRACTOR with a faulty electric plug, can not be used with a TRAILER that exposes a capability which requires this plug. Example: ["adr-transport"] - `capacities` (array) These capacities mirror the Order Book capacities. - `capacities.type` (string) characterization of a capacity, default volume Enum: "volume", "weight", "loadingMeters", "capacity1", "capacity2", "capacity3", "capacity4", "capacity5" - `capacities.value` (number, required) Example: 20.02 - `linked_resource` (string) The business_id of another TransportResource on the same location that should be coupled with this one no matter what. This is known as a fixed coupling. By using this you can indicate that a tractor should always be coupled with a specific trailer (or the other way around). There is no need to specify the linking in both directions. This overwrites all requirements and as such could lead to seemingly invalid situations, but this is at the discretion of the planner. Example: "trailer-1" - `start_location` (object) The start_location where this TransportResource is based. Either address information or geo point must be provided. The resolved information will be read only and be filled out after resolving. Either a home_base or a start_location must be provided. - `start_location.name` (string, required) A name by which to identify this location. If used as a start_location, this is used for matching colocated entities. Example: "Conundra" - `start_location.address_line` (string) The address line of this location's address. Can contain street, house number, bus and more. Example: "Voordries 41b" - `start_location.city` (string) The name of the locality of this location. Required when no geo_point is provided. Example: "Oosterzele" - `start_location.zip_code` (string) The ZIP code of the locality of this location. Required when no geo_point is provided. Example: "9860" - `start_location.country_code` (string) The ISO3166-1 alpha-2 two letter country code for this location. Required when no geo_point is provided. - `start_location.geo_point` (object) - `start_location.geo_point.latitude` (number, required) Example: 50.9514048 - `start_location.geo_point.longitude` (number, required) Example: 3.8067878 - `start_location.geo_point.resolved` (object) Indicates whether the address is resolved. - `start_location.geo_point.resolved.geocoded` (boolean) Example: true - `start_location.geo_point.resolved.address` (string) Example: "Voordries 31 bus B, 9860 Oosterzele" - `start_location.geo_point.resolved.precision` (integer) Example: 9 - `home_base` (object) Conceptually the same as start_location, but with centralized address management. Either a home_base or a start_location must be provided. - `home_base.business_id` (string, required) The unique identifier of a HomeBase. Example: "depot-1" - `reference` (string) Optional, internal reference (eg: fleet number, ...) for the TransportResource. Example: "fleet-reference-47" - `custom_data` (object) 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. - `labels` (array) Labels provided by the TransportResource for its Combination. Example: ["Transport-resource-label-A"] - `inactive` (boolean) Flag to indicate whether a TransportResource can be used for creating ResourceCombinations. When set to true, all future ResourceCombinations will be removed. - `cost` (object) - `cost.per_kilometer` (number) A cost to be applied per kilometer in the optimization when utilizing this resource. Example: 0.9 - `cost.per_hour` (number) An hourly cost to be applied in the optimization when utilizing this resource. Example: 46.8 - `cost.fixed` (number) The fixed cost to be applied in the optimization when utilizing this resource. Example: 213 - `characteristics` (object) [EXPERIMENTAL] Technical characteristics of this TransportResource. - `characteristics.maximum_allowed_weight` (number) The maximum allowed weight for this cargo unit. This cannot be provided for transport resources of type TRACTOR. Example: 3500 - `route_settings` (object) Route settings for this TransportResource. - `route_settings.direct_trips` (boolean, required) Restricts this TransportResource to direct trips during planning. ## Response 400 fields (application/problem+json): - `title` (string) A short, summary of the problem. Example: "Validation exception" - `detail` (string) A detailed explanation specific to this problem. Example: "The field contains invalid business formatting." - `violations` (array) - `violations.field` (string) Example: "path.to.field" - `violations.message` (string) Example: "Field is required" ## Response 404 fields (application/problem+json): - `title` (string) A short, summary of the problem. Example: "Validation exception" - `detail` (string) A detailed explanation specific to this problem. Example: "The field contains invalid business formatting." ## Response 412 fields (application/problem+json): - `title` (string) A short, summary of the problem. Example: "Validation exception" - `detail` (string) A detailed explanation specific to this problem. Example: "The field contains invalid business formatting." ## Response 204 fields ## Response 401 fields