Description of adding a freight to companies chosen by recommendation algorithm, with declaring the freight price.
Scenario
- carrier is yet to be determined
- price and currency was 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
- carrier has to meet specified criteria
- the carrier does not yet belong to the group of contractors
Diagram
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
In order to send freight proposals to carriers tailored to its criteria, the publication method using the smartmatch algorithm must be used.
Each freight must consist of:
- loading location and time
- unloading location and time
- required truck body type
- summary of freight’s loads weight
- ftl/ltl parameter
- price and currency
Endpoint:
(POST) https://api.platform.trans.eu/ext/freights-api/v1/freight-smartmatch
Request example:
Example of smart match freight posting request:
{ "capacity": 12, "requirements": { "is_ftl": false, "required_truck_bodies": [ "curtainsider" ], "loads": [] }, "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 example:
{ "accepted_price": null, "capacity": 12, "carrier": null, "id": 592018, "loading_meters": null, "loads": [], "publication_price": null, "reference_number": "FR/2021/02/03/X64K", "requirements": { "is_ftl": false, "other_requirements": [], "required_adr_classes": [], "required_truck_bodies": [ "curtainsider" ], "required_ways_of_loading": [], "shipping_remarks": null, "temperature": { "max": null, "min": null }, "vehicle_size": "any_size" }, "shipment_external_id": null, "spots": [ { "description": null, "name": null, "operations": [ { "loads": [], "operation_order": 1, "timespans": { "begin": "2021-02-03T13:00:00+01:00", "end": "2021-02-03T14:00:00+01:00" }, "type": "loading" } ], "place": { "address": { "country": "PL", "description": null, "locality": "Wroclaw", "number": null, "postal_code": "12345", "street": null }, "coordinates": { "latitude": null, "longitude": null } }, "spot_order": 1 }, { "description": null, "name": null, "operations": [ { "loads": [], "operation_order": 1, "timespans": { "begin": "2021-02-04T08:00:00+01:00", "end": "2021-02-04T08:00:00+01:00" }, "type": "unloading" } ], "place": { "address": { "country": "DE", "description": null, "locality": "Nürnberg", "number": null, "postal_code": "09876", "street": null }, "coordinates": { "latitude": null, "longitude": null } }, "spot_order": 2 } ], "status": "new" }
Receive offers
Each response for freight publication can be accessed using API. To find out which carriers responded send the request below:
(GET) https://api.platform.trans.eu/ext/freights-api/v1/freights/{freight-id}/offers
If there is no response, you will receive an empty array.
If responses have been sent, there will be an array, which consists of each response.
How to get freight offers is described here.
Negotiation
It possible to accept, reject or negotiate received price conditions
Accept:
https://api.platform.trans.eu/ext/freights-api/v1/freights/offers/{offer-id}/accept
Payload for freight acceptance:
{ "version" : 3}
Reject:
https://api.platform.trans.eu/ext/freights-api/v1/freights/offers/{offer-id}/reject
Negotiate:
https://api.platform.trans.eu/ext/freights-api/v1/freights/offers/{offer-id}/negotiate
Payload for freight negotiation:
{ "payment": { "price": { "value": 150 } }, "version": 2 }