Shipment of one load from point A to point B

Scenario

  • One defined load – 10t
  • One loading place
  • One unloading place

Authorize access

Before it is possible to send any request, user needs to authorize access.

  • client app was registered using registration form
  • external app was granted api keys (client_id and client_secret)
  • authorization process has been implemented in external app

Create new freight

Each freight must consist of:

  • load definition
  • loading location and time
  • unloading location and time
  • load reference in loading and unloading points
  • required truck body type
  • summary of freight’s loads weight
  • ftl/ltl parameter

Request

To create new freight for selected companies, there should be send freight to companies publication method used.

(POST) https://api.platform.trans.eu/ext/freights-api/v1/freights

Request example: 

Example of transport order posting request:

{
  "payment": {
    "price": {
      "value": 123,
      "currency": "eur"
    }
  },
  "capacity": 10,
  "exchange_recipients": "carriers",
  "requirements": {
    "is_ftl": false,
    "required_truck_bodies": [
      "cooler"
    ]
  },
  "spots": [
    {
      "spot_order": 1,
      "place": {
        "address": {
          "country": "fr",
          "postal_code": "11111",
          "locality": "null"
        },
        "coordinates": {
          "latitude": 49.8056,
          "longitude": 12.1881
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-06-25T09:00:00+01:00",
            "end": "2020-06-25T09:00:00+01:00"
          },
          "type": "loading",
          "operation_order": 1,
          "loads": [{
                   "load_id": "L1",
                   "weight" : 10
               }]
        }
      ]
    },
    {
      "spot_order": 2,
      "place": {
        "address": {
          "country": "lt",
          "postal_code": "22222",
          "locality": "City"
        },
        "coordinates": {
          "latitude": null,
          "longitude": null
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-06-26T09:00:00+01:00",
            "end": "2020-06-26T09:00:00+01:00"
          },
          "type": "unloading",
          "operation_order": 1,
          "loads": [{
                   "load_id": "L1",
                   "weight" : 10
               }]
        }
      ]
    }
  ],
  "loads": [
    {
      "name": "example",
      "description": "Example description",
      "load_id": "L1",
      "type_of_load": "palette",
      "weight": 10,
      "height": 1,
      "length": 1,
      "volume": 1,
      "amount": 1,
      "is_stackable": false,
      "is_exchangeable": false
    }
  ],
  "publish": true
}

Response

Each carrier might respond with price conditions acceptance. Directly after freight publication there will be an empty array of offers received using:

https://api.platform.trans.eu/ext/freights-api/v1/

Conditions:

  • first operation has to be loading, the last one unloading
  • the sum of the loads must be equal to the sum of unloads