Create new vehicle exchange offer

Cre­ate new vehi­cle offer for vehi­cle exchange

Description

Vehi­cle exchange API gives infor­ma­tion about the avail­abil­i­ty of your vehi­cle fleet to oth­er plat­form users who are look­ing for trans­port between the giv­en loca­tions. Vehi­cle offers are also one of the sources of vehi­cle avail­abil­i­ty for the smart­match algo­rithm. Each vehi­cle offer is always vis­i­ble to all plat­form users once it was cre­at­ed.

Using this API it is also pos­si­ble to get all own vehi­cle offers.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ex­t/ve­hi­cles-api/v1/ve­hi­cles
  • Method: POST

Headers

  • Con­tent-type: application/json
  • Accept: application/json
  • Autho­riza­tion: Bear­er {access_token}
  • Api-key: {unique_ap­p_api-key}

Authorization and access

Autho­riza­tion process is described here.  Each API request must also con­sist of unique Api-key obtained dur­ing appli­ca­tion reg­is­tra­tion togeth­er with client_id and client_secret.

Vehicle offer request

Exam­ple of request for cre­at­ing new vehi­cle offer. For allowed val­ues 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

Con­fir­ma­tion of prop­er­ly cre­at­ed offer

{
  "id": "01E4WTST4JK6HT6SZD8PDY7BDS"
}