{"id":3155,"date":"2021-07-01T14:07:01","date_gmt":"2021-07-01T12:07:01","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=3155"},"modified":"2025-12-29T10:57:44","modified_gmt":"2025-12-29T09:57:44","slug":"accept-order-conditions","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/orders\/order-conditions\/accept-order-conditions\/","title":{"rendered":"Accept order conditions"},"content":{"rendered":"\n<p>This method allows you to accept con\u00addi\u00adtions of received order with a giv\u00aden id. Only orders with sta\u00adtus \u201cpro\u00adpos\u00adal-wait\u00ading\u201d can be accept\u00aded. You can send either an emty body or fill infor\u00adma\u00adtion about mon\u00adi\u00adtor\u00ading providers, vehi\u00adcle and dri\u00adver as well.<\/p>\n\n\n\n<p>When you add vehi\u00adcle and dri\u00adver data, you can do this in two way \u2014 send\u00ading their id\u2019s or typ\u00ading text.<\/p>\n\n\n\n<p>You&nbsp; can get driver_id 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<!--more-->\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> https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint:<\/strong> \/ext\/orders-api\/v1\/orders-received\/{orderId}\/accept<\/li>\n\n\n\n<li><strong>Method:<\/strong> PATCH<\/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 <a href=\"https:\/\/www.trans.eu\/api\/general-information\/authorization-process\/\" target=\"_blank\" rel=\"noopener\" title>is described here<\/a>. 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\">Example<\/h2>\n\n\n\n<p>Sam\u00adple Json for accept order with vehi\u00adcle and dri\u00adver id\u2019s:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"monitoring_providers\": [\n    \"trans_task\"\n  ],\n  \"vehicle_id\": 109,\n  \"semi_trailer_id\": 109,\n  \"driver_id\": 1001111\n}<\/code><\/pre><\/div>\n\n\n\n<p>Sam\u00adple Json for accept order with vehi\u00adcle and dri\u00adver as a plain text:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"monitoring_providers\": [\n    \"trans_task\"\n  ],\n  \"vehicle\": \"DW100001\",\n  \"semi_trailer\": \"DW10000\",\n  \"driver\": \"Adam Kowalski\"\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Response<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"additional_terms\": \"some additional terms\",\n  \"created_at\": \"2021-06-29T09:47:32.016Z\",\n  \"driver\": {\n    \"account_id\": 771476,\n    \"contact_phone\": null,\n    \"email\": \"test@trans.eu\",\n    \"employee_id\": 999446,\n    \"family_name\": \"Kierowca\",\n    \"full_name\": \"Jan Kierowca\",\n    \"given_name\": \"Jan\",\n    \"identity_document_number\": null,\n    \"phone\": null\n  },\n  \"freight\": {\n    \"carrier\": {\n      \"assignee\": null,\n      \"legal_name\": \"Firma Testowa Przewo\u017anik IIT 2\",\n      \"vat_id\": \"1111111111\"\n    },\n    \"id\": \"\",\n    \"reference_number\": null,\n    \"requirements\": {\n      \"temperature\": null\n    },\n    \"shipper\": {\n      \"assignee\": {\n        \"account_id\": 749989,\n        \"email\": \"test1@trans.eu\",\n        \"family_name\": \"Testowy\",\n        \"fax\": null,\n        \"given_name\": \"Jan\",\n        \"telephone\": \"0048 1111111111\",\n        \"trans_id\": \"1111111-1\"\n      },\n      \"legal_name\": \"Firma Testowa Spedycja IIT\",\n      \"vat_id\": \"2222222222\"\n    },\n    \"spots\": [\n      {\n        \"description\": null,\n        \"name\": null,\n        \"operations\": [\n          {\n            \"loads\": [],\n            \"operation_order\": 1,\n            \"time_window\": null,\n            \"time_window_reason\": null,\n            \"timespans\": {\n              \"begin\": \"2021-06-22T09:00:00.000Z\",\n              \"end\": \"2021-06-22T10:00:00.000Z\"\n            },\n            \"type\": \"loading\"\n          }\n        ],\n        \"place\": {\n          \"address\": {\n            \"country\": \"pl\",\n            \"description\": null,\n            \"locality\": \"Krak\u00f3w\",\n            \"number\": null,\n            \"postal_code\": \"31-001\",\n            \"street\": null\n          },\n          \"coordinates\": null\n        },\n        \"spot_order\": 1\n      },\n      {\n        \"description\": null,\n        \"name\": null,\n        \"operations\": [\n          {\n            \"loads\": [],\n            \"operation_order\": 1,\n            \"time_window\": null,\n            \"time_window_reason\": null,\n            \"timespans\": {\n              \"begin\": \"2021-06-23T09:00:00.000Z\",\n              \"end\": \"2021-06-23T09:00:00.000Z\"\n            },\n            \"type\": \"unloading\"\n          }\n        ],\n        \"place\": {\n          \"address\": {\n            \"country\": \"pl\",\n            \"description\": null,\n            \"locality\": \"D\u0105browa \u015arodkowa\",\n            \"number\": null,\n            \"postal_code\": \"59-330\",\n            \"street\": null\n          },\n          \"coordinates\": null\n        },\n        \"spot_order\": 2\n      }\n    ]\n  },\n  \"id\": \"c80ffb5c-b775-4394-b385-83fdb3117d5c\",\n  \"invoice\": null,\n  \"legacy_freight_id\": null,\n  \"monitoring\": {\n    \"providers\": [\n      \"trans_task\"\n    ],\n    \"required\": true\n  },\n  \"number\": \"2021\/06\/29\/14\",\n  \"payment\": {\n    \"days\": 30,\n    \"price\": {\n      \"currency\": \"pln\",\n      \"protected\": false,\n      \"type\": \"km\",\n      \"value\": 1500\n    }\n  },\n  \"related\": [],\n  \"source\": {\n    \"author_account_id\": 749989,\n    \"source_date\": \"2021-06-29T09:47:32.016Z\",\n    \"source_id\": \"3_api_trans\",\n    \"type\": \"api\"\n  },\n  \"status\": {\n    \"comment\": null,\n    \"value\": \"waiting-for-vehicle-and-driver\"\n  },\n  \"vehicle\": null\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">This method allows you to accept con\u00addi\u00adtions of received order with a giv\u00aden id. Only orders with sta\u00adtus \u201cpro\u00ad\u00adpos\u00adal-wait\u00ad\u00ading\u201d can \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":[87],"tags":[],"class_list":["post-3155","post","type-post","status-publish","format-standard","hentry","category-order-conditions"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":3155},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3155","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=3155"}],"version-history":[{"count":1,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3155\/revisions"}],"predecessor-version":[{"id":5511,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3155\/revisions\/5511"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=3155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=3155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=3155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}