This method allows you to assign truck and driver to received order. You can do this in two ways — sending id’s or typing text.
You can get driver_id (which is the trans_id that is assigned to the driver) using method described here.
Values such as semi_trailer_id and vehicle_id can be found in the fleet.
If you don’t have driver or vehicle registered, you can send a request using driver name and plate numbers (send as plain text).
Url parameters and connection settings
- URL: https://api.platform.trans.eu
- Endpoint: /ext/orders-api/v1/orders/{orderId}/assignee
- 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.
Request
Example of request for truck and driver assignment using id’s:
{
"driver_id": 101110-1,
"semi_trailer_id": 101111,
"vehicle_id": 1011111
}
Example of request for truck and driver assignment using plain text:
{
"vehicle_registration": "DW100001",
"semi_trailer_registration": "DW10000",
"driver": "Mirosław Kowalski"
}
Response
Confirmation of properly 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
}
}