Accept and assign vehicle, driver to monitoring task

Allows to accept mon­i­tor­ing task and assign vehi­cle, semi­trail­er and dri­ver (execu­tor) in two ways – by send­ing their id’s or typ­ing text.

You  can get account_id using method described here.
Val­ues ​​such as vehi­cle and semi­trail­er id can be found in the fleet.

If you don’t have dri­ver or vehi­cle reg­is­tered, you can send a request using execu­tor name and plate num­bers (send as plain text).

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.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/loads-monitoring-api/v2/monitorings/{monitoringId}/accept
  • Method: PATCH

Headers

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

Request

Exam­ple of request for accept mon­i­tor­ing task using id’s:

{
  "vehicle": {
    "is_tracked": true,
    "vehicle_id": 242499
  },
  "semitrailer": {
    "is_tracked": true,
    "vehicle_id": 242499
  },
  "executor": {
    "is_tracked": true,
    "account_id": 242499
  }
}

Exam­ple of request for accept mon­i­tor­ing task using plain text:

{
  "executor": {
    "is_tracked": false,
    "name": "Tomasz Nowak"
  },
  "vehicle": {
    "is_tracked": false,
    "registration_plate_number": "DWR123XYZ"
  },
  "semitrailer": {
    "is_tracked": false,
    "registration_plate_number": "DWR123ABC"
  }
}