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 list order, the “sortBy” parameter should be sent
- To download the list containing archive freights in the request, send the parameter “archive”
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.
Url parameters and connection settings
- URL: https://api.platform.trans.eu
- Endpoint: /ext/freights-api/v1/freights
- 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
- status (?filter={“status”:“in_progress”})
- publication_type (?filter={“publication_type”:[“companies”]})
- truck body type ( ?filter={“truck_body_type”:“cooler”} )
- loading place ( ?filter={“loading_place”:{“country”:“nl”,“postal_code”:“1012”}} )
- unloading place ( ?filter={“unloading_place”:{“country”:“pl”,“postal_code”:“31”}} )
- loading date ( ?filter={“loading_date”:{“start_date”:“2021–02-02”,“end_date”:“2021–02-03”}} )
- unloading date ( ?filter={“unloading_date”:{“start_date”:“2021–02-02”,“end_date”:“2021–02-03”}} )
Sort by
- status ( ?sortBy=status )
- loading date ( ?sortBy=loading_date )
- unloading date ( ?sortBy=unloading_date )
- creation 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"
}
]