---
title: "Gets transitions for a device"
method: GET
path: "/transitions/v2/devices/{trackingId}"
tags: ["Transitions"]
deprecated: true
---

# Gets transitions for a device

`GET /transitions/v2/devices/{trackingId}`

> **Deprecated.**

Gets all transitions that were recorded within a specific time range.
Define the range with `before` and `after` parameters.
The returned transitions are listed in descending order based on their timestamps.

Note:
---
By default, the `after` parameter value is 0, and the `before` parameter is set to the current
system time. 
Always make sure to specify `before` and `after` parameters explicitly, as otherwise it may 
take a very long time for an API call to complete.

The `count` and `pageToken` parameters are used for pagination.

## Path parameters

- `trackingId` string, required — This is a unique ID associated with the device data in HERE Tracking. For physical devices the `trackingId` gets assigned to a device when the device is claimed by a user, and for virtual devices it is an external device ID along with the device project `appId`.

## Query parameters

- `appId` string
- `before` number
- `after` number
- `pageToken` string
- `count` integer

## Headers

- `X-Request-Id` string, uuid

## Response `200`

Successful

The response body contains an array of transitions, `count` is the number of
returned items and `pageToken` is the next page token if available.

If no transitions are found, an object with an empty data array is
returned.

Transitions are sorted in descending order based on their timestamps.

- object — The response body contains an array of transitions, `count` is the number of returned items and `pageToken` is the next page token if available. If no transitions are found, an object with an empty data array is returned. Transitions are sorted in descending order based on their timestamps.
  - `count` integer — The number of items in the response.
  - `pageToken` string — A token that can be used to retrieve the next page of the response.
  - `data` object[]
    - `geofence` union
      - object
        - `definition` object, required — An object that defines the area of a circular geofence
          - `center` object, required — The coordinates of the center point of the circle.
            - `lat` number, required — Latitude in WGS-84 format, decimal representation ranging from -90 to 90.
            - `lng` number, required — Longitude in WGS-84 format, decimal representation ranging from -180 to 180.
          - `floor` object — The building associated with the geofence
            - `id` string, required — The building ID
            - `level` number — The floor of the geofence in integer format
            - `name` string, required — The building name
          - `radius` number, required — The radius of the circle in meters.
        - `description` string — A description of the area that the geofence encloses and the purpose of the geofence.
        - `name` string — A human-readable name of the geofence.
        - `type` 'circle', required — The geofence type.
      - object
        - `definition` object, required — An object that defines the area of a polygonal geofence.
          - `floor` object — The building associated with the geofence
            - `id` string, required — The building ID
            - `level` number — The floor of the geofence in integer format
            - `name` string, required — The building name
          - `points` object[], required — An array of points that define the polygon. A minimum of three and a maximum of ten points is required.
            - `lat` number, required — Latitude in WGS-84 format, decimal representation ranging from -90 to 90.
            - `lng` number, required — Longitude in WGS-84 format, decimal representation ranging from -180 to 180.
        - `description` string — A description of the area that the geofence encloses and the purpose of the geofence.
        - `name` string — A human-readable name of the geofence.
        - `type` 'polygon', required — The geofence type.
      - object
        - `definition` object — An object that defines the area of a POI geofence.
          - `floor` object — The building associated with the geofence
            - `id` string, required — The building ID
            - `level` number — The floor of the geofence in integer format
            - `name` string, required — The building name
          - `location` object — Details of the geofence location
            - `address` string — Address
            - `country` string — Country
            - `position` object — Coordinates for visualization purposes
              - …
            - `room` string — The room ID
        - `description` string — A description of the area that the geofence encloses and the purpose of the geofence.
        - `name` string — A human-readable name of the geofence.
        - `type` 'poi', required — The geofence type.
    - `geofenceId` string, uuid, required — Must be a valid UUIDv4.
    - `inOut` 'PING_OUTSIDE_FENCE' | 'PING_IN_FENCE', required
    - `notificationStatus` 'SENT' | 'NOT_SENT', required
    - `timestamp` integer, required — Milliseconds elapsed since 1 January 1970 00:00:00 UTC.
    - `trackingId` string, required — This is a unique ID associated with the device data in HERE Tracking. For physical devices the `trackingId` gets assigned to a device when the device is claimed by a user, and for virtual devices it is an external device ID along with the device project `appId`.

## Other responses

- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges
- `404` — TrackingId not found.

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/revisions/efa162f7023c/schema)
