GET api/Positions/GetLatest?SerialNumber={SerialNumber}&Count={Count}&SortDescending={SortDescending}

Get latest position(s) from a unit.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
SerialNumber

Unit serial number

string

Required

Count

Number of records to return (Optional). It is significantly faster to retrieve only the single latest record with a count = 1, which is the default. Maximum value is 10

integer32

Default value is 1

SortDescending

Sort result by descending timestamp - latest record first (Optional)

boolean

Default value is True

Body Parameters

None.

Response Information

Resource Description

Get latest position(s) from a unit.

Collection of PositionModel
NameDescriptionTypeAdditional information
Id

integer64

Required

SerialNumber

string

Required

ReferenceId

Unit's referenceId

string

None.

Timestamp

Timestamp in UTC

date

None.

Latitude

decimal number

None.

Longitude

decimal number

None.

Accuracy

Acuracy in meters

integer32

None.

Speed

Speed in km/h

decimal number

Null values possible.

Altitude

Altitude in meters

decimal number

Null values possible.

Heading

Heading in degrees

decimal number

Null values possible.

Trigger

Flags.

UnitReportTriggerEnum

None.

PositionType

PositionTypeEnum

None.

GSMNetwork

2G, 3G, 4G

string

None.

ServingCell

MobileCellModel

Null values possible.

NeighbourCells

Collection of MobileCellModel

None.

Location

Location (if any)

LocationModel

Null values possible.

MessageId

integer64

None.

ServerDate

Timestamp for message received at server

date

Null values possible.

IsLog

Indicates if this position originates from a log message

boolean

None.

IsSMS

Indicates if this position originates from an SMS transmission

boolean

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Id": 1,
    "SerialNumber": "sample string 2",
    "ReferenceId": "sample string 3",
    "Timestamp": "2024-11-21T09:34:18.2168965+00:00",
    "Latitude": 5.1,
    "Longitude": 6.1,
    "Accuracy": 7,
    "Speed": 1.0,
    "Altitude": 1.0,
    "Heading": 1.0,
    "Trigger": 0,
    "PositionType": 0,
    "GSMNetwork": "sample string 8",
    "ServingCell": {
      "MobileCountryCode": 2,
      "MobileNetworkCode": 3,
      "LocationAreaCode": 4,
      "CellId": 5,
      "Signal": 6,
      "CellType": "sample string 7",
      "TimeAdvance": 1
    },
    "NeighbourCells": [
      {
        "MobileCountryCode": 2,
        "MobileNetworkCode": 3,
        "LocationAreaCode": 4,
        "CellId": 5,
        "Signal": 6,
        "CellType": "sample string 7",
        "TimeAdvance": 1
      },
      {
        "MobileCountryCode": 2,
        "MobileNetworkCode": 3,
        "LocationAreaCode": 4,
        "CellId": 5,
        "Signal": 6,
        "CellType": "sample string 7",
        "TimeAdvance": 1
      }
    ],
    "Location": null,
    "MessageId": 9,
    "ServerDate": "2024-11-21T09:34:18.2168965+00:00",
    "IsLog": true,
    "IsSMS": true
  },
  {
    "Id": 1,
    "SerialNumber": "sample string 2",
    "ReferenceId": "sample string 3",
    "Timestamp": "2024-11-21T09:34:18.2168965+00:00",
    "Latitude": 5.1,
    "Longitude": 6.1,
    "Accuracy": 7,
    "Speed": 1.0,
    "Altitude": 1.0,
    "Heading": 1.0,
    "Trigger": 0,
    "PositionType": 0,
    "GSMNetwork": "sample string 8",
    "ServingCell": {
      "MobileCountryCode": 2,
      "MobileNetworkCode": 3,
      "LocationAreaCode": 4,
      "CellId": 5,
      "Signal": 6,
      "CellType": "sample string 7",
      "TimeAdvance": 1
    },
    "NeighbourCells": [
      {
        "MobileCountryCode": 2,
        "MobileNetworkCode": 3,
        "LocationAreaCode": 4,
        "CellId": 5,
        "Signal": 6,
        "CellType": "sample string 7",
        "TimeAdvance": 1
      },
      {
        "MobileCountryCode": 2,
        "MobileNetworkCode": 3,
        "LocationAreaCode": 4,
        "CellId": 5,
        "Signal": 6,
        "CellType": "sample string 7",
        "TimeAdvance": 1
      }
    ],
    "Location": null,
    "MessageId": 9,
    "ServerDate": "2024-11-21T09:34:18.2168965+00:00",
    "IsLog": true,
    "IsSMS": true
  }
]

application/xml

Sample:

Sample not available.

text/xml

Sample:

Sample not available.