{"id":3949,"date":"2022-06-29T11:49:24","date_gmt":"2022-06-29T09:49:24","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=3949"},"modified":"2025-12-29T10:51:46","modified_gmt":"2025-12-29T09:51:46","slug":"update-time-window","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/dock-scheduler\/time-window\/update-time-window\/","title":{"rendered":"Update time window"},"content":{"rendered":"\n<p>This method allows you to update a time win\u00addow that was pre\u00advi\u00adous\u00adly cre\u00adat\u00aded.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Authorization and access<\/h2>\n\n\n\n<p>Autho\u00adriza\u00adtion process is described&nbsp;<a href=\"https:\/\/www.trans.eu\/api\/general-information\/authorization-process\/\" target=\"_blank\" rel=\"noopener\" title>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\">Url parameters and connection settings<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>URL:&nbsp;<\/strong>https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint:<\/strong> \/ext\/dock-scheduler-api\/v1\/warehouse\/timeWindow\/{id}<\/li>\n\n\n\n<li><strong>Http 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>Accept: application\/json<\/li>\n\n\n\n<li>Con\u00adtent-type: 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\">Json example<\/h2>\n\n\n\n<p>Sam\u00adple Json for updat\u00ading time win\u00addow using required data only<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"valid_from\": \"2021-06-16\",\n  \"valid_to\": \"2021-06-16\",\n  \"range_type\": \"CYCLE\",\n  \"external_number\": \"123xyz\",\n  \"carrier\": {\n    \"id\": 1013865\n  },\n  \"route\": {\n    \"spots\": [\n      {\n        \"order\": 1,\n        \"warehouse_id\": 29,\n        \"operations\": [\n          {\n            \"operation_type\": \"LOADING\",\n            \"order\": 1,\n            \"belongs_to_time_window\": true\n          }\n        ]\n      },\n      {\n        \"order\": 2,\n        \"address\": {},\n        \"operations\": [\n          {\n            \"operation_type\": \"UNLOADING\",\n            \"order\": 1,\n            \"belongs_to_time_window\": false\n          }\n        ]\n      }\n    ]\n  }\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  \"id\": 11111\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">This method allows you to update a time win\u00addow that was pre\u00advi\u00adous\u00adly cre\u00adat\u00aded.<\/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":[89],"tags":[],"class_list":["post-3949","post","type-post","status-publish","format-standard","hentry","category-time-window"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":3949},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3949","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=3949"}],"version-history":[{"count":2,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3949\/revisions"}],"predecessor-version":[{"id":5484,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3949\/revisions\/5484"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=3949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=3949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=3949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}