{"id":3089,"date":"2021-07-01T13:35:59","date_gmt":"2021-07-01T11:35:59","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=3089"},"modified":"2025-12-29T10:58:53","modified_gmt":"2025-12-29T09:58:53","slug":"update-existing-order-with-order-conditions","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/orders\/order-conditions\/update-existing-order-with-order-conditions\/","title":{"rendered":"Update existing order with order conditions"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Description<\/h2>\n\n\n\n<p>This method allows you to update the auto\u00admat\u00adi\u00adcal\u00adly cre\u00adat\u00aded order from the accept\u00aded freight with order con\u00addi\u00adtions:<br>- loads (can be send as emp\u00adty array)<br>- spots (is not required)<br>- pay\u00adment dead\u00adline (required)<br>- mon\u00adi\u00adtor\u00ading require\u00adment (is not required)<\/p>\n\n\n\n<p>After such oper\u00ada\u00adtion car\u00adri\u00ader will be able to accept order con\u00addi\u00adtions.<\/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}<\/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&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\">Update order request<\/h2>\n\n\n\n<p>Exam\u00adple of request for update order.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"freight\": {\n    \"loads\": [],\n    \"spots\": []\n  },\n  \"additional_terms\": \"My additional terms\",\n  \"payment\": {\n    \"days\": 30\n  },\n  \"monitoring\": {\n    \"required\": true\n  }\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 updat\u00aded order.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"additional_terms\": null,\n  \"archived_at\": null,\n  \"attachments\": [],\n  \"can_archive\": false,\n  \"cancellation\": null,\n  \"created_at\": \"2021-06-21T10:10:14.366Z\",\n  \"driver\": null,\n  \"freight\": {\n    \"carrier\": {\n      \"assignee\": {\n        \"account_id\": 759284,\n        \"email\": \"test@trans.eu\",\n        \"family_name\": \"Testowy\",\n        \"fax\": null,\n        \"given_name\": \"Jan\",\n        \"telephone\": \"0048 111111111\",\n        \"trans_id\": \"1111111-1\"\n      },\n      \"legal_name\": \"Firma Testowa Przewo\u017anik IIT 2\",\n      \"vat_id\": \"4574663803\"\n    },\n    \"id\": \"3aaae5e8-b313-4dad-bd8d-153143e22da7\",\n    \"reference_number\": \"FR\/2021\/06\/21\/C7Z1\",\n    \"shipper\": {\n      \"assignee\": {\n        \"account_id\": 749989,\n        \"email\": \"test@trans.eu\",\n        \"family_name\": \"Testowy2\",\n        \"fax\": null,\n        \"given_name\": \"Jan\",\n        \"telephone\": \"0048 111111111\",\n        \"trans_id\": \"1111111-1\"\n      },\n      \"legal_name\": \"Firma Testowa Spedycja IIT\",\n      \"vat_id\": \"11111111111\"\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-24T10:08:49.000Z\",\n              \"end\": \"2021-06-24T12:08:49.000Z\"\n            },\n            \"type\": \"loading\"\n          }\n        ],\n        \"place\": {\n          \"address\": {\n            \"country\": \"pl\",\n            \"description\": null,\n            \"locality\": \"WROC\u0141AW\",\n            \"number\": null,\n            \"postal_code\": \"12345\",\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-27T10:08:49.000Z\",\n              \"end\": \"2021-06-27T12:08:49.000Z\"\n            },\n            \"type\": \"unloading\"\n          }\n        ],\n        \"place\": {\n          \"address\": {\n            \"country\": \"de\",\n            \"description\": null,\n            \"locality\": \"WARSZAWA\",\n            \"number\": null,\n            \"postal_code\": \"09876\",\n            \"street\": null\n          },\n          \"coordinates\": null\n        },\n        \"spot_order\": 2\n      }\n    ]\n  },\n  \"id\": \"3aaae5e8-b313-4dad-bd8d-153143e22da7\",\n  \"invoice\": null,\n  \"is_archived_permanently\": false,\n  \"legacy_freight_id\": 781167,\n  \"monitoring\": {\n    \"providers\": [],\n    \"required\": true\n  },\n  \"number\": \"2021\/06\/21\/8\",\n  \"payment\": {\n    \"days\": 60,\n    \"period\": \"deferred\",\n    \"price\": {\n      \"currency\": \"eur\",\n      \"type\": \"route\",\n      \"value\": 110\n    }\n  },\n  \"related\": [],\n  \"source\": null,\n  \"status\": {\n    \"comment\": null,\n    \"value\": \"proposal-waiting\"\n  },\n  \"vehicle\": null\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">Descrip\u00adtion This method allows you to update the auto\u00admat\u00adi\u00adcal\u00adly cre\u00adat\u00aded order from the accept\u00aded freight with order con\u00addi\u00adtions:- loads (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-3089","post","type-post","status-publish","format-standard","hentry","category-order-conditions"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":3089},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3089","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=3089"}],"version-history":[{"count":1,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3089\/revisions"}],"predecessor-version":[{"id":5515,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3089\/revisions\/5515"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=3089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=3089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=3089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}