Vehicle offer description

Descrip­tion of vehi­cle API, allowed meth­ods and requests, val­ue types.

Description

Vehi­cle exchange API gives infor­ma­tion about the avail­abil­i­ty of your vehi­cle fleet to oth­er plat­form users who are look­ing for trans­port between the giv­en loca­tions. Vehi­cle offers are also one of the sources of vehi­cle avail­abil­i­ty for the smart­match algo­rithm. Each vehi­cle offer is always vis­i­ble to all plat­form users once it was cre­at­ed.

Using this API it is also pos­si­ble to get all own vehi­cle offers.

Creating new vehicle offer

With the use of Trans.eu API it is pos­si­ble to cre­ate new own vehi­cle offer, dis­played in Trans.eu Plat­form in Vehi­cle exchange mod­ule.

Components of a single vehicle offer

Each vehi­cle offer con­sists of:

  • load­ing place
  • unload­ing place (or unload­ing places for more than one unload­ing spot)
  • car­go (load)
  • vehi­cle para­me­ters

Validation rules

Most impor­tant val­i­da­tion rules con­sid­er­ing freight pub­li­ca­tion

  • all dates must be greater or equal today
  • vehi­cle body type must be set accord­ing to dic­tio­nary
  • load­ing place and unload­ing place

Impor­tant!
Weight is always rep­re­sent­ed in tonnes.
Height, length and width are always rep­re­sent­ed in meters.
Vol­ume is always rep­re­sent­ed in cubic meters.

Structure of adding new vehicle

JsonIs requiredExam­pleTypeDescrip­tion
contact_personsNo“1011111–5”, “1011111–1”ArrayField is not required, default con­tact per­son is cre­ator. When you send that field in request, only typed Trans-Id’s will be assigned as con­tact per­sons. You can send max 3 Trans-Id’s.
vehicle_sizeYesBusStringAvail­able vehi­cle sizes
truck_bodyYesCur­tain­sid­erStringAllowed truck bod­ies
adr_classesNoAdr_1ArrayAllowed ADR class­es
equip­mentNoLift, HdsArrayAllowed equip­ment
available_ways_of_loadingNoTopArrayAllowed ways of load­ing
loading_placeYesObjectLoad­ing place
loading_place.addressYesObjectLoad­ing place address
loading_place_address.localityNoWro­clawStringCity name
loading_place_address.postal_codeNo56–111StringPostal code
loading_place_address.countryYesPLStringCoun­try using ISO val­ues
loading_place.coordinatesNoObjectLon­gi­tude and lat­i­tude for select­ed point
loading_place.coordinates.latitudeNo53.35801FloatLat­i­tude of the point along the freight route
loading_place.coordinates.longitudeNo58.78801FloatLon­gi­tude of the point along the freight route
loading_place.rangeNo50IntRange must be one of the fol­low­ing val­ues: 50,75,100,125,150,200,250
unloading_placesYesObjectUnload­ing places (you can send max 10 loca­tions)
unloading_places.addressYesObjectUnload­ing place address
unloading_places.address.localityNoWro­clawStringCity name
unloading_places.address.postal_codeNo55–261StringPostal code
unloading_places.address.countryYesPLStringCoun­try using ISO val­ues
unloading_places.coordinatesNoObjectLon­gi­tude and lat­i­tude for select­ed point
unloading_places.coordinates.latitudeNo53.36789FloatLat­i­tude of the point along the freight route
unloading_places.coordinates.longitudeNo58.78999FloatLon­gi­tude of the point along the freight route
unloading_places.rangeNo50IntRange must be one of the fol­low­ing val­ues: 50,75,100,125,150,200,250
car­goYesObjectCar­go descrip­tion
cargo.heightNo2.2FloatCar­go height
cargo.widthNo4FloatCar­go width
cargo.lengthNo30FloatCar­go length
cargo.volumeNo40FloatCar­go vol­ume
cargo.capacityYes24FloatCar­go capac­i­ty
available_onYesObjectVehi­cle avail­abil­i­ty
available_on.beginYes2021–02-20T17:25:00+0000Time­stampVehi­cle avail­abil­i­ty begin
available_on.endYes2021–02-21T19:25:00+0000Time­stampVehi­cle avail­abil­i­ty end

Json example

{
  "contact_persons": [
    "1011111-5",
    "1011111-1"
  ],
  "vehicle_size": "bus",
  "truck_body": "standard-tent",
  "adr_classes": [
    "adr_1"
  ],
  "equipment": [
    "lift"
  ],
  "available_ways_of_loading": [
    "top"
  ],
  "loading_place": {
    "address": {
      "locality": "Wroclaw",
      "postal_code": "56-111",
      "country": "pl"
    }
  },
  "unloading_places": [
    {
      "address": {
        "locality": "Oława",
        "country": "pl",
        "postal_code": "55-200"
      },
      "coordinates": {
        "longitude": 111,
        "latitude": 0.11111
      },
      "range": 50
    },
    {
      "address": {
        "country": "gb"
      }
    }
  ],
  "cargo": {
    "capacity": 24,
    "height": 2.2,
    "width": 4,
    "length": 30,
    "volume": 40
  },
  "available_on": {
    "begin": "2022-03-17T15:25:00+0000",
    "end": "2022-03-17T19:25:00+0000"
  }
}

Confirmation of posting vehicle

JsonIs requiredExam­pleTypeDescrip­tion
idNo01EZPX4BV51513JQCBK7Y5V7K9StringOffer id assigned auto­mat­i­cal­ly dur­ing cre­ation of a new vehi­cle

Structure of getting single vehicle offer and list of vehicle offers created

JsonIs requiredExam­pleTypeDescrip­tion
created_atNo2021–03-01T12:45:11+00:00Time­stampVehi­cle offer cre­ation date
expiration_dateNo2021–03-01T19:25:00+0000Time­stampVehi­cle offer expi­ra­tion date
idNo01EZPX4BV51513JQCBK7Y5V7K9StringVehi­cle offer id assigned auto­mat­i­cal­ly dur­ing cre­ation
offer_idNo202574219IntOffer id from vehi­cle offers list
vehi­cleNoObjectVehi­cle descrip­tion
vehicle.adr_classesNoAdr_1ArrayADR class­es list
vehicle.available_onNoObjectVehi­cle avail­abil­i­ty
vehicle.available_on.beginNo2021–02-20T17:25:00+0000Time­stampVehi­cle avail­abil­i­ty begin
vehicle.available_on.endNo2021–02-20T19:25:00+0000Time­stampVehi­cle avail­abil­i­ty end
vehicle.available_ways_of_loadingNoTopArrayAllowed ways of load­ing
vehicle.cargoNoObjectCar­go descrip­tion
vehicle.cargo.heightNo2.2FloatCar­go height
vehicle.cargo.widthNo4FloatCar­go width
vehicle.cargo.lengthNo30FloatCar­go length
vehicle.cargo.volumeNo40FloatCar­go vol­ume
vehicle.cargo.capacityNo24FloatCar­go capac­i­ty
vehicle.equipmentNoLift, HdsArrayEquip­ment list
vehicle.sizeNoBusStringVehi­cle size
vehicle.truck_bodyNoCur­tain­sid­erStringTruck body
vehicle.loading_placeNoObjectLoad­ing place
vehicle.loading_place.addressNoObjectLoad­ing place address
vehicle.loading_place_address.localityNoWro­clawStringCity name
vehicle.loading_place_address.postal_codeNo56–111StringPostal code
vehicle.loading_place_address.countryNoPLStringCoun­try using ISO val­ues
vehicle.loading_place.coordinatesNoObjectLon­gi­tude and lat­i­tude for select­ed point
vehicle.loading_place.coordinates.latitudeNo53.35801FloatLat­i­tude of the point along the freight route
vehicle.loading_place.coordinates.longitudeNo58.78801FloatLon­gi­tude of the point along the freight route
vehicle.loading_place.rangeNo50IntRange
vehicle.unloading_placesNoObjectUnload­ing place
vehicle.unloading_places.addressNoObjectUnload­ing place address
vehicle.unloading_places.address.localityNoWro­clawStringCity name
vehicle.unloading_places.address.postal_codeNo55–261StringPostal code
vehicle.unloading_places.address.countryNoPLStringCoun­try using ISO val­ues
vehicle.unloading_places.coordinatesNoObjectLon­gi­tude and lat­i­tude for select­ed point
vehicle.unloading_places.coordinates.latitudeNo53.36789FloatLat­i­tude of the point along the freight route
vehicle.unloading_places.coordinates.longitudeNo58.78999FloatLon­gi­tude of the point along the freight route
vehicle.unloading_places.rangeNo50IntRange