Creating new freight in Trans.eu Platform and sending it to carriers assigned using SmartMatch algorithm.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • Endpoint: /ext/freights-api/v1/freight-smartmatch
  • Method: POST

Headers:

  • Content-type: application/json
  • Accept: application/json
  • Authorization: Bearer {access_token}
  • Api-key: {unique_app_api-key}

Authorization

Authorization process is described here. Each API request must also consist of unique Api-key obtained during application registration together with client_id and client_secret.

For accessing freights API no additional scopes are set, therefore the scope parameter can be left empty.

Freight publication and content

For information about freight payload please refer to freight description and freight schema.

Publication using Smart Match algorithm does not require any additional fields or settings. Please remember to set publish parameter to true.

Example

Sample Json for creating new freight using required data only

{
  "publication_price": {
    "value": 123,
    "currency": "EUR"
  },
  "capacity": 12,
  "requirements": {
    "is_ftl": false,
    "required_truck_bodies": [
      "curtainsider"
    ]
  },
  "spots": [
    {
      "spot_order": 1,
      "place": {
        "address": {
          "country": "pl",
          "postal_code": "12345",
          "locality": "Wroclaw"
        },
        "coordinates": {
          "latitude": 49.8056,
          "longitude": 12.1881
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-01-28T17:00:00+0100",
            "end": "2020-01-28T17:00:00+0100"
          },
          "type": "loading",
          "operation_order": 1,
          "loads": [{
            "id": "abcd-123",
             "weight": 10
             }]
        }
      ]
    },
    {
      "spot_order": 2,
      "place": {
        "address": {
          "country": "de",
          "postal_code": "09876",
          "locality": "Nürnberg"
        },
        "coordinates": {
          "latitude": 49.4608,
          "longitude": 11.0244
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-01-29T08:00:00+0100",
            "end": "2020-01-29T08:00:00+0100"
          },
          "type": "unloading",
          "operation_order": 1,
          "loads": []
        }
      ]
    }
  ],
  "loads": [],
  "publish": "auto"
}

Response

{
  "accepted_price": null,
  "capacity": 12,
  "carier": {
  },
  "id": 1966666,
  "loading_meters": null,
  "loads": [],
  "publication_price": null,
  "requirements": {
    "is_ftl": false,
    "required_truck_bodies": [
      "curtainsider"
    ]
  },
  "spots": [
    {
      "description": null,
      "name": null,
      "operations": [
        {
          "loads": [],
          "operation_order": 1,
          "timespans": {
            "begin": "2020-02-18T17:00:00+01:00",
            "end": "2020-02-18T17:00:00+01:00"
          },
          "type": "loading"
        }
      ],
      "place": {
        "address": {
          "country": "de",
          "description": null,
          "locality": "Windischeschenbach",
          "number": null,
          "postal_code": "92670",
          "street": null
        }
      },
      "spot_order": 1
    },
    {
      "description": null,
      "name": null,
      "operations": [
        {
          "loads": [],
          "operation_order": 1,
          "timespans": {
            "begin": "2020-02-19T08:00:00+01:00",
            "end": "2020-02-19T08:00:00+01:00"
          },
          "type": "unloading"
        }
      ],
      "place": {
        "address": {
          "country": "pl",
          "description": null,
          "locality": "Nürnberg",
          "number": null,
          "postal_code": "90429",
          "street": null
        }
      },
      "spot_order": 2
    }
  ]
}