Summary

Description and accepted values for main freight structure.

Json Example Type Is required Description
office_id 1 int Yes OfficeId of carrier assigned to monitoring task
spots Array string Yes Array of spots for declared route
spots.place 1_api string Yes Information related to single place on freight’s route
spots.place.address Object Yes Address
spots.place.address.locality Object Yes City name
spots.place.address.postcode 52-200 string Yes Postal code
spots.place.address.country pl string Yes Country code ISO value
spots.place.address.street Street name string Yes Street name
spots.place.address.number 12322Q string Yes Number
spots.place.coordinates Object Yes Longitude and latitude for selected point
spots.place.coordinates.latitude 12.22124 float Yes Latitude of the point along the freight route
spots.place.coordinates.longitude 41.12312 float Yes Longitude of the point along the freight route
spots.operations Object Yes Array of operations to be completed in given spot
spots.operations.type loading string Yes Could be either loading or unloading, at least one of each is required
spots.operations.time_frame Object Yes Timespan for selected operation
spots.operations.time_frame.from 2018-07-18T14:30:00+0200 DateTime Yes Beginning of time slot for loading or unloading operation
spots.operations.time_frame.to 2018-07-18T14:30:00+0200 DateTime Yes End of time slot for loading or unloading operation

 

Json example

{
  "office_id": 1,
  "spots": [
    {
      "place": {
        "address": {
          "locality": "Днпро",
          "postcode": "49000",
          "country": "UA",
          "street": "Каштановая",
          "number": "35"
        },
        "coordinates": {
          "latitude": 48.4977774,
          "longitude": 35.0896543
        }
      },
      "operations": [
        {
          "type": "loading",
          "time_frame": {
            "date_from": "2020-04-10T00:00:00",
            "date_to": "2020-04-10T00:00:00"
          }
        }
      ]
    },
    {
      "place": {
        "address": {
          "locality": "Дн?про",
          "postcode": "49000",
          "country": "UA",
          "street": "Писаржевкого",
          "number": "1"
        },
        "coordinates": {
          "latitude": 48.4548583,
          "longitude": 35.0549241
        }
      },
      "operations": [
        {
          "type": "unloading",
          "time_frame": {
            "date_from": "2020-04-11T00:00:00",
            "date_to": "2020-04-11T00:00:00"
          }
        }
      ]
    }
  ],
  "info": "example monitoring info"
}