New freight using smartmatch

Cre­at­ing new freight in Trans.eu Plat­form and send­ing it to car­ri­ers assigned using Smart­Match algo­rithm.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ex­t/freights-api/v1/freight-smart­match
  • Method: POST

Headers:

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

Authorization

Autho­riza­tion process is described here. Each API request must also con­sist of unique Api-key obtained dur­ing appli­ca­tion reg­is­tra­tion togeth­er with client_id and client_secret.

Freight publication and content

For infor­ma­tion about freight pay­load please refer to freight descrip­tion and freight schema.

Pub­li­ca­tion using Smart Match algo­rithm does not require any addi­tion­al fields or set­tings. Please remem­ber to set pub­lish para­me­ter to true.

 

Json Exam­ple Type Is required Descrip­tion
shipment_external_id 2020/ABC/1/1 String No Exter­nal iden­ti­fi­ca­tion num­ber
external_source 1_api String No Freight source iden­ti­fi­er assigned to client_id pro­vid­ed by Trans.eu
capac­i­ty 12 Float Yes Total 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­lish True Boolean Yes Deter­mines if the freight is auto­mat­i­cal­ly pub­lished or only cre­at­ed
pay­ment Object No Pay­ment con­di­tions for pub­li­ca­tion using groups or smart match
require­ments Object Yes Main freight require­ments, includ­ing truck body and size adr class­es, ways of load­ing
loads Array Yes Col­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
spots Object Yes Col­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": 12,
  "requirements": {
    "is_ftl": false,
    "required_truck_bodies": [
      "curtainsider"
    ],
    "loads": []
  },
  "spots": [
    {
      "spot_order": 1,
      "place": {
        "address": {
          "country": "PL",
          "postal_code": "12345",
          "locality": "Wroclaw"
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2021-02-03T13:00:00+0100",
            "end": "2021-02-03T14:00:00+0100"
          },
          "type": "loading",
          "operation_order": 1
        }
      ]
    },
    {
      "spot_order": 2,
      "place": {
        "address": {
          "country": "DE",
          "postal_code": "09876",
          "locality": "Nürnberg"
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2021-02-04T08:00:00+0100",
            "end": "2021-02-04T08:00:00+0100"
          },
          "type": "unloading",
          "operation_order": 1
        }
      ]
    }
  ],
  "publish": true
}

Response

{
    "accepted_price": null,
    "capacity": 12,
    "carrier": null,
    "id": 592018,
    "loading_meters": null,
    "loads": [],
    "publication_price": null,
    "reference_number": "FR/2021/02/03/X64K",
    "requirements": {
        "is_ftl": false,
        "other_requirements": [],
        "required_adr_classes": [],
        "required_truck_bodies": [
            "curtainsider"
        ],
        "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-02-03T13:00:00+01:00",
                        "end": "2021-02-03T14:00:00+01:00"
                    },
                    "type": "loading"
                }
            ],
            "place": {
                "address": {
                    "country": "PL",
                    "description": null,
                    "locality": "Wroclaw",
                    "number": null,
                    "postal_code": "12345",
                    "street": null
                },
                "coordinates": {
                    "latitude": null,
                    "longitude": null
                }
            },
            "spot_order": 1
        },
        {
            "description": null,
            "name": null,
            "operations": [
                {
                    "loads": [],
                    "operation_order": 1,
                    "timespans": {
                        "begin": "2021-02-04T08:00:00+01:00",
                        "end": "2021-02-04T08:00:00+01:00"
                    },
                    "type": "unloading"
                }
            ],
            "place": {
                "address": {
                    "country": "DE",
                    "description": null,
                    "locality": "Nürnberg",
                    "number": null,
                    "postal_code": "09876",
                    "street": null
                },
                "coordinates": {
                    "latitude": null,
                    "longitude": null
                }
            },
            "spot_order": 2
        }
    ],
    "status": "new"
}