Assign truck and driver to received order

This method allows you to assign truck and dri­ver to received order. You can do this in two ways — send­ing id’s or typ­ing text.

You  can get driver_id (which is the trans_id that is assigned to the dri­ver) using method described here.
Val­ues ​​such as semi_trailer_id and vehicle_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 dri­ver name and plate num­bers (send as plain text).

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/orders-api/v1/orders/{orderId}/assignee
  • 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.

Request

Exam­ple of request for truck and dri­ver assign­ment using id’s:

{
  "driver_id": 101110-1,
  "semi_trailer_id": 101111,
  "vehicle_id": 1011111
}

Exam­ple of request for truck and dri­ver assign­ment using plain text:

{
  "vehicle_registration": "DW100001",
  "semi_trailer_registration": "DW10000",
  "driver": "Mirosław Kowalski"
}

Response

Con­fir­ma­tion of prop­er­ly sent request.

{
  "driver": {
    "account_id": 10127335,
    "email": "example@trans.eu",
    "employee_id": 862902,
    "family_name": "Kowalski",
    "full_name": "Jan Kowalski",
    "given_name": "Jan",
    "identity_document_number": null,
    "phone": "0048 11111111",
    "phone_visible_to_contractor": true
  }
}