This method allows you to get a list of archived freights, created both using the API and created by users of the Trans.eu Platform under the same customer (company) account. It is possible to apply filters that allow you to download the list according to the specified criteria. By calling the method, it is also possible to specify fields from the list to be returned as a result of the query.

Those freights origin from Freights sent module.

Available 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

Authorization and access

Authorization process is described here. Each API request must also consist of unique Api-key obtained during application registration together with client_id and client_secret.

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/v1/archive
  • HTTP Method: GET

Headers

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

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

  • 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 )
  • archivization date ( ?sortBy=archivedAt )
  • loading date ( ?sortBy=loadingDate )
  • unloading date ( ?sortBy=unloadingDate )
  • creation date ( ?sortBy=createdAt )

Response example

[
    {
        "id": 1234567,
        "shipment_external_id": null,
        "status": "closed",
        "created": "2020-02-04T12:56:03+01:00",
        "ftl": false,
        "publication":  {
           "id": 255935,
           "is_proposal_request_exists": false,
           "is_quick_pay": false,
           "is_recommended": false,
           "period": {
               "days": null,
               "payment": null
           },
         "price": {
      "currency": "eur",
      "value": 666
    },
    "publish_type": "recommended",
    "received_offers": null,
    "refresh_from": null,
    "sent_offers": null,
    "smart_match_offers": null,
    "status": "finished",
    "stock_id": 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
    }
}