{"id":1828,"date":"2020-05-25T11:29:36","date_gmt":"2020-05-25T09:29:36","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=1828"},"modified":"2026-01-08T14:37:26","modified_gmt":"2026-01-08T13:37:26","slug":"search-for-carrier-with-given-price-and-buy-now-option","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/use-cases\/search-for-carrier-with-given-price-and-buy-now-option\/","title":{"rendered":"Search for carrier with given price and buy now option"},"content":{"rendered":"\n<p>Descrip\u00adtion of adding new freight for select\u00aded com\u00adpa\u00adnies, with giv\u00aden price, with\u00adout the pos\u00adsi\u00adbil\u00adi\u00adty of freight price nego\u00adti\u00ada\u00adtions.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Scenario<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>car\u00adri\u00ader is yet to be deter\u00admined<\/li>\n\n\n\n<li>car\u00adri\u00ader\u2019s Tran\u00adsId is avail\u00adable in exter\u00adnal TMS<\/li>\n\n\n\n<li>price and cur\u00adren\u00adcy was giv\u00aden<\/li>\n\n\n\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\n\n\n<li>both freight for\u00adwarder and car\u00adri\u00aders have exist\u00ading and valid Trans.eu account<\/li>\n\n\n\n<li>freight is pub\u00adlished imme\u00addi\u00adate\u00adly after cre\u00adation<\/li>\n\n\n\n<li>first car\u00adri\u00ader which accepts freight con\u00addi\u00adtions and price is select\u00aded<\/li>\n\n\n\n<li>after first accep\u00adtance car\u00adri\u00ader details are attached to freight enti\u00adty<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Authorize access<\/h2>\n\n\n\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\/\" title>autho\u00adrize access<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>client app was reg\u00adis\u00adtered using reg\u00adis\u00adtra\u00adtion form<\/li>\n\n\n\n<li>exter\u00adnal app was grant\u00aded api keys (client_id and client_secret)<\/li>\n\n\n\n<li>autho\u00adriza\u00adtion process has been imple\u00adment\u00aded in exter\u00adnal app<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Create new freight<\/h2>\n\n\n\n<p>Each freight must con\u00adsist of:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>array of car\u00adri\u00aders\u2019 ids<\/li>\n\n\n\n<li>load\u00ading loca\u00adtion and time<\/li>\n\n\n\n<li>unload\u00ading loca\u00adtion and time<\/li>\n\n\n\n<li>required truck body type<\/li>\n\n\n\n<li>sum\u00adma\u00adry of freight\u2019s loads weight<\/li>\n\n\n\n<li>ftl\/ltl para\u00adme\u00adter<\/li>\n\n\n\n<li>price an cur\u00adren\u00adcy<\/li>\n<\/ul>\n\n\n\n<p><strong>Dia\u00adgram<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"505\" src=\"https:\/\/www.trans.eu\/api\/wp-content\/uploads\/publikacja-do-carriera-bez-negocjacji-1-1-1024x505.png\" alt class=\"wp-image-3393\" srcset=\"https:\/\/www.trans.eu\/api\/wp-content\/uploads\/publikacja-do-carriera-bez-negocjacji-1-1-1024x505.png 1024w, https:\/\/www.trans.eu\/api\/wp-content\/uploads\/publikacja-do-carriera-bez-negocjacji-1-1-300x148.png 300w, https:\/\/www.trans.eu\/api\/wp-content\/uploads\/publikacja-do-carriera-bez-negocjacji-1-1-768x379.png 768w, https:\/\/www.trans.eu\/api\/wp-content\/uploads\/publikacja-do-carriera-bez-negocjacji-1-1-1536x758.png 1536w, https:\/\/www.trans.eu\/api\/wp-content\/uploads\/publikacja-do-carriera-bez-negocjacji-1-1-2048x1011.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Request example:<\/strong><\/h2>\n\n\n\n<p><strong>End\u00adpoint<\/strong>:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>POST https:\/\/api.platform.trans.eu\/ext\/freights-api\/v1\/freight-companies<\/code><\/pre><\/div>\n\n\n\n<p><strong>Pay\u00adload<\/strong>:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"publish\": true,\n  \"external_source\": \"api_trans\",\n  \"shipment_external_id\": \"1\/1\/1234\",\n  \"multistop\": true,\n  \"publish_date\": \"2021-07-30T13:10:00+0000\",\n  \"decision_date\": \"2021-08-03T13:00:00+0000\",\n  \"carriers\": [\n    {\n      \"company_id\": 10\n    },\n    {\n      \"company_id\": 1111111\n    }\n  ],\n  \"payment\": {\n    \"price\": {\n      \"value\": 1200,\n      \"currency\": \"eur\",\n      \"period\": {\n        \"payment\": \"deferred\",\n        \"days\": 5\n      }\n    }\n  },\n  \"is_first_buy\": true,\n  \"capacity\": 29,\n  \"loading_meters\": 2,\n  \"requirements\": {\n    \"is_ftl\": true,\n    \"required_truck_bodies\": [\n      \"curtainsider\",\n      \"cooler\"\n    ],\n    \"temperature\": {\n      \"min\": 3,\n      \"max\": 10\n    },\n    \"shipping_remarks\": \"shipping remarks\",\n    \"vehicle_size\": \"bus\",\n    \"required_adr_classes\": [\n      \"adr_1\"\n    ],\n    \"required_ways_of_loading\": [\n      \"top\"\n    ],\n    \"other_requirements\": [\n      \"lift\",\n      \"hds\"\n    ]\n  },\n  \"loads\": [\n    {\n      \"load_id\": \"L123x\",\n      \"name\": \"example name\",\n      \"description\": \"Description\",\n      \"weight\": 12,\n      \"height\": 3,\n      \"width\": 2,\n      \"length\": 8,\n      \"volume\": 21,\n      \"amount\": 1,\n      \"type_of_load\": \"europalette\",\n      \"is_stackable\": true,\n      \"is_exchangeable\": true\n    }\n  ],\n  \"spots\": [\n    {\n      \"description\": \"Example description\",\n      \"name\": \"Spot name\",\n      \"spot_order\": 1,\n      \"place\": {\n        \"address\": {\n          \"country\": \"GB\",\n          \"postal_code\": \"SK7 1\",\n          \"locality\": \"London\",\n          \"street\": \"The Mall\",\n          \"number\": \"1\",\n          \"description\": \"Address description\"\n        },\n        \"coordinates\": {\n          \"latitude\": 53.35801,\n          \"longitude\": -2.16539\n        }\n      },\n      \"operations\": [\n        {\n          \"operation_order\": 1,\n          \"loads\": [\n            {\n              \"load_id\": \"L123x\",\n              \"weight\": 12\n            }\n          ],\n          \"timespans\": {\n            \"begin\": \"2021-08-03T13:10:00+0000\",\n            \"end\": \"2021-08-03T15:10:00+0000\"\n          },\n          \"type\": \"loading\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Spot name 2\",\n      \"description\": \"Description2\",\n      \"spot_order\": 2,\n      \"place\": {\n        \"address\": {\n          \"country\": \"PL\",\n          \"postal_code\": \"61-625\",\n          \"locality\": \"Pozna\u0144\",\n          \"street\": \"Rynek\",\n          \"number\": \"1\",\n          \"description\": \"Address 2\"\n        },\n        \"coordinates\": {\n          \"latitude\": 52.43457,\n          \"longitude\": 16.95141\n        }\n      },\n      \"operations\": [\n        {\n          \"operation_order\": 1,\n          \"loads\": [\n            {\n              \"load_id\": \"L123x\",\n              \"weight\": 10\n            }\n          ],\n          \"type\": \"unloading\",\n          \"timespans\": {\n            \"begin\": \"2021-08-04T13:00:00+0000\",\n            \"end\": \"2021-08-04T14:00:00+0000\"\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"Spot name 3\",\n      \"description\": \"Description3\",\n      \"spot_order\": 3,\n      \"place\": {\n        \"address\": {\n          \"country\": \"DE\",\n          \"postal_code\": \"09000\",\n          \"locality\": \"Brieselang\",\n          \"street\": \"Strasse\",\n          \"number\": \"3\",\n          \"description\": \"Address 3\"\n        },\n        \"coordinates\": {\n          \"latitude\": 52.58216,\n          \"longitude\": 12.99756\n        }\n      },\n      \"operations\": [\n        {\n          \"operation_order\": 1,\n          \"loads\": [\n            {\n              \"load_id\": \"L123x\",\n              \"weight\": 2\n            }\n          ],\n          \"type\": \"unloading\",\n          \"timespans\": {\n            \"begin\": \"2021-08-05T01:00:00+0000\",\n            \"end\": \"2021-08-05T01:00:00+0000\"\n          }\n        }\n      ]\n    }\n  ]\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Verify freight status<\/h2>\n\n\n\n<p>Imme\u00addi\u00adate\u00adly after freight cre\u00adation it is pos\u00adsi\u00adble do access cur\u00adrent freight sta\u00adtus and details:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>GET https:\/\/api.platform.trans.eu\/ext\/freights-api\/v1\/freights\/{freight-id}<\/code><\/pre><\/div>\n\n\n\n<p>If there is a car\u00adri\u00ader\u2019s accep\u00adtance, car\u00adri\u00ader details will be filled out, in oth\u00ader case there will be emp\u00adty col\u00adlec\u00adtion.<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">Descrip\u00adtion of adding new freight for select\u00aded com\u00adpa\u00adnies, with giv\u00aden price, with\u00adout the pos\u00adsi\u00adbil\u00adi\u00adty of freight price nego\u00adti\u00ada\u00adtions.<\/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":[56],"tags":[],"class_list":["post-1828","post","type-post","status-publish","format-standard","hentry","category-use-cases"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":1828},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/1828","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=1828"}],"version-history":[{"count":1,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/1828\/revisions"}],"predecessor-version":[{"id":5540,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/1828\/revisions\/5540"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=1828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=1828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=1828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}