Updating active route.
Updates on the route spots, vehicle requirements and expected load parameters are available.
Updating route overwrites completely the route. If any value is not set and allowed as null, it will be considered as null value and overwritten.
The route-id identification number in request can be obtained when creating the route or by downloading the routes list.
POST
/ext/contracts-api/v1/routes/{route-id}
Request Authorization
Every request MUST include a valid access token obtained during the user authorization process, provided using the Bearer token scheme in the Authorization header.
Successful Response
Error Response
Request Header
POST /ext/contracts-api/v1/routes/{route-id} HTTP/1.1
Host: api.platform.trans.eu
Content-Type: application/json
Accept: application/json
Authorization: Bearer {access_token)
Api-key: {unique_app_api-key}Request Parameters
| Attribute | Type | Example | Mandatory | Description |
| if_send_to_carrier | Boolean | True | Yes | If the terms of cooperation on this route have already been sent to carriers for negotiation, an update of the route parameters entered in this request is sent to carriers |
| loads | Array of Objects | No | Specification of loads parameters required on the route | |
| loads.amount | Int | 1 | No | Amount of load types within given load |
| loads.height | Object | No | Load height | |
| loads.height.unit_code | String | “m” | No | Unit of load height. Always is “m” (meters). |
| loads.height.value | Float | 2.3 | No | Value of load height (range 0.01–10) |
| loads.length | Object | No | Load length | |
| loads.length.unit_code | String | “m” | No | Unit of load length. Always is “m” (meters) |
| loads.length.value | Float | 1.2 | No | Value of load length (range 0.01–100) |
| loads.name | String | “Glass load” | No | Name of a load |
| loads.palletes | Object | No | Additional rules for pallets | |
| loads.palletes.is_exchangeable | Boolean | False | No | Determines if type of load is available for exchange at unloading place |
| loads.palletes.is_stackable | Boolean | False | No | Specifies whether the type of load allows stacking |
| loads.type_of_load | String | “europallete” | No | Supported load type (see dictionary) |
| loads.volume | Object | No | Load volume | |
| loads.volume.unit_code | String | “m3” | No | Unit of load volume. Always is “m3” |
| loads.volume.value | Float | 1.92 | No | Value of load volume (range 0.01–10000) |
| loads.weight | Object | No | Load weight | |
| loads.weight.max | Object | No | Min load weight | |
| loads.weight.max.unit_code | String | “t” | No | Unit of load weight. Always is “t” (tonnes) |
| loads.weight.max.value | Float | 2 | No | Value of load weight (range 0.001 – 100000) |
| loads.weight.min | Object | No | Max load weight | |
| loads.weight.min.unit_code | String | “t” | No | Unit of load weight. Always is “t” (tonnes) |
| loads.weight.min.value | Float | 2.4 | No | Value of load weight (range 0.001 – 100000) |
| loads.width | Object | No | Load width | |
| loads.width.unit_code | String | “m” | No | Unit of load width. Always is “m” (meters) |
| loads.width.value | Float | 2.1 | No | Value of load width (range 0.01–10) |
| name | String | “Route Warszawa-Berlin 1” | Yes | Name of the route |
| requirements | Object | No | Vehicle requirements | |
| requirements.additional_requirements | Array of Strings | No | Additional vehicle requirements (see dictionary) | |
| requirements.capacity | Object | No | Vehicle capacity | |
| requirements.capacity.max | Object | No | Vehicle max capacity | |
| requirements.capacity.max.unit_code | String | “t” | No | Unit of max capacity. Always is “t” (tonnes) |
| requirements.capacity.max.value | Float | 24 | No | Value of vehicle max capacity |
| requirements.capacity.min | Object | No | Vehicle min capacity | |
| requirements.capacity.min.unit_code | String | “t” | No | Unit of min capacity. Always is “t” (tonnes) |
| requirements.capacity.min.value | Float | 20 | No | Value of vehicle min capacity |
| requirements.exemption_from_adr | Boolean | False | No | The load can be transported by carrier without ADR authorization. It occurs only for additional_requirements = adr. |
| requirements.freight_type | String | “FTL” | No | Type of freight. Available values: FTL, LTL, MULTI_FTL, null |
| requirements.height | Object | No | Vehicle height | |
| requirements.height.unit_code | String | “m” | No | Unit of vehicle height. Always is “m” (meters) |
| requirements.height.value | Float | 2.1 | No | Value of vehicle height |
| requirements.length | Object | No | Vehicle length | |
| requirements.length.unit_code | String | “m” | No | Unit of vehicle length. Always is “m” (meters) |
| requirements.length.value | Float | 3.4 | No | Value of vehicle length |
| requirements.required_adr_classes | Array of Strings | No | ADR freight classes (see dictionary) | |
| requirements.required_truck_bodies | Array of Strings | No | Expected vehicle body types matched to selected vehicle_size (see dictionary). Array can contains max 5 values. | |
| requirements.required_ways_of_loading | Array of Strings | No | The way of loading/unloading vehicle. Acceptable values: back, side, top. | |
| requirements.shipping_remarks | String | “description” | No | Additional shipping remarks |
| requirements.vehicle_size | String | “any_size” | No | Expected vehicle size (see dictionary). Default value is any_size. If you select any_size all 4 basic types of vehicle size are automatically selected. |
| requirements.volume | Object | No | Vehicle volume | |
| requirements.volume.unit_code | String | “m3” | No | Unit of vehicle volume. Always is “m3” (cubic meters) |
| requirements.volume.value | Float | 12.1 | No | Value of vehicle volume |
| requirements.width | Object | No | Vehicle width | |
| requirements.width.unit_code | String | “m” | No | Unit of vehicle width. Always is “m” (meters) |
| requirements.width.value | Float | 2.3 | No | Value of vehicle width |
| spots | Array of Objects | Yes | Collection of routes’ spots. One loading and one unloading will occur. | |
| spots.id | String | “21b4c767-8119–4938-8957-aeef320c4b2e” | No | Spot id |
| spots.name | String | “Wrocław home point” | No | Name of spot |
| spots.place | Object | Yes | Information related to single place on route | |
| spots.place.address | Object | Yes | Address of the selected point | |
| spots.place.address.country | String | “pl” | Yes | Country using ISO values (see dictionary) |
| spots.place.address.detailed_location_id | Int | 123456 | No | Detailed location id |
| spots.place.address.foreign_id | Int | null | No | Foreign address id |
| spots.place.address.locality | String | Wrocław | No | City name |
| spots.place.address.location_id | Int | 234567 | No | Location id |
| spots.place.address.number | String | “2–4” | No | Property number |
| spots.place.address.postal_code | String | “51–546” | No | Postal code |
| spots.place.address.radius | Float | null | No | Radius |
| spots.place.address.street | String | “Racławicka” | No | Street name |
| spots.place.coordinates | Object | No | Longitude and latitude for selected point | |
| spots.place.coordinates.latitude | Float | 53.35801 | No | Latitude of the point along the route |
| spots.place.coordinates.longitude | Float | -2.16539 | No | Longitude of the point along the route |
| spots.type | String | “loading” | Yes | Available values: loading, unloading |
Example Request Body
{
"if_send_to_carrier": true,
"name": "Route Warsaw - Marseille",
"spots": [
{
"name": "Warsaw Warehouse",
"type": "loading",
"place": {
"address": {
"country": "PL",
"locality": "Warsaw",
"postal_code": "00-001",
"street": "Main Street",
"number": "123"
},
"coordinates": {
"latitude": 52.2297,
"longitude": 21.0122
}
}
},
{
"type": "unloading",
"place": {
"address": {
"locality": "MARSYLIA",
"postal_code": "13014",
"country": "fr",
"street": "Boulevard Danielle Casanova",
"number": "151"
}
}
}
],
"requirements": {
"required_truck_bodies": [
"cooler",
"curtainsider" ],
"additional_requirements": [
"gps",
"hds"
],
"freight_type": "FTL",
"vehicle_size": "solo"
}
}Response Fields
| Attribute | Type | Example | Description |
| id | String | “b998d30b-502d-4a50-a423-aca69aa7a756” | Route id |
| loads | Array of Objects | Specification of loads parameters required on the route | |
| loads.amount | Int | 1 | Amount of load types within given load |
| loads.height | Object | Load height | |
| loads.height.unit_code | String | “m” | Unit of load height. Always is “m” (meters). |
| loads.height.value | Float | 2.3 | Value of load height (range 0.01–10) |
| loads.length | Object | Load length | |
| loads.length.unit_code | String | “m” | Unit of load length. Always is “m” (meters) |
| loads.length.value | Float | 1.2 | Value of load length (range 0.01–100) |
| loads.name | String | “Glass load” | Name of a load |
| loads.palletes | Object | Additional rules for pallets | |
| loads.palletes.is_exchangeable | Boolean | False | Determines if type of load is available for exchange at unloading place |
| loads.palletes.is_stackable | Boolean | False | Specifies whether the type of load allows stacking |
| loads.type_of_load | String | “europallete” | Supported load type (see dictionary) |
| loads.volume | Object | Load volume | |
| loads.volume.unit_code | String | “m3” | Unit of load volume. Always is “m3” |
| loads.volume.value | Float | 1.92 | Value of load volume (range 0.01–10000) |
| loads.weight | Object | Load weight | |
| loads.weight.max | Object | Min load weight | |
| loads.weight.max.unit_code | String | “t” | Unit of load weight. Always is “t” (tonnes) |
| loads.weight.max.value | Float | 2 | Value of load weight (range 0.001 – 100000) |
| loads.weight.min | Object | Max load weight | |
| loads.weight.min.unit_code | String | “t” | Unit of load weight. Always is “t” (tonnes) |
| loads.weight.min.value | Float | 2.4 | Value of load weight (range 0.001 – 100000) |
| loads.width | Object | Load width | |
| loads.width.unit_code | String | “m” | Unit of load width. Always is “m” (meters) |
| loads.width.value | Float | 2.1 | Value of load width (range 0.01–10) |
| name | String | “Route Warszawa-Berlin 1” | Name of the route |
| requirements | Object | Vehicle requirements | |
| requirements.additional_requirements | Array of Strings | Additional vehicle requirements (see dictionary) | |
| requirements.capacity | Object | Vehicle capacity | |
| requirements.capacity.max | Object | Vehicle max capacity | |
| requirements.capacity.max.unit_code | String | “t” | Unit of max capacity. Always is “t” (tonnes) |
| requirements.capacity.max.value | Float | 24 | Value of vehicle max capacity |
| requirements.capacity.min | Object | Vehicle min capacity | |
| requirements.capacity.min.unit_code | String | “t” | Unit of min capacity. Always is “t” (tonnes) |
| requirements.capacity.min.value | Float | 20 | Value of vehicle min capacity |
| requirements.exemption_from_adr | Boolean | False | The load can be transported by carrier without ADR authorization. It occurs only for additional_requirements = adr. |
| requirements.freight_type | String | “FTL” | Type of freight. Available values: FTL, LTL, MULTI_FTL, null |
| requirements.height | Object | Vehicle height | |
| requirements.height.unit_code | String | “m” | Unit of vehicle height. Always is “m” (meters) |
| requirements.height.value | Float | 2.1 | Value of vehicle height |
| requirements.length | Object | Vehicle length | |
| requirements.length.unit_code | String | “m” | Unit of vehicle length. Always is “m” (meters) |
| requirements.length.value | Float | 3.4 | Value of vehicle length |
| requirements.required_adr_classes | Array of Strings | ADR freight classes (see dictionary) | |
| requirements.required_truck_bodies | Array of Strings | Expected vehicle body types matched to selected vehicle_size (see dictionary). Array can contains max 5 values. | |
| requirements.required_ways_of_loading | Array of Strings | The way of loading/unloading vehicle. Acceptable values: back, side, top. | |
| requirements.shipping_remarks | String | “description” | Additional shipping remarks |
| requirements.vehicle_size | String | “any_size” | Expected vehicle size (see dictionary). Default value is any_size. If you select any_size all 4 basic types of vehicle size are automatically selected. |
| requirements.volume | Object | Vehicle volume | |
| requirements.volume.unit_code | String | “m3” | Unit of vehicle volume. Always is “m3” (cubic meters) |
| requirements.volume.value | Float | 12.1 | Value of vehicle volume |
| requirements.width | Object | Vehicle width | |
| requirements.width.unit_code | String | “m” | Unit of vehicle width. Always is “m” (meters) |
| requirements.width.value | Float | 2.3 | Value of vehicle width |
| spots | Array of Objects | Collection of routes’ spots. One loading and one unloading will occur. | |
| spots.id | String | “21b4c767-8119–4938-8957-aeef320c4b2e” | Spot id |
| spots.name | String | “Wrocław home point” | Name of spot |
| spots.place | Object | Information related to single place on route | |
| spots.place.address | Object | Address of the selected point | |
| spots.place.address.country | String | “pl” | Country using ISO values (see dictionary) |
| spots.place.address.detailed_location_id | Int | 123456 | Detailed location id |
| spots.place.address.foreign_id | Int | null | Foreign address id |
| spots.place.address.locality | String | Wrocław | City name |
| spots.place.address.location_id | Int | 234567 | Location id |
| spots.place.address.number | String | “2–4” | Property number |
| spots.place.address.postal_code | String | “51–546” | Postal code |
| spots.place.address.radius | Float | null | Radius |
| spots.place.address.street | String | “Racławicka” | Street name |
| spots.place.coordinates | Object | Longitude and latitude for selected point | |
| spots.place.coordinates.latitude | Float | 53.35801 | Latitude of the point along the route |
| spots.place.coordinates.longitude | Float | -2.16539 | Longitude of the point along the route |
| spots.type | String | “loading” | Available values: loading, unloading |
Response Body
{
"name": "Route Warsaw - Marseille",
"id": "98160bae-2555-4561-8838-441aca38214f",
"loads": [],
"requirements": {
"required_truck_bodies": [
"cooler",
"curtainsider"
],
"required_ways_of_loading": [],
"required_adr_classes": [],
"additional_requirements": [
"hds",
"gps"
],
"vehicle_size": "solo",
"freight_type": "FTL",
"shipping_remarks": null,
"width": {
"value": null,
"unit_code": null
},
"height": {
"value": null,
"unit_code": null
},
"length": {
"value": null,
"unit_code": null
},
"volume": {
"value": null,
"unit_code": null
},
"capacity": {
"max": {
"value": null,
"unit_code": null
}
}
},
"spots": [
{
"name": "Warsaw Warehouse",
"place": {
"address": {
"locality": "Warsaw",
"postal_code": "00-001",
"country": "pl",
"street": "Main Street",
"number": "123",
"location_id": null
},
"coordinates": {
"latitude": 52.2297,
"longitude": 21.0122
}
},
"type": "loading"
},
{
"name": null,
"place": {
"address": {
"locality": "MARSYLIA",
"postal_code": "13014",
"country": "fr",
"street": "Boulevard Danielle Casanova",
"number": "151",
"location_id": null
},
"coordinates": {
"latitude": null,
"longitude": null
}
},
"type": "unloading"
}
]
}Clients errors (code 400)
HTTP 4xx status codes indicate client errors, meaning that the request could not be processed due to an issue on the client side. Below is a list of request-specific errors.
Example error 1
No required ‘if_send_to_carrier’ field
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Unprocessable Entity",
"status": 422,
"detail": "Failed Validation",
"validation_messages": {
"if_send_to_carrier": {
"isBoolean": "if_send_to_carrier must be a boolean value"
}
},
"service_code": 5404
}Example error 2
Invalid route id
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Not Found",
"status": 404,
"detail": "Contracted route with ID: 2f13c8bd-2160-4ea6-a7e5-6929b5eb2692 not found!",
"service_code": 5404
}