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.
Url parameters and connection settings
- 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:
- id
- reference number
- creation date
- archivization date
- publication information
- freight status
- external identification number
- ftl/ltl information
- array of allowed truck bodies
- vehicle size
- 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)
- archiving date (?sortBy=archived_at)
- loading date (?sortBy=loading_date)
- unloading date (?sortBy=unloading_date)
- creation date (?sortBy=created_at)
Response example
[
{
"archived_at": "2021-02-05T11:21:33+01:00",
"created": "2021-02-05T11:18:22+01:00",
"ftl": false,
"id": 593651,
"loading": {
"coordinates": {
"latitude": null,
"longitude": null
},
"place": {
"country": "pl",
"locality": "Wroclaw",
"postal_code": "12345"
},
"timespans": {
"begin": "2021-02-08T11:18:20+01:00",
"end": "2021-02-08T13:18:20+01:00"
}
},
"publication": {
"end_reason": "accepted",
"id": 502505,
"is_proposal_request_exists": false,
"is_quick_pay": false,
"is_recommended": false,
"price": {
"currency": "eur",
"period": {
"days": 5,
"payment": "deferred"
},
"value": 110
},
"publish_date": "2021-02-05T11:18:22+01:00",
"publish_type": "companies",
"received_offers": 1,
"refresh_from": null,
"sent_offers": 1,
"smart_match_offers": null,
"status": "finished",
"stock_id": null
},
"reference_number": "FR/2021/02/05/X7G5",
"shipment_external_id": null,
"status": "accepted",
"truck_bodies": [
"curtainsider"
],
"unloading": {
"coordinates": {
"latitude": null,
"longitude": null
},
"place": {
"country": "de",
"locality": "Nürnberg",
"postal_code": "09876"
},
"timespans": {
"begin": "2021-02-11T11:18:20+01:00",
"end": "2021-02-11T13:18:20+01:00"
}
},
"vehicle_size": "any_size"
},
{
"next_freight": "next_freight"
}
]