Create new vehicle offer for vehicle exchange

Important: Some values included in vehicles exchange API will change.

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.

Important: for accessing freights API no additional scopes are set, therefore the scope parameter can be left empty.


Vehicle offer request

Example of request for creating new vehicle offer. For allowed values please look here.

{
  "loading_place": {
    "address": {
      "country": "de",
      "locality": "Düsterntal",
      "postal_code": "31073",
      "street": null
    },
    "coordinates": {
      "latitude": 51.9216,
      "longitude": 9.81752
    }
  },
  "size": "any_size",
  "truck_body": "cooler",
  "unloading_place": {
    "address": {
      "country": "pt",
      "locality": "Terra Nova",
      "postal_code": "4820-09",
      "street": null
    },
    "coordinates": {
      "latitude": 41.519,
      "longitude": -8.323
    }
  },
  "cargo": {
    "capacity": {
      "unit_code": "TNE",
      "value": 764
    },
    "height": {
      "unit_code": "MTR",
      "value": 621
    },
    "length": {
      "unit_code": "MTR",
      "value": 793
    },
    "loading_meters": {
      "unit_code": "MTR",
      "value": 793
    },
    "volume": {
      "unit_code": "MTQ",
      "value": 7
    },
    "width": null
  },
  "available_on": {
    "begin": "2020-04-03T10:20:03+00:00",
    "end": "2020-04-13T10:20:03+00:00"
  },
  "equipment": [
    "lift"
  ],
  "has_adr": false,
  "available_ways_of_loading": [
    "top",
    "back",
    "side"
  ],
  "adr_classes": []
}

Response

Confirmation of properly created offer

{
    "id": "01E4WTST4JK6HT6SZD8PDY7BDS",
    "_links": {
        "self": {
            "href": "https://service.exchange.query:3000/api/rest/v1/vehicle-offers?filter={}&page=1"
        }
    }
}