New freight to private exchange branded

Cre­at­ing new freight and send­ing it to pri­vate exchange brand­ed. To check pri­vate exchange brand­ed id use that method first.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ex­t/freights-api/v1/freight-cor­po­rate
  • 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
contact_employees[“12345–1”, “12345–2”]ArrayNoThe 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
pay­mentObjectNoYou can spec­i­fy the val­ue of the pay­ment, the cur­ren­cy of the pay­ment and the method of pay­ment
require­mentsObjectYesMain freight require­ments, includ­ing truck body and size adr class­es, ways of load­ing
exchangesObjectYesCon­tains pri­vate exchange brand­ed id
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

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

{
  "capacity": 20,
  "requirements": {
    "is_ftl": true,
    "required_truck_bodies": [
      "cooler"
    ]
  },
  "publish": true,
  "spots": [
    {
      "spot_order": 1,
      "place": {
        "address": {
          "country": "pl",
          "locality": "Wrocław",
          "postal_code": "53-146"
        }
      },
      "operations": [
        {
          "operation_order": 1,
          "timespans": {
            "end": "2022-12-16T12:00:00+0100",
            "begin": "2022-12-16T12:00:00+0100"
          },
          "type": "loading"
        }
      ]
    },
    {
      "spot_order": 2,
      "place": {
        "address": {
          "country": "pl",
          "locality": "Wrocław",
          "postal_code": "53-146"
        }
      },
      "operations": [
        {
          "operation_order": 1,
          "loads": [],
          "timespans": {
            "end": "2022-12-17T12:00:00+0100",
            "begin": "2022-12-17T12:00:00+0100"
          },
          "type": "unloading"
        }
      ]
    }
  ],
  "exchanges": [
    {
      "exchange_id": "b3a7b0f0-d7f4-4de8-aa6d-61b5d9bae999"
    }
  ]
}

Example Response

{
  "accepted_price": null,
  "capacity": 20,
  "carrier": null,
  "contact_employees": [
    {
      "last_name": "Testowy",
      "name": "API",
      "trans_id": "1007386-5"
    }
  ],
  "distance": null,
  "end_reason": null,
  "height": null,
  "id": 1787718,
  "length": null,
  "loading_meters": null,
  "loads": [],
  "publication_price": {
    "currency": "eur",
    "value": null
  },
  "publication_status": null,
  "reference_number": "FR/2022/12/15/215IJ",
  "requirements": {
    "is_ftl": true,
    "monitoring": "without_monitoring",
    "other_requirements": [],
    "required_adr_classes": [],
    "required_truck_bodies": [
      "cooler"
    ],
    "required_ways_of_loading": [],
    "shipping_remarks": null,
    "temperature": {
      "max": null,
      "min": null
    },
    "transport": {
      "count": null,
      "settlement": null,
      "type": "ftl",
      "units_per_transport": null
    },
    "vehicle_size": "any_size"
  },
  "shipment_external_id": null,
  "spots": [
    {
      "description": null,
      "name": null,
      "operations": [
        {
          "loads": [],
          "operation_order": 1,
          "operation_time": null,
          "timespans": {
            "begin": "2022-12-16T12:00:00+01:00",
            "end": "2022-12-16T12:00:00+01:00"
          },
          "type": "loading"
        }
      ],
      "place": {
        "address": {
          "country": "pl",
          "description": null,
          "locality": "Wrocław",
          "number": null,
          "postal_code": "53-146",
          "street": null
        },
        "coordinates": {
          "latitude": 51.079202595,
          "longitude": 16.993128942
        }
      },
      "spot_order": 1
    },
    {
      "description": null,
      "name": null,
      "operations": [
        {
          "loads": [],
          "operation_order": 1,
          "operation_time": null,
          "timespans": {
            "begin": "2022-12-17T12:00:00+01:00",
            "end": "2022-12-17T12:00:00+01:00"
          },
          "type": "unloading"
        }
      ],
      "place": {
        "address": {
          "country": "pl",
          "description": null,
          "locality": "Wrocław",
          "number": null,
          "postal_code": "53-146",
          "street": null
        },
        "coordinates": {
          "latitude": 51.079202595,
          "longitude": 16.993128942
        }
      },
      "spot_order": 2
    }
  ],
  "status": "new",
  "transit_time": null,
  "volume": null,
  "width": null
}