{"id":3532,"date":"2021-11-23T13:05:46","date_gmt":"2021-11-23T12:05:46","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=3532"},"modified":"2025-12-29T10:53:13","modified_gmt":"2025-12-29T09:53:13","slug":"edit-shipment-external-id-value","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/orders\/order-handling\/edit-shipment-external-id-value\/","title":{"rendered":"Edit shipment external id value"},"content":{"rendered":"\n<p>This method allows ship\u00adpers to update ship\u00adment exter\u00adnal id giv\u00aden in order. This action can be per\u00adformed at all order sta\u00adtus\u00ades until it\u2019s archived.<\/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>&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\">Json example<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"freight\": {\n    \"shipment_external_id\": \"123567\"\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  \"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 2\",\n      \"vat_id\": \"4574663803\"\n    },\n    \"id\": \"3aaae5e8-b313-4dad-bd8d-153143e22da7\",\n    \"reference_number\": \"FR\/2021\/06\/21\/C7Z1\",\n    \"shipment_external_id\": \"123567\",\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\",\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\">This method allows ship\u00adpers to update ship\u00adment exter\u00adnal id giv\u00aden in order. This action can be per\u00adformed at all order \u2026<\/p>\n","protected":false},"author":13,"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":[110],"tags":[],"class_list":["post-3532","post","type-post","status-publish","format-standard","hentry","category-order-handling"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":3532},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3532","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\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/comments?post=3532"}],"version-history":[{"count":1,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3532\/revisions"}],"predecessor-version":[{"id":5493,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/3532\/revisions\/5493"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=3532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=3532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=3532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}