Get freights list

This method allows you to down­load a list of freight cre­at­ed using the API and cre­at­ed by users of the Trans.eu Plat­form under the same cus­tomer (com­pa­ny) account.

The most recent 90 items are returned. It is also pos­si­ble to apply fil­ters that allow you to down­load the list accord­ing to the spec­i­fied cri­te­ria. By call­ing the method, we can also spec­i­fy fields from the list to be returned as a result of the query.

Those freights ori­gin from Freights sent mod­ule.

Possible query modifiers:

  • To spec­i­fy fil­ters when retriev­ing the freight list, send the fil­ter para­me­ter in the request
  • To spec­i­fy the list order, the “sort­By” para­me­ter should be sent
  • To down­load the list con­tain­ing archive freights in the request, send the para­me­ter “archive”

Authorization and access

Autho­riza­tion process is described here. Each API request must also con­sist of unique Api-key obtained dur­ing appli­ca­tion reg­is­tra­tion togeth­er with client_id and client_secret.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ex­t/freights-api/v1/freights
  • Http Method: GET

Headers

  • Accept: application/json
  • Con­tent-type: application/json
  • Autho­riza­tion: Bear­er {access_token}
  • Api-key: {unique_ap­p_api-key}

Freight information available using a list

List of freights con­sists of lim­it­ed infor­ma­tion, to make freight man­age­ment more data effi­cient:

  • id
  • cre­ation date
  • pub­li­ca­tion infor­ma­tion
  • freight sta­tus
  • exter­nal iden­ti­fi­ca­tion num­ber
  • ftl/ltl infor­ma­tion
  • array of allowed truck bod­ies
  • load­ing and unload­ing (first and last spot if freight con­sists of more than two spots)
    • loca­tion
    • oper­a­tions

Available filters

List of avail­able fil­ters

  • sta­tus (?filter={“status”:“in_progress”})
  • publication_type (?filter={“publication_type”:[“companies”]})
  • truck body type ( ?filter={“truck_body_type”:“cooler”} )
  • load­ing place ( ?filter={“loading_place”:{“country”:“nl”,“postal_code”:“1012”}} )
  • unload­ing place ( ?filter={“unloading_place”:{“country”:“pl”,“postal_code”:“31”}} )
  • load­ing date ( ?filter={“loading_date”:{“start_date”:“2021–02-02”,“end_date”:“2021–02-03”}} )
  • unload­ing date ( ?filter={“unloading_date”:{“start_date”:“2021–02-02”,“end_date”:“2021–02-03”}} )

Sort by

  • sta­tus ( ?sortBy=status )
  • load­ing date ( ?sortBy=loading_date )
  • unload­ing date ( ?sortBy=unloading_date )
  • cre­ation date ( ?sortBy=created_at )

Json response example

[
  {
    "contact_employees": [
      {
        "last_name": "Testowy",
        "name": "Jan",
        "trans_id": "111111-1"
      }
    ],
    "created": "2021-02-02T09:58:48+01:00",
    "ftl": true,
    "id": 590881,
    "loading": {
      "coordinates": {
        "latitude": 52.23019,
        "longitude": 21.01001
      },
      "place": {
        "country": "pl",
        "locality": "Warszawa",
        "postal_code": "00-001"
      },
      "timespans": {
        "begin": "2021-02-11T00:00:00+01:00",
        "end": "2021-02-11T00:30:00+01:00"
      }
    },
    "publication": {
      "end_reason": null,
      "id": 499999,
      "price": {
        "currency": "eur",
        "period": {
          "days": 5,
          "payment": "deferred"
        },
        "value": 123
      },
      "publish_date": "2021-02-02T09:58:48+01:00",
      "publish_type": "companies",
      "received_offers": null,
      "refresh_from": null,
      "sent_offers": 1,
      "smart_match_offers": null,
      "status": "active"
    },
    "reference_number": "FR/2021/02/02/XHUX",
    "shipment_external_id": null,
    "status": "in_progress",
    "truck_bodies": [
      "cooler"
    ],
    "unloading": {
      "coordinates": {
        "latitude": 52.58216,
        "longitude": 12.99756
      },
      "place": {
        "country": "de",
        "locality": "Brieselang",
        "postal_code": "09000"
      },
      "timespans": {
        "begin": "2021-02-12T02:00:00+01:00",
        "end": "2021-02-13T02:00:00+01:00"
      }
    },
    "vehicle_size": "any_size"
  },
  {
    "next_freight": "next_freight"
  }
]