Publish to multi exchanges

Cre­at­ing a new freight and pub­lish­ing it to the select­ed recip­i­ents.
In this request you can simul­ta­ne­ous­ly indi­cate recip­i­ents of dif­fer­ent types: pub­lic Trans.eu Exchange, pri­vate exchanges, con­trac­tor com­pa­nies and con­tact per­sons. The pub­lished freight will appear at the same time for all select­ed recip­i­ents.
The declared pay­ment terms must be com­mon to all recip­i­ents.

After suc­cess­ful­ly exe­cut­ing the method, you receive in response the freight details with the unique freight iden­ti­fi­ca­tion num­ber id assigned when cre­at­ing the new freight.
This method can also be used to sim­ply cre­ate a work­ing copy of the freight for sub­se­quent man­u­al pub­li­ca­tion using any method on the Plat­form.
See more infor­ma­tion about freight pub­li­ca­tion.

POST
/ext/freights-api/v2/freights
Request Authorization

Every request MUST include a valid access token obtained dur­ing the user autho­riza­tion process, pro­vid­ed using the Bear­er token scheme in the Autho­riza­tion head­er.

Successful Response
Request Header
POST /ext/freights-api/v2/freights HTTP/1.1 
Host: api.platform.trans.eu 
Content-Type: application/json
Accept: application/json
Authorization: Bearer {access_token) 
Api-key: {unique_app_api-key}
Request Parameters
AttributeTypeExam­pleManda­to­ryDescrip­tion
callback_urlStringhttp://example.com/msgNoThe return address pro­vid­ed by the client to receive freight and pub­li­ca­tion event sta­tus­es. See list of avail­able event sta­tus­es.
capac­i­tyFloat24YesTotal freight capac­i­ty in tonnes. This val­ue is being val­i­dat­ed in com­par­i­son to the sum of all loads weight
(range: 0,001 – 100000)
contact_employeesArray of String[“13443–1”,“13443–2”]NoThe default con­tact per­son is always the pub­lish­er. If the field is sent, the con­tact per­sons will be only the ID’s sent in it.
decision_dateTime­stamp2025–08–03T13:00:00+0000NoDefines time up to which car­ri­ers can send offers. Cal­cu­lat­ed auto­mat­i­cal­ly for freight-exchange pub­li­ca­tion — it can be max 23:00 on the day of unload­ing.
Required con­di­tion: decision_date > publish_date
heightInt or Float3.2NoExpected/required vehi­cle height (range: 0.01–10)
is_first_buyBooleanFalseNoDefines if price can be nego­ti­at­ed or only accept­ed by car­ri­er. It has no effect on Trans.eu Freight Exchange.
length
Int or Float
5NoExpected/required vehi­cle length (range: 0.01–100)
loading_metersFloat13.6NoTotal freight load­ing meters (range: 0,01 — 417)
loads (see details)Array of Objects[]YesCol­lec­tion of freights loads. It is pos­si­ble to send emp­ty array of loads, nev­er­the­less an array has to be set
pay­ment (see details)ObjectNoPay­ment con­di­tions for pub­li­ca­tion
pub­lishBooleanTrueYesDeter­mines if the freight is auto­mat­i­cal­ly pub­lished (True) or only cre­at­ed (False)
publish_dateTime­stamp2025–08–03T13:00:00+0000NoPub­li­ca­tion (acti­va­tion) date — must be greater or equal today, NULL — imme­di­ate pub­li­ca­tion
receivers (see details below)ObjectYesThe list of exchanges and oth­er recip­i­ents to which the freight is post­ing. At least one recip­i­ent must be select­ed.
require­ments (see details)ObjectYesMain freight require­ments
send_order_proposal_
auto­mat­i­cal­ly
BooleanFalseNoSends the order con­di­tions auto­mat­i­cal­ly. This means that when the car­ri­er accepts such freight, an order is cre­at­ed with the terms of the order, and the ship­per does not have to com­plete them man­u­al­ly.
shipment_external_idString2023/NWX/1/3NoExter­nal iden­ti­fi­ca­tion num­ber
spots (see details)Array of ObjectsYesCol­lec­tion of freights’ spots – at least one load­ing and one unload­ing is required
transit_timeInt or Float280NoTime expressed in min­utes (pos­i­tive inte­ger) for trans­port. Must be less than the dif­fer­ence between the last unload­ing and the first load­ing.
vol­umeInt or Float21NoExpected/required vehi­cle vol­ume (range: 0.01–10000)
widthInt or Float3.1NoExpected/required vehi­cle width (range: 0.01–10)
Receivers Object (Request)
AttributeTypeExam­pleDescrip­tion
public_exchangeBooleanTrueSelec­tion of a Trans.eu Freight Exchange for pub­li­ca­tion
private_exchangesArray of Strings[“051d6149-903a-4735-bc57-feebfd­d8c900”]Selec­tion of pri­vate exchange for pub­li­ca­tion. The val­ues can be checked using Get pri­vate exchanges list request.
corporate_exchangesArray of Strings
[“b3a7b0f1-d7f4-4de8-aa6d-61b5d9bae999”]
Selec­tion of brand­ed pri­vate exchanges for pub­li­ca­tion. The val­ues can be checked using Get brand­ed pri­vate exchanges list request.
com­pa­niesArray of Int[347567, 1353410]Selec­tion of con­trac­tors for pub­li­ca­tion
employ­eesArray of Strings[“347567–1”,“1235410–2”]Selec­tion of con­tact per­sons for pub­li­ca­tion

At least one recip­i­ent from the list above must be select­ed.

Example Request Body
{
  "callback_url": "http://example.com/msg",  
  "capacity": 12,
  "decision_date": "2026-02-23T17:55:00+0100",
  "height":4.3,
  "length":5.8,
  "loading_meters": 10.1,
  "loads": [ {
      "type_of_load": "container_palette",
      "name": "Load nr 1",
      "load_id": "1123dfd121_1",
      "amount":2
  }],
  "payment": {
    "price": {
        "value": 450,
        "currency": "eur",
        "period": { 
            "payment": "deferred", 
            "days": 21
        }
    }
  },
  "publish": true,
  "publish_date": null,
  "receivers": {
    "public_exchange": true,
    "companies": [],
    "employees": ["567347-1"],
    "community_exchanges": [],
    "corporate_exchanges": ["006e95ea-f307-4a67-bc28-336dfc1cd679"],
    "private_exchanges": ["49b9aa2b-1987-48d9-9a77-147f97594233"],
    "contracts": []
  },
  "requirements": {
    "is_ftl": true,
    "required_truck_bodies": [
      "curtainsider"
    ],
    "vehicle_size": "solo"
  },
  "send_order_proposal_automatically": true,
  "shipment_external_id": "1123dfd121",
  "spots": [
    {
      "spot_order": 1,
      "operations": [
        {
          "operation_order": 1,
          "type": "loading",
          "timespans": {
            "begin": "2026-02-23T13:30:58+01:00",
            "end": "2026-02-23T15:30:58+01:00"
          }
        }
      ],
      "place": {
        "address": {
          "country": "PL",
          "postal_code": "54-128",
          "locality": "Wroclaw"
        }
      }
    },
    {
      "spot_order": 2,
      "operations": [
        {
          "operation_order": 1,
          "type": "unloading",
          "timespans": {
            "begin": "2026-02-26T15:30:58+01:00",
            "end": "2026-02-26T17:30:58+01:00"
          }
        }
      ],
      "place": {
        "address": {
          "country": "DE",
          "postal_code": "10178",
          "locality": "Berlin"
        }
      }
    }
  ],
  "volume":12.6,
  "width": 3.1
}
Response Fields
AttributeTypeExam­pleDescrip­tion
accepted_priceObjectnullFinal price for freight accept­ed dur­ing pub­li­ca­tion and nego­ti­a­tion process. The val­ue is always null in this request.
capac­i­tyFloat22.1Total freight capac­i­ty in tonnes.
car­ri­erObjectnullCar­ri­er select­ed dur­ing nego­ti­a­tion process. The val­ue is always null in this request.
contact_employeesArray of ObjectsList of employ­ees assigned to freight nego­ti­a­tion. Default is pub­lish­er.
contact_employees.last_nameStringNowakSur­name of assigned employ­ee
contact_employees.nameStringJanFirst name of assigned employ­ee
contact_employees.trans_idString13443–1Tran­sId of assigned employ­ee
dis­tanceInt34000Dis­tance in meters from the point of load­ing to the point of unload­ing.
end_reasonStringnullPub­li­ca­tion end rea­son.
For cor­rect pub­li­ca­tion or freight cre­ation only null is returned.
heightFloat3.1Vehi­cle height (range: 0.01–10)
idInt234923Freight iden­ti­fi­ca­tion num­ber, assigned auto­mat­i­cal­ly dur­ing cre­ation of a new freight.
is_first_buyBooleanFalseDefines if price will be nego­ti­at­ed or only accept­ed by car­ri­er.
lengthFloat12Vehi­cle length (range: 0.01–100)
loading_metersFloat23Total freight load­ing meters (range: 0,01 — 417)
loads (see details)Array of ObjectsCol­lec­tion of freight loads.
publication_priceObjectPub­li­ca­tion price infor­ma­tion
publication_price.currencyStringeurPub­li­ca­tion price cur­ren­cy. See cur­ren­cy dic­tio­nary.
publication_price.valueInt560Pub­li­ca­tion price val­ue. The val­ue is null if was not spec­i­fied.
publication_statusStringactiveSta­tus of the pub­li­ca­tion — always null in pub­lish­ing request
receivers (see details below)ObjectList of pri­vate and cor­po­rate exchanges to which the freight was sent.
reference_numberStringFR/2025/12/30/2NNQFreight ref­er­ence num­ber — a unique, auto­mat­i­cal­ly assigned busi­ness iden­ti­fi­er of the freight
require­ments (see details)ObjectMain freight require­ments
sent_to (see details below)ObjectDes­ig­na­tion of the types of recip­i­ents to whom the pub­li­ca­tion is addressed
shipment_external_idString2023/NWX/1/3Exter­nal iden­ti­fi­ca­tion num­ber
spots (see details)Array of ObjectsCol­lec­tion of freights’ spots. At least one load­ing and one unload­ing will occur.
sta­tusStringnewFreight sta­tus. The val­ue is always waiting_for_publication in this request. See for oth­er pos­si­ble sta­tus­es.
sur­chagesObjectnullSur­chages for fixed routes. The val­ue is always null in this request.
transit_timeInt460Time expressed in min­utes (pos­i­tive inte­ger) for trans­port, if spec­i­fied.
vol­umeFloat21Vehi­cle vol­ume (range 0.01–10000).
widthFloat3.1Vehi­cle width (range 0.01–10).
Receivers Object (Response)
AttributeTypeExam­pleDescrip­tion
private_exchangesArray of ObjectList of pri­vate exchanges to which the freight was sent.
private_exchanges.idString“b3a7b0f1-d7f4-4de8-aa6d-61b5d9bae999”Pri­vate exchange id
private_exchanges.nameString“Tran­sEX pri­vate exchange”Pri­vate exchange name
corporate_exchangesArray of ObjectList of brand­ed pri­vate exchanges to which the freight was sent.
corporate_exchanges.idString“051d6149-903a-4735-bc57-feebfd­d8c900”Cor­po­rate exchange id
corporate_exchanges.nameString“Tran­sEx­press South Europe”Cor­po­rate exchange name
community_exchangesArray of ObjectList of com­mu­ni­ty exchanges to which the freight was sent. Func­tion­al­i­ty unavail­able at this time.
community_exchanges.idString“051d6149-903a-4735-bc57-feebfd­d8c900”Com­mu­ni­ty exchange id
community_exchanges.nameString“Car­go LOT com­mu­ni­ty”Com­mu­ni­ty exchange name
Sent_to Object (Response)
AttributeTypeExam­pleDescrip­tion
community_exchangeBooleanFalseAlways null
com­pa­niesBooleanFalseCom­pa­ny recip­i­ent
con­tractsBooleanFalseAlways null
corporate_exchangesBooleanTrueBrand­ed pri­vate exchange recip­i­ent
directBooleanFalseDirect (per­son) recip­i­ent
private_exchangeBooleanFalseNot brand­ed pri­vate exchange recip­i­ent
public_exchangeBooleanTrueTrans.eu Freight Exchange recip­i­ent
Response Body
{
    "accepted_price": null,
    "capacity": 12,
    "carrier": null,
    "contact_employees": [
        {
            "last_name": "Nowak",
            "name": "Jan",
            "trans_id": "1007374-1"
        }
    ],
    "distance": null,
    "end_reason": null,
    "height": 4.3,
    "id": 3830015,
    "is_first_buy": null,
    "length": 5.8,
    "loading_meters": 10.1,
    "loads": [
        {
            "amount": 2,
            "cleaning_regime": null,
            "description": null,
            "height": null,
            "id": 3765877,
            "idtf": null,
            "is_exchangeable": false,
            "is_stackable": false,
            "length": null,
            "load_id": "3765877",
            "name": "Load nr 1",
            "type_of_load": "container_palette",
            "volume": null,
            "weight": null,
            "width": null
        }
    ],
    "publication_price": null,
    "publication_status": null,
    "receivers": {
        "community_exchanges": [],
        "corporate_exchanges": [
            {
                "id": "006e95ea-f307-4a67-bc28-336dfc1cd679",
                "name": "API test"
            }
        ],
        "private_exchanges": [
            {
                "id": "49b9aa2b-1987-48d9-9a77-147f97594233",
                "name": "Private"
            }
        ]
    },
    "reference_number": "FR/2026/02/23/2NTS",
    "requirements": {
        "exemption_from_adr": false,
        "is_ftl": true,
        "is_mini_tenders": false,
        "monitoring": "required",
        "other_requirements": [],
        "required_adr_classes": [],
        "required_door_types": [],
        "required_tipper_trailer_additional_equipment": [],
        "required_truck_bodies": [
            "curtainsider"
        ],
        "required_ways_of_loading": [],
        "shipping_remarks": null,
        "temperature": {
            "max": null,
            "min": null
        },
        "transport": {
            "count": null,
            "schedule_type": null,
            "settlement": "route",
            "settlement_basis": null,
            "total_weight": null,
            "type": "ftl",
            "units_per_transport": null
        },
        "vehicle_size_id": "solo"
    },
    "sent_to": {
        "community_exchange": false,
        "companies": false,
        "contracts": false,
        "corporate_exchange": true,
        "direct": true,
        "private_exchange": true,
        "public_exchange": true
    },
    "shipment_external_id": "1123dfd121",
    "spots": [
        {
            "description": null,
            "name": null,
            "operations": [
                {
                    "id": 8670464,
                    "loads": [],
                    "operation_order": 1,
                    "operation_time": null,
                    "timespans": {
                        "begin": "2026-02-23T13:30:58+01:00",
                        "begin_local": "2026-02-23T13:30:58+01:00",
                        "end": "2026-02-23T15:30:58+01:00",
                        "end_local": "2026-02-23T15:30:58+01:00",
                        "timezone": "Europe/Warsaw"
                    },
                    "type": "loading"
                }
            ],
            "place": {
                "address": {
                    "country": "pl",
                    "description": null,
                    "detailed_location_id": null,
                    "foreign_id": null,
                    "id": 8511355,
                    "locality": "Wroclaw",
                    "location_id": null,
                    "number": null,
                    "postal_code": "54-128",
                    "radius": null,
                    "street": null
                },
                "coordinates": {
                    "latitude": 51.142329074,
                    "longitude": 16.937462521
                },
                "range_distance": null
            },
            "spot_order": 1
        },
        {
            "description": null,
            "name": null,
            "operations": [
                {
                    "id": 8670465,
                    "loads": [],
                    "operation_order": 1,
                    "operation_time": null,
                    "timespans": {
                        "begin": "2026-02-26T15:30:58+01:00",
                        "begin_local": "2026-02-26T15:30:58+01:00",
                        "end": "2026-02-26T17:30:58+01:00",
                        "end_local": "2026-02-26T17:30:58+01:00",
                        "timezone": "Europe/Berlin"
                    },
                    "type": "unloading"
                }
            ],
            "place": {
                "address": {
                    "country": "de",
                    "description": null,
                    "detailed_location_id": null,
                    "foreign_id": null,
                    "id": 8511356,
                    "locality": "Berlin",
                    "location_id": null,
                    "number": null,
                    "postal_code": "10178",
                    "radius": null,
                    "street": null
                },
                "coordinates": {
                    "latitude": 52.519971677,
                    "longitude": 13.404467562
                },
                "range_distance": null
            },
            "spot_order": 2
        }
    ],
    "status": "waiting_for_publication",
    "surcharges": [],
    "transit_time": null,
    "volume": 12.6,
    "width": 3.1
}

Client errors (code 400)

HTTP 4xx sta­tus codes indi­cate client errors, mean­ing that the request could not be processed due to an issue on the client side. Below is a list of request-spe­cif­ic errors.

Example error 1

No manda­to­ry val­ue in capac­i­ty field

{
    "detail": "Failed Validation",
    "status": 422,
    "title": "Unprocessable Entity",
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "validation_messages": {
        "capacity": {
            "value": {
                "isEmpty": "Value is required and can't be empty"
            }
        }
    }
}
Example error 2

Incor­rect date in spot oper­a­tion

"validation_messages": {
        "spot_operation": {
            "validation_error": "In one of spot.operation begin or end date is lower or equal today (UTC)"
        }
    }
Example error 3

Vehi­cle type not allowed for vehi­cle size

"validation_messages": {
            "vehicle_size_id": {
                "invalid": "['7_silos'] is not valid for vehicle size: '1_bus'"
            }
        }
    }
Example error 4

No receivers

// 400 Bad Request
{
    "error": "At least one value in Body.receivers must be set."
}
Example error 5

Incor­rect truck body for bulk load

{
    "detail": "Failed Validation",
    "status": 422,
    "title": "Unprocessable Entity",
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "validation_messages": {
        "requirements": {
            "transport": {
                "settlement": {
                    "invalid": "Non bulk load truck body type provided"
                },
                "total_weight": {
                    "invalid": "Non bulk load truck body type provided"
                }
            }
        }
    }
}