{"id":2161,"date":"2020-08-26T14:13:46","date_gmt":"2020-08-26T12:13:46","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=2161"},"modified":"2026-01-08T14:36:43","modified_gmt":"2026-01-08T13:36:43","slug":"shipment-of-multiple-load-in-multiple-locations","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/use-cases\/shipment-of-multiple-load-in-multiple-locations\/","title":{"rendered":"Shipment of multiple load in multiple locations"},"content":{"rendered":"\n<p>Ship\u00adment of one load from point A to point B<\/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>many defined loads with mul\u00adti\u00adple load\u00adings and unload\u00adings:\n<ul class=\"wp-block-list\">\n<li>load L1 \u2014 weight: 8 tonnes<\/li>\n\n\n\n<li>load L2 \u2014 weight 3 tonnes<\/li>\n\n\n\n<li>load L3 \u2014 weight 10 tonnes<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>mul\u00adti\u00adple oper\u00ada\u00adtions in more than two loca\u00adtions\n<ul class=\"wp-block-list\">\n<li>first spot \u2014 load\u00ading L1 and L2<\/li>\n\n\n\n<li>sec\u00adond spot \u2014 load\u00ading L3<\/li>\n\n\n\n<li>third spot \u2014 unload\u00ading L3 and load\u00ading L1<\/li>\n\n\n\n<li>fourth spot \u2014 unload\u00ading L1 and unload\u00ading L2<\/li>\n<\/ul>\n<\/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&nbsp;<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>loads def\u00adi\u00adn\u00adi\u00adtion<\/li>\n\n\n\n<li>load\u00ading loca\u00adtions and time<\/li>\n\n\n\n<li>unload\u00ading loca\u00adtions and time<\/li>\n\n\n\n<li>load ref\u00ader\u00adence in load\u00ading and unload\u00ading points<\/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<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Request<\/h2>\n\n\n\n<p>This type of freight para\u00adme\u00adters can be used with all types of pub\u00adli\u00adca\u00adtion meth\u00adods. Some con\u00addi\u00adtions apply.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>POST https:\/\/api.platform.tran.eu\/ext\/freights-api\/v1\/freights-{publication method}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Request example:&nbsp;<\/strong><\/h2>\n\n\n\n<p>Exam\u00adple of freight request:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"payment\": {\n    \"price\": {\n      \"value\": 123,\n      \"currency\": \"eur\"\n    }\n  },\n  \"capacity\": 21,\n  \"exchange_recipients\": \"carriers\",\n  \"requirements\": {\n    \"is_ftl\": false,\n    \"required_truck_bodies\": [\n      \"cooler\"\n    ]\n  },\n  \"loads\": [\n    {\n      \"name\": \"example\",\n      \"description\": \"Example description of first load\",\n      \"load_id\": \"L1\",\n      \"type_of_load\": \"palette\",\n      \"weight\": 8,\n      \"height\": 1,\n      \"length\": 1,\n      \"volume\": 1,\n      \"amount\": 1,\n      \"is_stackable\": false,\n      \"is_exchangeable\": false\n    },\n    {\n      \"name\": \"example\",\n      \"description\": \"Example description of second load\",\n      \"load_id\": \"L2\",\n      \"type_of_load\": \"palette\",\n      \"weight\": 3,\n      \"height\": 1,\n      \"length\": 1,\n      \"volume\": 1,\n      \"amount\": 1,\n      \"is_stackable\": false,\n      \"is_exchangeable\": false\n    },\n    {\n      \"name\": \"example\",\n      \"description\": \"Example description of third load\",\n      \"load_id\": \"L3\",\n      \"type_of_load\": \"palette\",\n      \"weight\": 10,\n      \"height\": 1,\n      \"length\": 1,\n      \"volume\": 1,\n      \"amount\": 1,\n      \"is_stackable\": false,\n      \"is_exchangeable\": false\n    }\n  ],\n  \"carriers\": [\n    {\n      \"company_id\": 1111111\n    }\n  ],\n  \"spots\": [\n    {\n      \"spot_order\": 1,\n      \"place\": {\n        \"address\": {\n          \"country\": \"fr\",\n          \"postal_code\": \"11111\",\n          \"locality\": \"null\"\n        },\n        \"coordinates\": {\n          \"latitude\": 49.8056,\n          \"longitude\": 12.1881\n        }\n      },\n      \"operations\": [\n        {\n          \"timespans\": {\n            \"begin\": \"2021-07-25T09:00:00+01:00\",\n            \"end\": \"2021-07-25T09:00:00+01:00\"\n          },\n          \"type\": \"loading\",\n          \"operation_order\": 1,\n          \"loads\": [\n            {\n              \"load_id\": \"L1\",\n              \"weight\": 8\n            },\n            {\n              \"load_id\": \"L2\",\n              \"weight\": 3\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"spot_order\": 2,\n      \"place\": {\n        \"address\": {\n          \"country\": \"lt\",\n          \"postal_code\": \"22222\",\n          \"locality\": \"City\"\n        },\n        \"coordinates\": {\n          \"latitude\": null,\n          \"longitude\": null\n        }\n      },\n      \"operations\": [\n        {\n          \"timespans\": {\n            \"begin\": \"2021-07-27T09:00:00+01:00\",\n            \"end\": \"2021-07-27T09:00:00+01:00\"\n          },\n          \"type\": \"loading\",\n          \"operation_order\": 1,\n          \"loads\": [\n            {\n              \"load_id\": \"L3\",\n              \"weight\": 10\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"spot_order\": 3,\n      \"place\": {\n        \"address\": {\n          \"country\": \"fr\",\n          \"postal_code\": \"11111\",\n          \"locality\": \"null\"\n        },\n        \"coordinates\": {\n          \"latitude\": 49.8056,\n          \"longitude\": 12.1881\n        }\n      },\n      \"operations\": [\n        {\n          \"timespans\": {\n            \"begin\": \"2021-07-28T09:00:00+01:00\",\n            \"end\": \"2021-07-28T09:00:00+01:00\"\n          },\n          \"type\": \"unloading\",\n          \"operation_order\": 1,\n          \"loads\": [\n            {\n              \"load_id\": \"L3\",\n              \"weight\": 10\n            }\n          ]\n        },\n        {\n          \"timespans\": {\n            \"begin\": \"2021-07-29T09:00:00+01:00\",\n            \"end\": \"2021-07-29T09:00:00+01:00\"\n          },\n          \"type\": \"unloading\",\n          \"operation_order\": 2,\n          \"loads\": [\n            {\n              \"load_id\": \"L1\",\n              \"weight\": 4\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"spot_order\": 4,\n      \"place\": {\n        \"address\": {\n          \"country\": \"fr\",\n          \"postal_code\": \"11111\",\n          \"locality\": \"null\"\n        },\n        \"coordinates\": {\n          \"latitude\": 49.8056,\n          \"longitude\": 12.1881\n        }\n      },\n      \"operations\": [\n        {\n          \"timespans\": {\n            \"begin\": \"2021-07-30T09:00:00+01:00\",\n            \"end\": \"2021-07-30T09:00:00+01:00\"\n          },\n          \"type\": \"unloading\",\n          \"operation_order\": 1,\n          \"loads\": [\n            {\n              \"load_id\": \"L1\",\n              \"weight\": 4\n            },\n            {\n              \"load_id\": \"L2\",\n              \"weight\": 3\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"publish\": true\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Response<\/h2>\n\n\n\n<p>Each car\u00adri\u00ader might respond with price con\u00addi\u00adtions accep\u00adtance. Direct\u00adly after freight pub\u00adli\u00adca\u00adtion there will be an emp\u00adty array of offers received using:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>https:\/\/api.platform.tran.eu\/ext\/freights-api\/v1\/freights\/{freightId}\/offers<\/code><\/pre><\/div>\n\n\n\n<p>Once offer is sent by car\u00adri\u00ader, it will fill out this array, for exam\u00adple:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>[\n  {\n    \"company_id\": 1111111,\n    \"created_at\": \"2021-07-23T13:25:02+02:00\",\n    \"freight_id\": 820262,\n    \"id\": 1892813,\n    \"legal_name\": \"Firma Testowa Przewo\u017anik\",\n    \"price\": {\n      \"currency\": \"eur\",\n      \"value\": 130\n    },\n    \"status\": \"waiting_for_accept\",\n    \"trans_id\": \"1111111-1\",\n    \"vat_id\": \"1111111111\",\n    \"version\": 3\n  }\n]<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conditions:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>each offer has own unique id<\/li>\n\n\n\n<li>each car\u00adri\u00ader is allowed to send one offer<\/li>\n\n\n\n<li>each offer can be respond\u00aded to<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">Ship\u00adment of one load from point A to point B<\/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-2161","post","type-post","status-publish","format-standard","hentry","category-use-cases"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":2161},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/2161","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=2161"}],"version-history":[{"count":1,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/2161\/revisions"}],"predecessor-version":[{"id":5535,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/2161\/revisions\/5535"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=2161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=2161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=2161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}