{"id":933,"date":"2019-11-05T09:55:09","date_gmt":"2019-11-05T08:55:09","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=933"},"modified":"2025-12-29T11:16:38","modified_gmt":"2025-12-29T10:16:38","slug":"get-freights-list","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/freights\/create-new-freight\/get-freights-list\/","title":{"rendered":"Get freights list"},"content":{"rendered":"\n<p>This method allows you to down\u00adload a list of freight cre\u00adat\u00aded using the API and cre\u00adat\u00aded by users of the Trans.eu Plat\u00adform under the same cus\u00adtomer (com\u00adpa\u00adny) account.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The most recent 90 items are returned. It is also pos\u00adsi\u00adble to apply fil\u00adters that allow you to down\u00adload the list accord\u00ading to the spec\u00adi\u00adfied cri\u00adte\u00adria. By call\u00ading the method, we can also spec\u00adi\u00adfy fields from the list to be returned as a result of the query.<\/p>\n\n\n\n<p>Those freights ori\u00adgin from <strong>Freights sent<\/strong> mod\u00adule.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Possible query modifiers:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To spec\u00adi\u00adfy fil\u00adters when retriev\u00ading the freight list, send the fil\u00adter para\u00adme\u00adter in the request<\/li>\n\n\n\n<li>To spec\u00adi\u00adfy the list order, the \u201csort\u00adBy\u201d para\u00adme\u00adter should be sent<\/li>\n\n\n\n<li>To down\u00adload the list con\u00adtain\u00ading archive freights in the request, send the para\u00adme\u00adter \u201carchive\u201d<\/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 is described <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: <\/strong>https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint: <\/strong>\/ex\u00adt\/freights-api\/v1\/freights<\/li>\n\n\n\n<li><strong>Http Method:<\/strong> GET<\/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\">Freight information available using a list<\/h2>\n\n\n\n<p>List of freights con\u00adsists of lim\u00adit\u00aded infor\u00adma\u00adtion, to make freight man\u00adage\u00adment more data effi\u00adcient:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>id<\/li>\n\n\n\n<li>cre\u00adation date<\/li>\n\n\n\n<li>pub\u00adli\u00adca\u00adtion infor\u00adma\u00adtion<\/li>\n\n\n\n<li>freight sta\u00adtus<\/li>\n\n\n\n<li>exter\u00adnal iden\u00adti\u00adfi\u00adca\u00adtion num\u00adber<\/li>\n\n\n\n<li>ftl\/ltl infor\u00adma\u00adtion<\/li>\n\n\n\n<li>array of allowed truck bod\u00adies<\/li>\n\n\n\n<li>load\u00ading and unload\u00ading (first and last spot if freight con\u00adsists of more than two spots)\n<ul class=\"wp-block-list\">\n<li>loca\u00adtion<\/li>\n\n\n\n<li>oper\u00ada\u00adtions<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Available filters<\/h2>\n\n\n\n<p>List of avail\u00adable fil\u00adters<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>sta\u00adtus (?filter={\u201cstatus\u201d:\u201cin_progress\u201d})<\/li>\n\n\n\n<li>publication_type (?filter={\u201cpublication_type\u201d:[\u201ccompanies\u201d]})<\/li>\n\n\n\n<li>truck body type ( ?filter={\u201ctruck_body_type\u201d:\u201ccooler\u201d} )<\/li>\n\n\n\n<li>load\u00ading place ( ?filter={\u201cloading_place\u201d:{\u201ccountry\u201d:\u201cnl\u201d,\u201cpostal_code\u201d:\u201c1012\u201d}} )<\/li>\n\n\n\n<li>unload\u00ading place ( ?filter={\u201cunloading_place\u201d:{\u201ccountry\u201d:\u201cpl\u201d,\u201cpostal_code\u201d:\u201c31\u201d}} )<\/li>\n\n\n\n<li>load\u00ading date ( ?filter={\u201cloading_date\u201d:{\u201cstart_date\u201d:\u201c2021\u201302-02\u201d,\u201cend_date\u201d:\u201c2021\u201302-03\u201d}} )<\/li>\n\n\n\n<li>unload\u00ading date ( ?filter={\u201cunloading_date\u201d:{\u201cstart_date\u201d:\u201c2021\u201302-02\u201d,\u201cend_date\u201d:\u201c2021\u201302-03\u201d}} )<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Paging<\/h2>\n\n\n\n<p>The returned results are pag\u00adi\u00adnat\u00aded with max\u00adi\u00admum of 30 per page.<br>When call\u00ading GET method, page should added as para\u00adme\u00adter in the URL, for exam\u00adple:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>https:\/\/api.platform.trans.eu\/\/ext\/freights-api\/v1\/freights?page=2<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Sort by<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>sta\u00adtus ( ?sortBy=status )<\/li>\n\n\n\n<li>load\u00ading date ( ?sortBy=loading_date )<\/li>\n\n\n\n<li>unload\u00ading date ( ?sortBy=unloading_date )<\/li>\n\n\n\n<li>cre\u00adation date ( ?sortBy=created_at )<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Json response example<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>[\n  {\n    \"contact_employees\": [\n      {\n        \"last_name\": \"Testowy\",\n        \"name\": \"Jan\",\n        \"trans_id\": \"111111-1\"\n      }\n    ],\n    \"created\": \"2021-02-02T09:58:48+01:00\",\n    \"ftl\": true,\n    \"id\": 590881,\n    \"loading\": {\n      \"coordinates\": {\n        \"latitude\": 52.23019,\n        \"longitude\": 21.01001\n      },\n      \"place\": {\n        \"country\": \"pl\",\n        \"locality\": \"Warszawa\",\n        \"postal_code\": \"00-001\"\n      },\n      \"timespans\": {\n        \"begin\": \"2021-02-11T00:00:00+01:00\",\n        \"end\": \"2021-02-11T00:30:00+01:00\"\n      }\n    },\n    \"publication\": {\n      \"end_reason\": null,\n      \"id\": 499999,\n      \"price\": {\n        \"currency\": \"eur\",\n        \"period\": {\n          \"days\": 5,\n          \"payment\": \"deferred\"\n        },\n        \"value\": 123\n      },\n      \"publish_date\": \"2021-02-02T09:58:48+01:00\",\n      \"publish_type\": \"companies\",\n      \"received_offers\": null,\n      \"refresh_from\": null,\n      \"sent_offers\": 1,\n      \"smart_match_offers\": null,\n      \"status\": \"active\"\n    },\n    \"reference_number\": \"FR\/2021\/02\/02\/XHUX\",\n    \"shipment_external_id\": null,\n    \"status\": \"in_progress\",\n    \"truck_bodies\": [\n      \"cooler\"\n    ],\n    \"unloading\": {\n      \"coordinates\": {\n        \"latitude\": 52.58216,\n        \"longitude\": 12.99756\n      },\n      \"place\": {\n        \"country\": \"de\",\n        \"locality\": \"Brieselang\",\n        \"postal_code\": \"09000\"\n      },\n      \"timespans\": {\n        \"begin\": \"2021-02-12T02:00:00+01:00\",\n        \"end\": \"2021-02-13T02:00:00+01:00\"\n      }\n    },\n    \"vehicle_size\": \"any_size\"\n  },\n  {\n    \"next_freight\": \"next_freight\"\n  }\n]<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">This method allows you to down\u00adload a list of freight cre\u00adat\u00aded using the API and cre\u00adat\u00aded by users of the \u2026<\/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-933","post","type-post","status-publish","format-standard","hentry","category-create-new-freight"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":933},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/933","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=933"}],"version-history":[{"count":2,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/933\/revisions"}],"predecessor-version":[{"id":5567,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/933\/revisions\/5567"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}