{"id":5165,"date":"2025-07-04T09:38:29","date_gmt":"2025-07-04T07:38:29","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=5165"},"modified":"2025-12-29T10:05:59","modified_gmt":"2025-12-29T09:05:59","slug":"new-freight-to-multi-exchange","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/freights\/new-freight-to-multi-exchange\/","title":{"rendered":"New freight to multi exchange"},"content":{"rendered":"\n<p><span style=\"font-weight: 400;\">Cre\u00adat\u00ading new freight at Trans.eu Plat\u00adform and send\u00ading it to Freight mul\u00adti exchange.<\/span><\/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>URL:<\/strong> https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint:<\/strong> \/ext<span style=\"font-weight: 400;\">\/freights-api\/v2\/freights<\/span><\/li>\n\n\n\n<li><strong>Method:<\/strong> POST<\/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>Con\u00adtent-type: application\/json<\/li>\n\n\n\n<li>Accept: application\/json<\/li>\n\n\n\n<li>Autho\u00adriza\u00adtion: Bear\u00ader {access_token}<\/li>\n\n\n\n<li>Api-key: {unique_app_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 <a href=\"https:\/\/www.trans.eu\/api\/general-information\/authorization-process\/\" target=\"_blank\" rel=\"noopener\" title>here<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Json<\/strong><\/td><td><strong>Exam\u00adple<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Is required<\/strong><\/td><td><strong>Descrip\u00adtion<\/strong><\/td><\/tr><tr><td>capac\u00adi\u00adty<\/td><td>12<\/td><td>Float<\/td><td>Yes<\/td><td>Total freight capac\u00adi\u00adty in tonnes. This val\u00adue is being val\u00adi\u00addat\u00aded in com\u00adpar\u00adi\u00adson to the sum of all loads weight.<br>Range: 0,001 \u2013 100000<\/td><\/tr><tr><td>pub\u00adlish<\/td><td>True<\/td><td>Boolean<\/td><td>Yes<\/td><td>Deter\u00admines if the freight is auto\u00admat\u00adi\u00adcal\u00adly pub\u00adlished or only cre\u00adat\u00aded<\/td><\/tr><tr><td>pay\u00adment<\/td><td>Object<\/td><td><\/td><td>No<\/td><td>Pay\u00adment con\u00addi\u00adtions for pub\u00adli\u00adca\u00adtion using groups or smart match<\/td><\/tr><tr><td>require\u00adments<\/td><td>Object<\/td><td><\/td><td>Yes<\/td><td>Main freight require\u00adments, includ\u00ading truck body and size adr class\u00ades, ways of load\u00ading<\/td><\/tr><tr><td>loads<\/td><td>Array<\/td><td><\/td><td>No<\/td><td>Col\u00adlec\u00adtion of freights\u2019 loads. It is pos\u00adsi\u00adble to send emp\u00adty array of loads, nev\u00ader\u00adthe\u00adless an array has to be set<\/td><\/tr><tr><td>spots<\/td><td>Object<\/td><td><\/td><td>Yes<\/td><td>Col\u00adlec\u00adtion of freights\u2019 spots \u2013 at least one load\u00ading and one unload\u00ading is required<\/td><\/tr><tr><td>receivers<\/td><td>Object<\/td><td><\/td><td>Yes<\/td><td>Spec\u00adi\u00adfies the list of exchanges on which the offer is pub\u00adlished. Mul\u00adti\u00adple types of exchanges can be spec\u00adi\u00adfied at the same time.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Example request<\/h2>\n\n\n\n<p>Sam\u00adple Json for cre\u00adat\u00ading new freight using required data only<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\" data-show-lang=\"1\"><code>{\n    \"capacity\": 12,\n    \"requirements\": {\n        \"is_ftl\": true,\n        \"required_truck_bodies\": [\n            \"dump-truck\"\n        ],\n        \"vehicle_size\": \"lorry\"\n    },\n    \"loads\": [],\n    \"spots\": [\n        {\n            \"spot_order\": 1,\n            \"place\": {\n                \"address\": {\n                    \"country\": \"pl\",\n                    \"street\": \"Rac\u0142awicka\",\n                    \"locality\": \"Wroc\u0142aw\",\n                    \"postal_code\": \"53-146\"\n                }\n            },\n            \"operations\": [\n                {\n                    \"type\": \"loading\",\n                    \"operation_order\": 1,\n                    \"timespans\": {\n                        \"end\": \"2025-07-04T13:00:00+0100\",\n                        \"begin\": \"2025-07-04T12:00:00+0100\"\n                    }\n                }\n            ]\n        },\n        {\n            \"spot_order\": 2,\n            \"place\": {\n                \"address\": {\n                    \"country\": \"de\",\n                    \"street\": \"Aktienstra\u00dfe 177\",\n                    \"locality\": \"Essen\",\n                    \"postal_code\": \"45359\"\n                }\n            },\n            \"operations\": [\n                {\n                    \"type\": \"unloading\",\n                    \"operation_order\": 1,\n                    \"timespans\": {\n                        \"end\": \"2025-07-05T13:00:00+0100\",\n                        \"begin\": \"2025-07-05T12:00:00+0100\"\n                    }\n                }\n            ]\n        }\n    ],\n    \"receivers\": {\n        \"corporate_exchanges\": [\"b3a7b0f0-d7f4-4de8-aa6d-61b5d9bae999\"],\n        \"private_exchanges\": [\"051d6148-903a-4735-bc57-feebfdd8c900\"],\n        \"public_exchange\": true\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Response<\/h2>\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\": 12,\n    \"carrier\": null,\n    \"contact_employees\": [\n        {\n            \"last_name\": \"Testowy\",\n            \"name\": \"Jan\",\n            \"trans_id\": \"1111111-1\"\n        }\n    ],\n    \"distance\": null,\n    \"end_reason\": null,\n    \"id\": 3247659,\n    \"is_first_buy\": null,\n    \"loads\": [],\n    \"publication_price\": null,\n    \"publication_status\": null,\n    \"receivers\": {\n        \"corporate_exchanges\": [\n            {\n                \"id\": \"b3a7b0f0-d7f4-4de8-aa6d-61b5d9bae999\",\n                \"name\": \"API\"\n            }\n        ],\n        \"private_exchanges\": [\n            {\n                \"id\": \"051d6148-903a-4735-bc57-feebfdd8c900\",\n                \"name\": \"Private\"\n            }\n        ]\n    },\n    \"reference_number\": \"FR\/2025\/07\/04\/2N13\",\n    \"requirements\": {\n        \"exemption_from_adr\": false,\n        \"is_ftl\": true,\n        \"is_mini_tenders\": false,\n        \"monitoring\": \"required\",\n        \"other_requirements\": [],\n        \"required_adr_classes\": [],\n        \"required_door_types\": [],\n        \"required_tipper_trailer_additional_equipment\": [],\n        \"required_truck_bodies\": [\n            \"dump-truck\"\n        ],\n        \"required_ways_of_loading\": [],\n        \"shipping_remarks\": null,\n        \"temperature\": {\n            \"max\": null,\n            \"min\": null\n        },\n        \"transport\": {\n            \"count\": null,\n            \"schedule_type\": null,\n            \"settlement\": \"route\",\n            \"settlement_basis\": null,\n            \"total_weight\": null,\n            \"type\": \"ftl\",\n            \"units_per_transport\": null\n        },\n        \"vehicle_size_id\": \"lorry\"\n    },\n    \"sent_to\": {\n        \"corporate_exchange\": true,\n        \"private_exchange\": true,\n        \"public_exchange\": true\n    },\n    \"shipment_external_id\": null,\n    \"spots\": [\n        {\n            \"description\": null,\n            \"name\": null,\n            \"operations\": [\n                {\n                    \"id\": 7492124,\n                    \"loads\": [],\n                    \"operation_order\": 1,\n                    \"operation_time\": null,\n                    \"timespans\": {\n                        \"begin\": \"2025-07-04T13:00:00+02:00\",\n                        \"begin_local\": \"2025-07-04T13:00:00+02:00\",\n                        \"end\": \"2025-07-04T14:00:00+02:00\",\n                        \"end_local\": \"2025-07-04T14:00:00+02:00\",\n                        \"timezone\": \"Europe\/Warsaw\"\n                    },\n                    \"type\": \"loading\"\n                }\n            ],\n            \"place\": {\n                \"address\": {\n                    \"country\": \"pl\",\n                    \"description\": null,\n                    \"detailed_location_id\": null,\n                    \"foreign_id\": null,\n                    \"id\": 7333952,\n                    \"locality\": \"Wroc\u0142aw\",\n                    \"location_id\": null,\n                    \"number\": null,\n                    \"postal_code\": \"53-146\",\n                    \"radius\": null,\n                    \"street\": \"Rac\u0142awicka\"\n                },\n                \"coordinates\": {\n                    \"latitude\": 51.079202595,\n                    \"longitude\": 16.993128942\n                },\n                \"range_distance\": null\n            },\n            \"spot_order\": 1\n        },\n        {\n            \"description\": null,\n            \"name\": null,\n            \"operations\": [\n                {\n                    \"id\": 7492125,\n                    \"loads\": [],\n                    \"operation_order\": 1,\n                    \"operation_time\": null,\n                    \"timespans\": {\n                        \"begin\": \"2025-07-05T13:00:00+02:00\",\n                        \"begin_local\": \"2025-07-05T13:00:00+02:00\",\n                        \"end\": \"2025-07-05T14:00:00+02:00\",\n                        \"end_local\": \"2025-07-05T14:00:00+02:00\",\n                        \"timezone\": \"Europe\/Berlin\"\n                    },\n                    \"type\": \"unloading\"\n                }\n            ],\n            \"place\": {\n                \"address\": {\n                    \"country\": \"de\",\n                    \"description\": null,\n                    \"detailed_location_id\": null,\n                    \"foreign_id\": null,\n                    \"id\": 7333953,\n                    \"locality\": \"Essen\",\n                    \"location_id\": null,\n                    \"number\": null,\n                    \"postal_code\": \"45359\",\n                    \"radius\": null,\n                    \"street\": \"Aktienstra\u00dfe 177\"\n                },\n                \"coordinates\": {\n                    \"latitude\": 51.46695325,\n                    \"longitude\": 6.921194574\n                },\n                \"range_distance\": null\n            },\n            \"spot_order\": 2\n        }\n    ],\n    \"status\": \"waiting_for_publication\",\n    \"surcharges\": [],\n    \"transit_time\": null\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">Cre\u00adat\u00ading new freight at Trans.eu Plat\u00adform and send\u00ading it to Freight mul\u00adti exchange.<\/p>\n","protected":false},"author":12,"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":[83,42],"tags":[],"class_list":["post-5165","post","type-post","status-publish","format-standard","hentry","category-create-new-freight","category-freights"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":5165},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/5165","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\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/comments?post=5165"}],"version-history":[{"count":2,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/5165\/revisions"}],"predecessor-version":[{"id":5449,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/5165\/revisions\/5449"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=5165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=5165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=5165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}