Search for carrier with given price and buy now option

Descrip­tion of adding new freight for select­ed com­pa­nies, with giv­en price, with­out the pos­si­bil­i­ty of freight price nego­ti­a­tions.

Scenario

  • car­ri­er is yet to be deter­mined
  • car­ri­er’s Tran­sId is avail­able in exter­nal TMS
  • price and cur­ren­cy was giv­en
  • car­ri­er is using Trans.eu Plat­form only, with no addi­tion­al freight man­age­ment soft­ware involved
  • both freight for­warder and car­ri­ers have exist­ing and valid Trans.eu account
  • freight is pub­lished imme­di­ate­ly after cre­ation
  • first car­ri­er which accepts freight con­di­tions and price is select­ed
  • after first accep­tance car­ri­er details are attached to freight enti­ty

Authorize access

Before it is pos­si­ble to send any request, user needs to autho­rize access.

  • client app was reg­is­tered using reg­is­tra­tion form
  • exter­nal app was grant­ed api keys (client_id and client_secret)
  • autho­riza­tion process has been imple­ment­ed in exter­nal app

Create new freight

Each freight must con­sist of:

  • array of car­ri­ers’ ids
  • load­ing loca­tion and time
  • unload­ing loca­tion and time
  • required truck body type
  • sum­ma­ry of freight’s loads weight
  • ftl/ltl para­me­ter
  • price an cur­ren­cy

Dia­gram

Request example:

End­point:

POST https://api.platform.trans.eu/ext/freights-api/v1/freight-companies

Pay­load:

{
  "publish": true,
  "external_source": "api_trans",
  "shipment_external_id": "1/1/1234",
  "multistop": true,
  "publish_date": "2021-07-30T13:10:00+0000",
  "decision_date": "2021-08-03T13:00:00+0000",
  "carriers": [
    {
      "company_id": 10
    },
    {
      "company_id": 1111111
    }
  ],
  "payment": {
    "price": {
      "value": 1200,
      "currency": "eur",
      "period": {
        "payment": "deferred",
        "days": 5
      }
    }
  },
  "is_first_buy": true,
  "capacity": 29,
  "loading_meters": 2,
  "requirements": {
    "is_ftl": true,
    "required_truck_bodies": [
      "curtainsider",
      "cooler"
    ],
    "temperature": {
      "min": 3,
      "max": 10
    },
    "shipping_remarks": "shipping remarks",
    "vehicle_size": "bus",
    "required_adr_classes": [
      "adr_1"
    ],
    "required_ways_of_loading": [
      "top"
    ],
    "other_requirements": [
      "lift",
      "hds"
    ]
  },
  "loads": [
    {
      "load_id": "L123x",
      "name": "example name",
      "description": "Description",
      "weight": 12,
      "height": 3,
      "width": 2,
      "length": 8,
      "volume": 21,
      "amount": 1,
      "type_of_load": "europalette",
      "is_stackable": true,
      "is_exchangeable": true
    }
  ],
  "spots": [
    {
      "description": "Example description",
      "name": "Spot name",
      "spot_order": 1,
      "place": {
        "address": {
          "country": "GB",
          "postal_code": "SK7 1",
          "locality": "London",
          "street": "The Mall",
          "number": "1",
          "description": "Address description"
        },
        "coordinates": {
          "latitude": 53.35801,
          "longitude": -2.16539
        }
      },
      "operations": [
        {
          "operation_order": 1,
          "loads": [
            {
              "load_id": "L123x",
              "weight": 12
            }
          ],
          "timespans": {
            "begin": "2021-08-03T13:10:00+0000",
            "end": "2021-08-03T15:10:00+0000"
          },
          "type": "loading"
        }
      ]
    },
    {
      "name": "Spot name 2",
      "description": "Description2",
      "spot_order": 2,
      "place": {
        "address": {
          "country": "PL",
          "postal_code": "61-625",
          "locality": "Poznań",
          "street": "Rynek",
          "number": "1",
          "description": "Address 2"
        },
        "coordinates": {
          "latitude": 52.43457,
          "longitude": 16.95141
        }
      },
      "operations": [
        {
          "operation_order": 1,
          "loads": [
            {
              "load_id": "L123x",
              "weight": 10
            }
          ],
          "type": "unloading",
          "timespans": {
            "begin": "2021-08-04T13:00:00+0000",
            "end": "2021-08-04T14:00:00+0000"
          }
        }
      ]
    },
    {
      "name": "Spot name 3",
      "description": "Description3",
      "spot_order": 3,
      "place": {
        "address": {
          "country": "DE",
          "postal_code": "09000",
          "locality": "Brieselang",
          "street": "Strasse",
          "number": "3",
          "description": "Address 3"
        },
        "coordinates": {
          "latitude": 52.58216,
          "longitude": 12.99756
        }
      },
      "operations": [
        {
          "operation_order": 1,
          "loads": [
            {
              "load_id": "L123x",
              "weight": 2
            }
          ],
          "type": "unloading",
          "timespans": {
            "begin": "2021-08-05T01:00:00+0000",
            "end": "2021-08-05T01:00:00+0000"
          }
        }
      ]
    }
  ]
}

Verify freight status

Imme­di­ate­ly after freight cre­ation it is pos­si­ble do access cur­rent freight sta­tus and details:

GET https://api.platform.trans.eu/ext/freights-api/v1/freights/{freight-id}

If there is a car­ri­er’s accep­tance, car­ri­er details will be filled out, in oth­er case there will be emp­ty col­lec­tion.