Search for carriers with user defined pubication

Descrip­tion of adding a freight to com­pa­nies cho­sen by rec­om­men­da­tion algo­rithm, with declar­ing the freight price.

Scenario

  • car­ri­er is yet to be deter­mined
  • price was not 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
  • car­ri­er has to meet spec­i­fied cri­te­ria
  • the car­ri­er does not belong to the group of con­trac­tors
  • there are cor­re­spond­ing automa­tion rules set on Trans.eu Plat­form

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

In order to send freight pro­pos­als to car­ri­ers tai­lored to its cri­te­ria, the pub­li­ca­tion method using the smart­match algo­rithm must be used.

Each freight must con­sist of:

  • 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
  • cur­ren­cy

Diagram

Endpoint:

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

Request example: 

Exam­ple of trans­port order post­ing request:

{
  "payment": {
    "price": {
      "value": 123,
      "currency": "eur"
    }
  },
  "capacity": 12,
  "exchange_recipients": "carriers",
  "requirements": {
    "is_ftl": false,
    "required_truck_bodies": [
      "cooler"
    ]
  },
  "spots": [
    {
      "spot_order": 1,
      "place": {
        "address": {
          "country": "fr",
          "postal_code": "11111",
          "locality": "null"
        },
        "coordinates": {
          "latitude": 49.8056,
          "longitude": 12.1881
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-06-25T09:00:00+01:00",
            "end": "2020-06-25T09:00:00+01:00"
          },
          "type": "loading",
          "operation_order": 1,
          "loads": []
        }
      ]
    },
    {
      "spot_order": 2,
      "place": {
        "address": {
          "country": "lt",
          "postal_code": "22222",
          "locality": "City"
        },
        "coordinates": {
          "latitude": null,
          "longitude": null
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-06-26T09:00:00+01:00",
            "end": "2020-06-26T09:00:00+01:00"
          },
          "type": "unloading",
          "operation_order": 1,
          "loads": []
        }
      ]
    }
  ],
  "loads": [
    {
      "name": "example",
      "description": "Example description",
      "load_id": "1",
      "type_of_load": "palette",
      "weight": 1,
      "height": 1,
      "length": 1,
      "volume": 1,
      "amount": 1,
      "is_stackable": false,
      "is_exchangeable": false
    }
  ],
  "publish": true
}

Response example:

{
  "payment": {
    "price": {
      "value": null,
      "currency": "eur"
    }
  },
  "capacity": 12,
  "exchange_recipients": "carriers",
  "requirements": {
    "is_ftl": false,
    "required_truck_bodies": [
      "cooler"
    ]
  },
  "spots": [
    {
      "spot_order": 1,
      "place": {
        "address": {
          "country": "fr",
          "postal_code": "11111",
          "locality": "null"
        },
        "coordinates": {
          "latitude": 49.8056,
          "longitude": 12.1881
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-06-25T09:00:00+01:00",
            "end": "2020-06-25T09:00:00+01:00"
          },
          "type": "loading",
          "operation_order": 1,
          "loads": []
        }
      ]
    },
    {
      "spot_order": 2,
      "place": {
        "address": {
          "country": "lt",
          "postal_code": "22222",
          "locality": "City"
        },
        "coordinates": {
          "latitude": null,
          "longitude": null
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-06-26T09:00:00+01:00",
            "end": "2020-06-26T09:00:00+01:00"
          },
          "type": "unloading",
          "operation_order": 1,
          "loads": []
        }
      ]
    }
  ],
  "loads": [
    {
      "name": "example",
      "description": "Example description",
      "load_id": "1",
      "type_of_load": "palette",
      "weight": 1,
      "height": 1,
      "length": 1,
      "volume": 1,
      "amount": 1,
      "is_stackable": false,
      "is_exchangeable": false
    }
  ],
  "publish": true
}

Receive offers

Each response for freight pub­li­ca­tion can e accessed using APi. To find out which car­ri­ers respond­ed send the request below:

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

If there is no response, you will receive emp­ty array.

If respons­es have been sent, there will be array, which con­sists of each response:

Negotiation

It pos­si­ble to accept, reject or nego­ti­ate received price con­di­tions

Accept:

https://api.platform.trans.eu/ext/freights/v1/{offer-id}/accept

Reject:

https://api.platform.trans.eu/ext/freights/v1/{offer-id}/reject

Nego­ti­ate:

https://api.platform.trans.eu/ext/freights/v1/{offer-id}/negotiate

Pay­load:

{
  "payment": {
    "price": {
      "value": 100,
      "currency": "pln"
    }
  },
  "requirements": "requirements description",
  "version": 3,
  "carrier_decision_date": "2020-05-20T12:00:00+02:00"
}

Accepted freight

{
  "payment": {
    "price": {
      "value": 100,
      "currency": "eur"
    }
  },
  "capacity": 12,
  "requirements": {
    "is_ftl": false,
    "required_truck_bodies": [
      "cooler"
    ]
  },
  "spots": [
    {
      "spot_order": 1,
      "place": {
        "address": {
          "country": "fr",
          "postal_code": "11111",
          "locality": "null"
        },
        "coordinates": {
          "latitude": 49.8056,
          "longitude": 12.1881
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-06-25T09:00:00+01:00",
            "end": "2020-06-25T09:00:00+01:00"
          },
          "type": "loading",
          "operation_order": 1,
          "loads": []
        }
      ]
    },
    {
      "spot_order": 2,
      "place": {
        "address": {
          "country": "lt",
          "postal_code": "22222",
          "locality": "City"
        },
        "coordinates": {
          "latitude": null,
          "longitude": null
        }
      },
      "operations": [
        {
          "timespans": {
            "begin": "2020-06-26T09:00:00+01:00",
            "end": "2020-06-26T09:00:00+01:00"
          },
          "type": "unloading",
          "operation_order": 1,
          "loads": []
        }
      ]
    }
  ],
  "loads": [
    {
      "name": "example",
      "description": "Example description",
      "load_id": "1",
      "type_of_load": "palette",
      "weight": 1,
      "height": 1,
      "length": 1,
      "volume": 1,
      "amount": 1,
      "is_stackable": false,
      "is_exchangeable": false
    }
  ],
  "publish": true
}