{"id":935,"date":"2019-11-05T09:54:09","date_gmt":"2019-11-05T08:54:09","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=935"},"modified":"2025-12-29T11:16:46","modified_gmt":"2025-12-29T10:16:46","slug":"get-freight-by-id","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/freights\/create-new-freight\/get-freight-by-id\/","title":{"rendered":"Get freight by id"},"content":{"rendered":"\n<p>Dis\u00adplays details of one, pre\u00advi\u00adous\u00adly cre\u00adat\u00aded freight, by the API, includ\u00ading freights cre\u00adat\u00aded by users on the Trans.eu Plat\u00adform.<\/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>HTTP Method:<\/strong> GET<\/li>\n\n\n\n<li><strong>URL: <\/strong>https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint: <\/strong>\/ext\/freights-api\/v1\/freights\/{freightId}<\/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\">Authorization<\/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<p>Response: <\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"accepted_price\": null,\n  \"capacity\": 20,\n  \"carrier\": null,\n  \"contact_employees\": [\n    {\n      \"last_name\": \"Testowy\",\n      \"name\": \"Jan\",\n      \"trans_id\": \"111111-1\"\n    }\n  ],\n  \"distance\": 1344,\n  \"end_reason\": \"timeout\",\n  \"height\": null,\n  \"id\": 1111111,\n  \"length\": null,\n  \"loading_meters\": 2,\n  \"loads\": [],\n  \"publication_price\": {\n    \"currency\": \"pln\",\n    \"value\": 69\n  },\n  \"publication_status\": \"finished\",\n  \"reference_number\": \"FR\/2022\/02\/11\/H7DG\",\n  \"requirements\": {\n    \"is_ftl\": false,\n    \"other_requirements\": [\n      \"gps\",\n      \"hds\",\n      \"lift\",\n      \"adr\"\n    ],\n    \"required_adr_classes\": [\n      \"adr_1_2\",\n      \"adr_1\",\n      \"adr_1_1\",\n      \"adr_2\"\n    ],\n    \"required_truck_bodies\": [\n      \"20-standard\",\n      \"hook-truck\"\n    ],\n    \"required_ways_of_loading\": [\n      \"top\",\n      \"side\",\n      \"back\"\n    ],\n    \"shipping_remarks\": \"Inne wymagania\",\n    \"temperature\": {\n      \"max\": null,\n      \"min\": null\n    },\n    \"vehicle_size\": \"lorry\"\n  },\n  \"shipment_external_id\": null,\n  \"spots\": [\n    {\n      \"description\": null,\n      \"name\": null,\n      \"operations\": [\n        {\n          \"loads\": [],\n          \"operation_order\": 1,\n          \"timespans\": {\n            \"begin\": \"2021-12-14T15:08:35+01:00\",\n            \"end\": \"2021-12-14T17:08:35+01:00\"\n          },\n          \"type\": \"loading\"\n        }\n      ],\n      \"place\": {\n        \"address\": {\n          \"country\": \"nl\",\n          \"description\": null,\n          \"locality\": \"Amsterdam\",\n          \"number\": null,\n          \"postal_code\": \"1011\",\n          \"street\": null\n        },\n        \"coordinates\": {\n          \"latitude\": null,\n          \"longitude\": null\n        }\n      },\n      \"spot_order\": 1\n    },\n    {\n      \"description\": null,\n      \"name\": null,\n      \"operations\": [\n        {\n          \"loads\": [],\n          \"operation_order\": 1,\n          \"timespans\": {\n            \"begin\": \"2021-12-16T15:08:35+01:00\",\n            \"end\": \"2021-12-16T17:08:35+01:00\"\n          },\n          \"type\": \"unloading\"\n        }\n      ],\n      \"place\": {\n        \"address\": {\n          \"country\": \"pl\",\n          \"description\": null,\n          \"locality\": \"Krak\u00f3w\",\n          \"number\": null,\n          \"postal_code\": \"11-111\",\n          \"street\": null\n        },\n        \"coordinates\": {\n          \"latitude\": 11.11111,\n          \"longitude\": 1.1111\n        }\n      },\n      \"spot_order\": 2\n    }\n  ],\n  \"status\": \"unsuccessful_publication\",\n  \"volume\": null,\n  \"width\": null\n}<\/code><\/pre><\/div>\n\n\n\n<p>Autho\u00adriza\u00adtion process is described <a href=\"https:\/\/www.trans.eu\/api\/general-information\/authorization\/access-token\/\">here<\/a>.<\/p>\n\n\n\n<p>Response to prop\u00ader\u00adly giv\u00aden freight id.<\/p>\n\n\n\n<p><strong>Impor\u00adtant!<\/strong> It is allowed to access freights cre\u00adat\u00aded by employ\u00adees of autho\u00adrized user\u2019s com\u00adpa\u00adny account only.<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">Dis\u00adplays details of one, pre\u00advi\u00adous\u00adly cre\u00adat\u00aded freight, by the API, includ\u00ading freights cre\u00adat\u00aded by users on the Trans.eu Plat\u00adform.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"wp_typography_post_enhancements_disabled":false,"footnotes":""},"categories":[83],"tags":[],"class_list":["post-935","post","type-post","status-publish","format-standard","hentry","category-create-new-freight"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":935},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/935","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/comments?post=935"}],"version-history":[{"count":2,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/935\/revisions"}],"predecessor-version":[{"id":5568,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/935\/revisions\/5568"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}