Update vehicle offer with a given offer id

Update vehi­cle offer

Description

Edit­ing a vehi­cle offer removes the orig­i­nal offer and assigns a new offer id.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/vehicles-api/v1/vehicles/{offerId}
  • Method: PUT

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.

Update Vehicle offer request

Exam­ple of request for updat­ing 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 updat­ing offer

{
  "id": "01E4WTST4JK6HT6SZD8PDY7BDS"
}