Create new vehicle offer for vehicle exchange
Description
Vehicle exchange API gives information about the availability of your vehicle fleet to other platform users who are looking for transport between the given locations. Vehicle offers are also one of the sources of vehicle availability for the smartmatch algorithm. Each vehicle offer is always visible to all platform users once it was created.
Using this API it is also possible to get all own vehicle offers.
Url parameters and connection settings
- URL: https://api.platform.trans.eu
- Endpoint: /ext/vehicles-api/v1/vehicles
- Method: POST
Headers
- Content-type: application/json
- Accept: application/json
- Authorization: Bearer {access_token}
- Api-key: {unique_app_api-key}
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.
Vehicle offer request
Example of request for creating new vehicle offer. For allowed values please look here.
{
"vehicle_size": "bus",
"truck_body": "standard-tent",
"loading_place": {
"address": {
"locality": "Wroclaw",
"postal_code": "56-111",
"country": "pl"
}
},
"unloading_place": {
"address": {
"locality": "Wroclaw",
"postal_code": "56-111",
"country": "pl"
}
},
"cargo": {
"capacity": 5
},
"available_on": {
"begin": "2021-03-09T15:25:00+0000",
"end": "2021-03-09T19:25:00+0000"
}
}
Response
Confirmation of properly created offer
{
"id": "01E4WTST4JK6HT6SZD8PDY7BDS"
}