> For the complete documentation index, see [llms.txt](https://docs.sendstackhq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sendstackhq.com/live-tracking-apis/positions/get-total-distance.md).

# Get Total Distance

## Get Total Distance

<mark style="color:blue;">`GET`</mark> `{{baseUrl}}/tracker/:deviceId/totalDistance`

**Path Parameters**

| Name     | Required | Description |
| -------- | -------- | ----------- |
| deviceId | true     | Device id   |

**Query Parameters**

| Name      | Required | Description         | Sample value |
| --------- | -------- | ------------------- | ------------ |
| startTime | true     | The start timestamp | 2025-03-01   |
| endTime   | true     | The end timestamp   | 2025-03-05   |

**Response**

{% tabs %}
{% tab title="200: OK Retrieved positions" %}

```javascript
{
    "status": true,
    "message": "Device total distance successfully retrieved",
    "data": {
        "deviceId": "67287d2f8faa08541904202b",
        "name": "sample Test",
        "totalDistance": 517.957101542293742 //in meters
    }
}
```

{% endtab %}
{% endtabs %}
