Description of adding a freight for selected companies, without declaring the freight price.
Scenario
- carrier is yet to be determined
- carrier’s TransId is available in external TMS
- price was not given
- carrier is using Trans.eu Platform only, with no additional freight management software involved
- both freight forwarder and carriers have existing and valid Trans.eu account
- price negotiation process is available from the external app
Authorize access
Before it is possible to send any request, user needs to authorize access.
- client app was registered using registration form
- external app was granted api keys (client_id and client_secret)
- authorization process has been implemented in external app
Create new freight
Each freight must consist of:
- array of carriers’ ids
- loading location and time
- unloading location and time
- required truck body type
- summary of freight’s loads weight
- ftl/ltl parameter
Diagram
Request
To create new freight for selected companies, there should be send freight to companies publication method used.
POST https://api.platform.trans.eu/ext/freights-api/v1/freight-companies
Request example:
Example freight posting request:
{
"capacity": 12,
"requirements": {
"is_ftl": false,
"required_truck_bodies": [
"curtainsider"
],
"loads": []
},
"carriers": [
{
"company_id": 10
}
],
"spots": [
{
"spot_order": 1,
"place": {
"address": {
"country": "PL",
"postal_code": "12345",
"locality": "Wroclaw"
}
},
"operations": [
{
"timespans": {
"begin": "2021-02-03T13:00:00+0100",
"end": "2021-02-03T14:00:00+0100"
},
"type": "loading",
"operation_order": 1,
"loads": []
}
]
},
{
"spot_order": 2,
"place": {
"address": {
"country": "DE",
"postal_code": "09876",
"locality": "Nürnberg"
}
},
"operations": [
{
"timespans": {
"begin": "2021-02-04T08:00:00+0100",
"end": "2021-02-04T08:00:00+0100"
},
"type": "unloading",
"operation_order": 1,
"loads": []
}
]
}
],
"publish": true
}
Response
Each carrier might respond with price conditions acceptance. Directly after freight publication there will be an empty array of offers received using:
https://api.platform.tran.eu/ext/freights-api/v1/freights/:freightId/offers
Once offer is sent by carrier, it will fill out this array, for example:
[
{
"company_id": 1111111,
"created_at": "2021-07-23T13:25:02+02:00",
"freight_id": 820262,
"id": 1892813,
"legal_name": "Firma Testowa Przewoźnik",
"price": {
"currency": "eur",
"value": 130
},
"status": "waiting_for_accept",
"trans_id": "1111111-1",
"vat_id": "1111111111",
"version": 3
}
]
Conditions:
- each offer has own unique id
- each carrier is allowed to send one offer
- each offer can be responded to