This method allows you to download a list of freight created using the API and created by users of the Trans.eu Platform under the same customer (company) account.The most recent 90 items are returned. It is also possible to apply filters that allow you to download the list according to the specified criteria. By calling the method, we can also specify fields from the list to be returned as a result of the query.

Those freights origin from Freights sent module.

Possible query modifiers:

  • To specify filters when retrieving the freight list, send the filter parameter in the request
  • To specify the fields returned in the request, the “fields” parameter should be sent
  • To download the list containing archive freight in the request, send the parameter “archive”

Authorization

Authorization process is described here.

For accessing freights API no additional scopes are set, therefore the scope parameter can be left empty.

Query parameters

  • URL: https://api.platform.trans.eu
  • Endpoint: /ext/freights-api/freights
  • Http Method: GET

Headers

  • Accept: application/json
  • Content-type: application/json
  • Authorization: Bearer {access_token}

Freight information available using a list

List of freights consists of limited information, to make freight management more data efficient.

  • id
  • creation date
  • publication information
  • freight status
  • external identification number
  • ftl/ltl information
  • array of allowed truck bodies
  • loading and unloading (first and last spot if freight consists of more than two spots)
    • location
    • operations

Available filters

List of available filters

  • status
  • publication_type
  • truck body type ( ?filter={“truck_body_type”:”cooler”} )
  • loading place ( ?filter={“loading_place”:{“country”:”44_netherlands”,”postal_code”:”1012″}} )
  • unloading place ( ?filter={“unloading_place”:{“country”:”47_poland”,”postal_code”:”31″}} )
  • loading date ( ?filter={“loading_date”:{“start_date”:”2020-03-13″,”end_date”:”2020-03-14″}} )
  • unloading date ( ?filter={“unloading_date”:{“start_date”:”2020-03-15″,”end_date”:”2020-03-16″}} )

Sort by

  • status ( ?sortBy=status )
  • loading date ( ?sortBy=loadingDate )
  • unloading date ( ?sortBy=unloadingDate )
  • creation date ( ?sortBy=createdAt )

Json response example

[
    {
        "id": 1234567,
        "shipment_external_id": null,
        "status": "new",
        "created": "2020-02-04T12:56:03+01:00",
        "ftl": false,
        "publication": null,
        "truck_bodies": [
            "curtainsider"
        ],
        "loading": {
            "place": {
                "country": "pl",
                "locality": "Wroclaw",
                "postal_code": "12345"
            },
            "timespans": {
                "begin": "2020-02-28T17:00:00+01:00",
                "end": "2020-02-28T17:00:00+01:00"
            }
        },
        "unloading": {
            "place": {
                "country": "de",
                "locality": "N├╝rnberg",
                "postal_code": "09876"
            },
            "timespans": {
                "begin": "2020-02-29T08:00:00+01:00",
                "end": "2020-02-29T08:00:00+01:00"
            }
        }
    },
    {
       //next freight
    }
}