New freight to freight exchange

Cre­at­ing new freight at Trans.eu Plat­form and send­ing it to Freight exchange.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/freights-api/v1/freight-exchange
  • Method: POST

Headers:

  • Con­tent-type: application/json
  • Accept: application/json
  • Autho­riza­tion: Bear­er {access_token}
  • Api-key: {unique_app_api_key}

Authorization

Autho­riza­tion process is described here.

JsonExam­pleTypeIs requiredDescrip­tion
shipment_external_id2020/ABC/1/1StringNoExter­nal iden­ti­fi­ca­tion num­ber
external_source1_apiStringNoFreight source iden­ti­fi­er assigned to client_id pro­vid­ed by Trans.eu
capac­i­ty12FloatYesTotal 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
pub­lishTrueBooleanYesDeter­mines if the freight is auto­mat­i­cal­ly pub­lished or only cre­at­ed
pay­mentObjectNoPay­ment con­di­tions for pub­li­ca­tion using groups or smart match
require­mentsObjectYesMain freight require­ments, includ­ing truck body and size adr class­es, ways of load­ing
loadsArrayNoCol­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
spotsObjectYesCol­lec­tion of freights’ spots – at least one load­ing and one unload­ing is required

Example request

Sam­ple Json for cre­at­ing new freight using required data only

{
  "publish": true,
  "external_source": "1_api",
  "capacity": 29,
  "requirements": {
    "is_ftl": true,
    "required_truck_bodies": [
      "curtainsider",
      "cooler"
    ]
  },
  "loads": [],
  "spots": [
    {
      "spot_order": 1,
      "place": {
        "address": {
          "country": "GB",
          "postal_code": "SK7 1",
          "locality": "London"
        }
      },
      "operations": [
        {
          "operation_order": 1,
          "timespans": {
            "begin": "2021-09-30T13:10:00+0000",
            "end": "2021-09-30T15:10:00+0000"
          },
          "type": "loading"
        }
      ]
    },
    {
      "spot_order": 2,
      "place": {
        "address": {
          "country": "PL",
          "postal_code": "61-625",
          "locality": "Poznań"
        }
      },
      "operations": [
        {
          "operation_order": 1,
          "type": "unloading",
          "timespans": {
            "begin": "2021-10-01T13:00:00+0000",
            "end": "2021-10-01T14:00:00+0000"
          }
        }
      ]
    }
  ]
}

Response

{
  "accepted_price": null,
  "capacity": 29,
  "carrier": null,
  "id": 890677,
  "loading_meters": null,
  "loads": [],
  "publication_price": {
    "currency": "eur",
    "value": null
  },
  "reference_number": "FR/2021/09/28/L1D2",
  "requirements": {
    "is_ftl": true,
    "monitoring": "expected",
    "other_requirements": [],
    "required_adr_classes": [],
    "required_truck_bodies": [
      "curtainsider",
      "cooler"
    ],
    "required_ways_of_loading": [],
    "shipping_remarks": null,
    "temperature": {
      "max": null,
      "min": null
    },
    "vehicle_size": "any_size"
  },
  "shipment_external_id": null,
  "spots": [
    {
      "description": null,
      "name": null,
      "operations": [
        {
          "loads": [],
          "operation_order": 1,
          "timespans": {
            "begin": "2021-09-30T15:10:00+02:00",
            "end": "2021-09-30T17:10:00+02:00"
          },
          "type": "loading"
        }
      ],
      "place": {
        "address": {
          "country": "gb",
          "description": null,
          "locality": "London",
          "number": null,
          "postal_code": "SK7 1",
          "street": null
        },
        "coordinates": {
          "latitude": null,
          "longitude": null
        }
      },
      "spot_order": 1
    },
    {
      "description": null,
      "name": null,
      "operations": [
        {
          "loads": [],
          "operation_order": 1,
          "timespans": {
            "begin": "2021-10-01T15:00:00+02:00",
            "end": "2021-10-01T16:00:00+02:00"
          },
          "type": "unloading"
        }
      ],
      "place": {
        "address": {
          "country": "pl",
          "description": null,
          "locality": "Poznań",
          "number": null,
          "postal_code": "61-625",
          "street": null
        },
        "coordinates": {
          "latitude": 52.436170987,
          "longitude": 16.951637018
        }
      },
      "spot_order": 2
    }
  ],
  "status": "new"
}