{"id":3133,"date":"2021-07-01T13:58:33","date_gmt":"2021-07-01T11:58:33","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=3133"},"modified":"2025-12-29T10:57:53","modified_gmt":"2025-12-29T09:57:53","slug":"assign-truck-and-driver-to-an-order","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/orders\/orders-received\/assign-truck-and-driver-to-an-order\/","title":{"rendered":"Assign truck and driver to received order"},"content":{"rendered":"\n<p>This method allows you to assign truck and dri\u00adver to received order. You can do this in two ways \u2014 send\u00ading id\u2019s or typ\u00ading text.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>You&nbsp; can get driver_id (which is the trans_id that is assigned to the dri\u00adver) using method described <a href=\"https:\/\/www.trans.eu\/api\/company\/get-list-of-employees\/\">here<\/a>.<br>Val\u00adues \u200b\u200bsuch as semi_trailer_id and vehicle_id can be found in the <a href=\"https:\/\/www.trans.eu\/api\/fleet\/get-list-of-existing-vehicles\/\">fleet<\/a>.<\/p>\n\n\n\n<p>If you don\u2019t have dri\u00adver or vehi\u00adcle reg\u00adis\u00adtered, you can send a request using dri\u00adver name and plate num\u00adbers (send as plain text).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Url parameters and connection settings<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>URL:<\/strong>&nbsp;https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint:<\/strong> \/ext\/orders-api\/v1\/orders\/{orderId}\/assignee<\/li>\n\n\n\n<li><strong>Method:<\/strong> POST<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Headers<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Con\u00adtent-type: application\/json<\/li>\n\n\n\n<li>Accept: application\/json<\/li>\n\n\n\n<li>Autho\u00adriza\u00adtion: Bear\u00ader {access_token}<\/li>\n\n\n\n<li>Api-key: {unique_ap\u00adp_api-key}<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Authorization and access<\/h2>\n\n\n\n<p>Autho\u00adriza\u00adtion process&nbsp;<a href=\"https:\/\/www.trans.eu\/api\/general-information\/authorization-process\/\" target=\"_blank\" rel=\"noopener\" title>is described here<\/a>.&nbsp; Each API request must also con\u00adsist of unique Api-key obtained dur\u00ading appli\u00adca\u00adtion reg\u00adis\u00adtra\u00adtion togeth\u00ader with client_id and client_secret.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Request<\/h2>\n\n\n\n<p>Exam\u00adple of request for truck and dri\u00adver assign\u00adment using id\u2019s:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"driver_id\": 101110-1,\n  \"semi_trailer_id\": 101111,\n  \"vehicle_id\": 1011111\n}<\/code><\/pre><\/div>\n\n\n\n<p>Exam\u00adple of request for truck and dri\u00adver assign\u00adment using plain text:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"vehicle_registration\": \"DW100001\",\n  \"semi_trailer_registration\": \"DW10000\",\n  \"driver\": \"Miros\u0142aw Kowalski\"\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Response<\/h2>\n\n\n\n<p>Con\u00adfir\u00adma\u00adtion of prop\u00ader\u00adly sent request.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"driver\": {\n    \"account_id\": 10127335,\n    \"email\": \"example@trans.eu\",\n    \"employee_id\": 862902,\n    \"family_name\": \"Kowalski\",\n    \"full_name\": \"Jan Kowalski\",\n    \"given_name\": \"Jan\",\n    \"identity_document_number\": null,\n    \"phone\": \"0048 11111111\",\n    \"phone_visible_to_contractor\": true\n  }\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">This method allows you to assign truck and dri\u00adver to received order. You can do this in two ways \u2014 \u2026<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"wp_typography_post_enhancements_disabled":false,"footnotes":""},"categories":[108],"tags":[],"class_list":["post-3133","post","type-post","status-publish","format-standard","hentry","category-orders-received"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":3133},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/comments?post=3133"}],"version-history":[{"count":3,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3133\/revisions"}],"predecessor-version":[{"id":5512,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3133\/revisions\/5512"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=3133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=3133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=3133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}