{"id":1830,"date":"2020-05-25T11:31:14","date_gmt":"2020-05-25T09:31:14","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=1830"},"modified":"2025-12-29T11:05:58","modified_gmt":"2025-12-29T10:05:58","slug":"search-for-carrier-using-recommended-companies","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/uncategorized\/search-for-carrier-using-recommended-companies\/","title":{"rendered":"Search for carrier using appropriately selected and recommended companies"},"content":{"rendered":"<p>Descrip\u00adtion of adding a freight to com\u00adpa\u00adnies cho\u00adsen by rec\u00adom\u00admen\u00adda\u00adtion algo\u00adrithm, with declar\u00ading the freight price.<!--more--><\/p>\n<h2>Scenario<\/h2>\n<ul>\n<li>car\u00adri\u00ader is yet to be deter\u00admined<\/li>\n<li>price and cur\u00adren\u00adcy was giv\u00aden<\/li>\n<li>car\u00adri\u00ader is using Trans.eu Plat\u00adform only, with no addi\u00adtion\u00adal freight man\u00adage\u00adment soft\u00adware involved<\/li>\n<li>both freight for\u00adwarder and car\u00adri\u00aders have exist\u00ading and valid Trans.eu account<\/li>\n<li>car\u00adri\u00ader has to meet spec\u00adi\u00adfied cri\u00adte\u00adria<\/li>\n<li>the car\u00adri\u00ader does not yet belong to the group of con\u00adtrac\u00adtors<\/li>\n<\/ul>\n<h2><strong>Diagram<\/strong><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2043\" src=\"https:\/\/www.trans.eu\/api\/wp-content\/uploads\/Freight-exhange-publication-Copy-of-Page-1.png\" alt width=\"1171\" height=\"411\" srcset=\"https:\/\/www.trans.eu\/api\/wp-content\/uploads\/Freight-exhange-publication-Copy-of-Page-1.png 1171w, https:\/\/www.trans.eu\/api\/wp-content\/uploads\/Freight-exhange-publication-Copy-of-Page-1-300x105.png 300w, https:\/\/www.trans.eu\/api\/wp-content\/uploads\/Freight-exhange-publication-Copy-of-Page-1-1024x359.png 1024w, https:\/\/www.trans.eu\/api\/wp-content\/uploads\/Freight-exhange-publication-Copy-of-Page-1-768x270.png 768w\" sizes=\"auto, (max-width: 1171px) 100vw, 1171px\"><\/p>\n<h2>Authorize access<\/h2>\n<p>Before it is pos\u00adsi\u00adble to send any request, user needs to <a href=\"https:\/\/www.trans.eu\/api\/general-information\/authorization-process\/\">autho\u00adrize access<\/a>.<\/p>\n<ul>\n<li>client app was reg\u00adis\u00adtered using reg\u00adis\u00adtra\u00adtion form<\/li>\n<li>exter\u00adnal app was grant\u00aded api keys (client_id and client_secret)<\/li>\n<li>autho\u00adriza\u00adtion process has been imple\u00adment\u00aded in exter\u00adnal app<\/li>\n<\/ul>\n<h2>Create new freight<\/h2>\n<p>In order to send freight pro\u00adpos\u00adals to car\u00adri\u00aders tai\u00adlored to its cri\u00adte\u00adria, the <a href=\"https:\/\/www.trans.eu\/api\/freights\/new-freight-using-smartmatch\/\">pub\u00adli\u00adca\u00adtion method using the smart\u00admatch algo\u00adrithm<\/a> must be used.<\/p>\n<h3>Each freight must consist of:<\/h3>\n<ul>\n<li>load\u00ading loca\u00adtion and time<\/li>\n<li>unload\u00ading loca\u00adtion and time<\/li>\n<li>required truck body type<\/li>\n<li>sum\u00adma\u00adry of freight\u2019s loads weight<\/li>\n<li>ftl\/ltl para\u00adme\u00adter<\/li>\n<li>price and cur\u00adren\u00adcy<\/li>\n<\/ul>\n<h2><strong>Endpoint:<\/strong><\/h2>\n<pre>(POST) https:\/\/api.platform.trans.eu\/ext\/freights-api\/v1\/freight-smartmatch<\/pre>\n<h2><strong>Request example:&nbsp;<\/strong><\/h2>\n<p>Exam\u00adple of smart match freight post\u00ading request:<\/p>\n<pre class=\"wp-block-code\">{\n  \"capacity\": 12,\n  \"requirements\": {\n    \"is_ftl\": false,\n    \"required_truck_bodies\": [\n      \"curtainsider\"\n    ],\n    \"loads\": []\n  },\n  \"spots\": [\n    {\n      \"spot_order\": 1,\n      \"place\": {\n        \"address\": {\n          \"country\": \"PL\",\n          \"postal_code\": \"12345\",\n          \"locality\": \"Wroclaw\"\n        }\n      },\n      \"operations\": [\n        {\n          \"timespans\": {\n            \"begin\": \"2021-02-03T13:00:00+0100\",\n            \"end\": \"2021-02-03T14:00:00+0100\"\n          },\n          \"type\": \"loading\",\n          \"operation_order\": 1,\n          \"loads\": []\n        }\n      ]\n    },\n    {\n      \"spot_order\": 2,\n      \"place\": {\n        \"address\": {\n          \"country\": \"DE\",\n          \"postal_code\": \"09876\",\n          \"locality\": \"N\u00fcrnberg\"\n        }\n      },\n      \"operations\": [\n        {\n          \"timespans\": {\n            \"begin\": \"2021-02-04T08:00:00+0100\",\n            \"end\": \"2021-02-04T08:00:00+0100\"\n          },\n          \"type\": \"unloading\",\n          \"operation_order\": 1,\n          \"loads\": []\n        }\n      ]\n    }\n  ],\n  \"publish\": true\n}<\/pre>\n<h2><strong>Response example:<\/strong><\/h2>\n<pre class=\"wp-block-code\">{\n    \"accepted_price\": null,\n    \"capacity\": 12,\n    \"carrier\": null,\n    \"id\": 592018,\n    \"loading_meters\": null,\n    \"loads\": [],\n    \"publication_price\": null,\n    \"reference_number\": \"FR\/2021\/02\/03\/X64K\",\n    \"requirements\": {\n        \"is_ftl\": false,\n        \"other_requirements\": [],\n        \"required_adr_classes\": [],\n        \"required_truck_bodies\": [\n            \"curtainsider\"\n        ],\n        \"required_ways_of_loading\": [],\n        \"shipping_remarks\": null,\n        \"temperature\": {\n            \"max\": null,\n            \"min\": null\n        },\n        \"vehicle_size\": \"any_size\"\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-02-03T13:00:00+01:00\",\n                        \"end\": \"2021-02-03T14:00:00+01:00\"\n                    },\n                    \"type\": \"loading\"\n                }\n            ],\n            \"place\": {\n                \"address\": {\n                    \"country\": \"PL\",\n                    \"description\": null,\n                    \"locality\": \"Wroclaw\",\n                    \"number\": null,\n                    \"postal_code\": \"12345\",\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-02-04T08:00:00+01:00\",\n                        \"end\": \"2021-02-04T08:00:00+01:00\"\n                    },\n                    \"type\": \"unloading\"\n                }\n            ],\n            \"place\": {\n                \"address\": {\n                    \"country\": \"DE\",\n                    \"description\": null,\n                    \"locality\": \"N\u00fcrnberg\",\n                    \"number\": null,\n                    \"postal_code\": \"09876\",\n                    \"street\": null\n                },\n                \"coordinates\": {\n                    \"latitude\": null,\n                    \"longitude\": null\n                }\n            },\n            \"spot_order\": 2\n        }\n    ],\n    \"status\": \"new\"\n}<\/pre>\n<h2>Receive offers<\/h2>\n<p>Each response for freight pub\u00adli\u00adca\u00adtion can be accessed using API. To find out which car\u00adri\u00aders respond\u00aded send the request below:<\/p>\n<pre>(GET) https:\/\/api.platform.trans.eu\/ext\/freights-api\/v1\/freights\/{freight-id}\/offers<\/pre>\n<p>If there is no response, you will receive an emp\u00adty array.<\/p>\n<p>If respons\u00ades have been sent, there will be an array, which con\u00adsists of each response.<\/p>\n<p>How to get freight offers is described <a href=\"https:\/\/www.trans.eu\/api\/freights\/list-of-freight-offers\/\">here<\/a>.<\/p>\n<h2>Negotiation<\/h2>\n<p>It pos\u00adsi\u00adble to accept, reject or nego\u00adti\u00adate received price con\u00addi\u00adtions<\/p>\n<h3><strong>Accept<\/strong>:<\/h3>\n<pre>https:\/\/api.platform.trans.eu\/ext\/freights-api\/v1\/freights\/offers\/{offer-id}\/accept<\/pre>\n<p>Pay\u00adload for freight accep\u00adtance:<\/p>\n<pre>{ \"version\" : 3}<\/pre>\n<h3><strong>Reject<\/strong>:<\/h3>\n<pre>https:\/\/api.platform.trans.eu\/ext\/freights-api\/v1\/freights\/offers\/{offer-id}\/reject<\/pre>\n<h3><strong>Negotiate<\/strong>:<\/h3>\n<pre>https:\/\/api.platform.trans.eu\/ext\/freights-api\/v1\/freights\/offers\/{offer-id}\/negotiate<\/pre>\n<h2><strong>Payload for freight negotiation:<\/strong><\/h2>\n<pre>{\n &nbsp;&nbsp;&nbsp;\"payment\":&nbsp;{\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"price\":&nbsp;{\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"value\":&nbsp;150\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n &nbsp;&nbsp;&nbsp;},\n &nbsp;&nbsp;&nbsp;\"version\":&nbsp;2\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">Descrip\u00adtion of adding a freight to com\u00adpa\u00adnies cho\u00adsen by rec\u00adom\u00admen\u00adda\u00adtion algo\u00adrithm, with declar\u00ading the freight price.<\/p>\n","protected":false},"author":4,"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":[120],"tags":[],"class_list":["post-1830","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":1830},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/1830","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=1830"}],"version-history":[{"count":1,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/1830\/revisions"}],"predecessor-version":[{"id":5539,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/1830\/revisions\/5539"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=1830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=1830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=1830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}