Update a route

Updat­ing active route.

Updates on the route spots, vehi­cle require­ments and expect­ed load para­me­ters are avail­able.
Updat­ing route over­writes com­plete­ly the route. If any val­ue is not set and allowed as null, it will be con­sid­ered as null val­ue and over­writ­ten.

The route-id iden­ti­fi­ca­tion num­ber in request can be obtained when cre­at­ing the route or by down­load­ing the routes list.

POST
/ext/contracts-api/v1/routes/{route-id}
Request Authorization

Every request MUST include a valid access token obtained dur­ing the user autho­riza­tion process, pro­vid­ed using the Bear­er token scheme in the Autho­riza­tion head­er.

Successful 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
AttributeTypeExam­pleManda­to­ryDescrip­tion
if_send_to_carrierBooleanTrueYesIf the terms of coop­er­a­tion on this route have already been sent to car­ri­ers for nego­ti­a­tion, an update of the route para­me­ters entered in this request is sent to car­ri­ers
loadsArray of ObjectsNoSpec­i­fi­ca­tion of loads para­me­ters required on the route
loads.amountInt1NoAmount of load types with­in giv­en load
loads.heightObjectNoLoad height
loads.height.unit_codeString“m”NoUnit of load height. Always is “m” (meters).
loads.height.valueFloat2.3NoVal­ue of load height (range 0.01–10)
loads.lengthObjectNoLoad length
loads.length.unit_codeString“m”NoUnit of load length. Always is “m” (meters)
loads.length.valueFloat1.2NoVal­ue of load length (range 0.01–100)
loads.nameString“Glass load”NoName of a load
loads.palletesObjectNoAddi­tion­al rules for pal­lets
loads.palletes.is_exchangeableBooleanFalseNoDeter­mines if type of load is avail­able for exchange at unload­ing place
loads.palletes.is_stackableBooleanFalseNoSpec­i­fies whether the type of load allows stack­ing
loads.type_of_loadString“europal­lete”NoSup­port­ed load type (see dic­tio­nary)
loads.volumeObjectNoLoad vol­ume
loads.volume.unit_codeString“m3”NoUnit of load vol­ume. Always is “m3”
loads.volume.valueFloat1.92NoVal­ue of load vol­ume (range 0.01–10000)
loads.weightObjectNoLoad weight
loads.weight.maxObjectNoMin load weight
loads.weight.max.unit_codeString“t”NoUnit of load weight. Always is “t” (tonnes)
loads.weight.max.valueFloat2NoVal­ue of load weight (range 0.001 – 100000)
loads.weight.minObjectNoMax load weight
loads.weight.min.unit_codeString“t”NoUnit of load weight. Always is “t” (tonnes)
loads.weight.min.valueFloat2.4NoVal­ue of load weight (range 0.001 – 100000)
loads.widthObjectNoLoad width
loads.width.unit_codeString“m”NoUnit of load width. Always is “m” (meters)
loads.width.valueFloat2.1NoVal­ue of load width (range 0.01–10)
nameString“Route Warsza­wa-Berlin 1”YesName of the route
require­mentsObjectNoVehi­cle require­ments
requirements.additional_requirementsArray of StringsNoAddi­tion­al vehi­cle require­ments (see dic­tio­nary)
requirements.capacityObjectNoVehi­cle capac­i­ty
requirements.capacity.maxObjectNoVehi­cle max capac­i­ty
requirements.capacity.max.unit_codeString“t”NoUnit of max capac­i­ty. Always is “t” (tonnes)
requirements.capacity.max.valueFloat24NoVal­ue of vehi­cle max capac­i­ty
requirements.capacity.minObjectNoVehi­cle min capac­i­ty
requirements.capacity.min.unit_codeString“t”NoUnit of min capac­i­ty. Always is “t” (tonnes)
requirements.capacity.min.valueFloat20NoVal­ue of vehi­cle min capac­i­ty
requirements.exemption_from_adrBooleanFalseNoThe load can be trans­port­ed by car­ri­er with­out ADR autho­riza­tion. It occurs only for additional_requirements adr.
requirements.freight_typeString“FTL”NoType of freight. Avail­able val­ues: FTL, LTL, MULTI_FTL, null
requirements.heightObjectNoVehi­cle height
requirements.height.unit_codeString“m”NoUnit of vehi­cle height. Always is “m” (meters)
requirements.height.valueFloat2.1NoVal­ue of vehi­cle height
requirements.lengthObjectNoVehi­cle length
requirements.length.unit_codeString“m”NoUnit of vehi­cle length. Always is “m” (meters)
requirements.length.valueFloat3.4NoVal­ue of vehi­cle length
requirements.required_adr_classesArray of StringsNoADR freight class­es (see dic­tio­nary)
requirements.required_truck_bodiesArray of StringsNoExpect­ed vehi­cle body types matched to select­ed vehicle_size (see dic­tio­nary). Array can con­tains max 5 val­ues.
requirements.required_ways_of_loadingArray of StringsNoThe way of loading/unloading vehi­cle. Accept­able val­ues: backsidetop.
requirements.shipping_remarksString“descrip­tion”NoAddi­tion­al ship­ping remarks
requirements.vehicle_sizeString“any_size”NoExpect­ed vehi­cle size (see dic­tio­nary). Default val­ue is any_size. If you select any_size all 4 basic types of vehi­cle size are auto­mat­i­cal­ly select­ed.
requirements.volumeObjectNoVehi­cle vol­ume
requirements.volume.unit_codeString“m3”NoUnit of vehi­cle vol­ume. Always is “m3” (cubic meters)
requirements.volume.valueFloat12.1NoVal­ue of vehi­cle vol­ume
requirements.widthObjectNoVehi­cle width
requirements.width.unit_codeString“m”NoUnit of vehi­cle width. Always is “m” (meters)
requirements.width.valueFloat2.3NoVal­ue of vehi­cle width
spotsArray of ObjectsYesCol­lec­tion of routes’ spots. One load­ing and one unload­ing will occur.
spots.idString“21b4c767-8119–4938-8957-aeef320c4b2e”NoSpot id
spots.nameString“Wrocław home point”NoName of spot
spots.placeObjectYesInfor­ma­tion relat­ed to sin­gle place on route
spots.place.addressObjectYesAddress of the select­ed point
spots.place.address.countryString“pl”YesCoun­try using ISO val­ues (see dic­tio­nary)
spots.place.address.detailed_location_idInt123456NoDetailed loca­tion id
spots.place.address.foreign_idIntnullNoFor­eign address id
spots.place.address.localityStringWrocławNoCity name
spots.place.address.location_idInt234567NoLoca­tion id
spots.place.address.numberString“2–4”NoProp­er­ty num­ber
spots.place.address.postal_codeString“51–546”NoPostal code
spots.place.address.radiusFloatnullNoRadius
spots.place.address.streetString“Racław­ic­ka”NoStreet name
spots.place.coordinatesObjectNoLon­gi­tude and lat­i­tude for select­ed point
spots.place.coordinates.latitudeFloat53.35801NoLat­i­tude of the point along the route
spots.place.coordinates.longitudeFloat-2.16539NoLon­gi­tude of the point along the route
spots.typeString“load­ing”YesAvail­able val­ues: 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
AttributeTypeExam­pleDescrip­tion
idString“b998d30b-502d-4a50-a423-aca69aa7a756”Route id
loadsArray of ObjectsSpec­i­fi­ca­tion of loads para­me­ters required on the route
loads.amountInt1Amount of load types with­in giv­en load
loads.heightObjectLoad height
loads.height.unit_codeString“m”Unit of load height. Always is “m” (meters).
loads.height.valueFloat2.3Val­ue of load height (range 0.01–10)
loads.lengthObjectLoad length
loads.length.unit_codeString“m”Unit of load length. Always is “m” (meters)
loads.length.valueFloat1.2Val­ue of load length (range 0.01–100)
loads.nameString“Glass load”Name of a load
loads.palletesObjectAddi­tion­al rules for pal­lets
loads.palletes.is_exchangeableBooleanFalseDeter­mines if type of load is avail­able for exchange at unload­ing place
loads.palletes.is_stackableBooleanFalseSpec­i­fies whether the type of load allows stack­ing
loads.type_of_loadString“europal­lete”Sup­port­ed load type (see dic­tio­nary)
loads.volumeObjectLoad vol­ume
loads.volume.unit_codeString“m3”Unit of load vol­ume. Always is “m3”
loads.volume.valueFloat1.92Val­ue of load vol­ume (range 0.01–10000)
loads.weightObjectLoad weight
loads.weight.maxObjectMin load weight
loads.weight.max.unit_codeString“t”Unit of load weight. Always is “t” (tonnes)
loads.weight.max.valueFloat2Val­ue of load weight (range 0.001 – 100000)
loads.weight.minObjectMax load weight
loads.weight.min.unit_codeString“t”Unit of load weight. Always is “t” (tonnes)
loads.weight.min.valueFloat2.4Val­ue of load weight (range 0.001 – 100000)
loads.widthObjectLoad width
loads.width.unit_codeString“m”Unit of load width. Always is “m” (meters)
loads.width.valueFloat2.1Val­ue of load width (range 0.01–10)
nameString“Route Warsza­wa-Berlin 1”Name of the route
require­mentsObjectVehi­cle require­ments
requirements.additional_requirementsArray of StringsAddi­tion­al vehi­cle require­ments (see dic­tio­nary)
requirements.capacityObjectVehi­cle capac­i­ty
requirements.capacity.maxObjectVehi­cle max capac­i­ty
requirements.capacity.max.unit_codeString“t”Unit of max capac­i­ty. Always is “t” (tonnes)
requirements.capacity.max.valueFloat24Val­ue of vehi­cle max capac­i­ty
requirements.capacity.minObjectVehi­cle min capac­i­ty
requirements.capacity.min.unit_codeString“t”Unit of min capac­i­ty. Always is “t” (tonnes)
requirements.capacity.min.valueFloat20Val­ue of vehi­cle min capac­i­ty
requirements.exemption_from_adrBooleanFalseThe load can be trans­port­ed by car­ri­er with­out ADR autho­riza­tion. It occurs only for additional_requirements adr.
requirements.freight_typeString“FTL”Type of freight. Avail­able val­ues: FTL, LTL, MULTI_FTL, null
requirements.heightObjectVehi­cle height
requirements.height.unit_codeString“m”Unit of vehi­cle height. Always is “m” (meters)
requirements.height.valueFloat2.1Val­ue of vehi­cle height
requirements.lengthObjectVehi­cle length
requirements.length.unit_codeString“m”Unit of vehi­cle length. Always is “m” (meters)
requirements.length.valueFloat3.4Val­ue of vehi­cle length
requirements.required_adr_classesArray of StringsADR freight class­es (see dic­tio­nary)
requirements.required_truck_bodiesArray of StringsExpect­ed vehi­cle body types matched to select­ed vehicle_size (see dic­tio­nary). Array can con­tains max 5 val­ues.
requirements.required_ways_of_loadingArray of StringsThe way of loading/unloading vehi­cle. Accept­able val­ues: backsidetop.
requirements.shipping_remarksString“descrip­tion”Addi­tion­al ship­ping remarks
requirements.vehicle_sizeString“any_size”Expect­ed vehi­cle size (see dic­tio­nary). Default val­ue is any_size. If you select any_size all 4 basic types of vehi­cle size are auto­mat­i­cal­ly select­ed.
requirements.volumeObjectVehi­cle vol­ume
requirements.volume.unit_codeString“m3”Unit of vehi­cle vol­ume. Always is “m3” (cubic meters)
requirements.volume.valueFloat12.1Val­ue of vehi­cle vol­ume
requirements.widthObjectVehi­cle width
requirements.width.unit_codeString“m”Unit of vehi­cle width. Always is “m” (meters)
requirements.width.valueFloat2.3Val­ue of vehi­cle width
spotsArray of ObjectsCol­lec­tion of routes’ spots. One load­ing and one unload­ing will occur.
spots.idString“21b4c767-8119–4938-8957-aeef320c4b2e”Spot id
spots.nameString“Wrocław home point”Name of spot
spots.placeObjectInfor­ma­tion relat­ed to sin­gle place on route
spots.place.addressObjectAddress of the select­ed point
spots.place.address.countryString“pl”Coun­try using ISO val­ues (see dic­tio­nary)
spots.place.address.detailed_location_idInt123456Detailed loca­tion id
spots.place.address.foreign_idIntnullFor­eign address id
spots.place.address.localityStringWrocławCity name
spots.place.address.location_idInt234567Loca­tion id
spots.place.address.numberString“2–4”Prop­er­ty num­ber
spots.place.address.postal_codeString“51–546”Postal code
spots.place.address.radiusFloatnullRadius
spots.place.address.streetString“Racław­ic­ka”Street name
spots.place.coordinatesObjectLon­gi­tude and lat­i­tude for select­ed point
spots.place.coordinates.latitudeFloat53.35801Lat­i­tude of the point along the route
spots.place.coordinates.longitudeFloat-2.16539Lon­gi­tude of the point along the route
spots.typeString“load­ing”Avail­able val­ues: 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 sta­tus codes indi­cate client errors, mean­ing that the request could not be processed due to an issue on the client side. Below is a list of request-spe­cif­ic 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
}