> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.iot.telia.lt/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.iot.telia.lt/_mcp/server.

# Retrieve daily usage statistics for an endpoint

GET https://iot.telia.lt/api/v1/endpoint/{endpoint_id}/stats/daily

Returns daily usage statistics for a specific endpoint, including cellular data and SMS volumes.

By default, returns statistics for the current month.
Use `start_date` and `end_date` query parameters to specify a custom date range.

Historical data is available for up to **13 months**.

Data traffic cost statistics (`cost` field in the `data` object) have been deprecated.

Reference: https://docs.iot.telia.lt/developers/api/endpoint/endpoint-stats-daily-by-id-get

## Authentication

- `Authorization` header (bearer token, required) — An `auth_token` should be provided to authenticate a session. To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

## Request

### Path parameters

- `endpoint_id` (integer, required) — Numeric ID of an endpoint

### Query parameters

- `start_date` (string, optional) — Filters by start date, provided in a `YYYY-MM-DD` format. If you don't define an end date, the response will include 6 months of data, beginning on the current date.
- `end_date` (string, optional) — Filters by end date, provided in an `YYYY-MM-DD` format. If you don't define a start date, the response will only return data from the month indicated in your end date.

## Response

### 200

Successfully returned the daily endpoint statistics. Each day's entry contains: - `date`: The date in YYYY-MM-DD format - `data`: Cellular data usage (volume in MB) - `sms`: SMS usage (volume as message count) Volume fields include `volume` (total), `volume_tx` (transmitted), and `volume_rx` (received).

- `list of ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItems`

## Errors

### 403 Forbidden Error

Your role doesn't include the permission this endpoint requires. Most endpoints return `error_code`, `error_token`, and `message`. Some return only `status_code` and `message`.

- `error_code` (integer, optional)
- `error_token` (string, optional)
- `status_code` (integer, optional)
- `message` (string, optional)

## Types

### ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItems

- `date` (string, optional) — The date for this statistics entry (YYYY-MM-DD format).
- `data` (ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsData, optional) — Cellular data usage for this day.
- `sms` (ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsSms, optional) — SMS usage for this day.

### ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsData

Cellular data usage for this day.

- `volume` (double, optional) — Total data volume in MB.
- `volume_tx` (double, optional) — Data transmitted (uploaded) in MB.
- `volume_rx` (double, optional) — Data received (downloaded) in MB.
- `traffic_type` (ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsDataTrafficType, optional) — Information about the traffic type.
- `currency` (ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsDataCurrency, optional) — Currency used for cost calculations.
- `cost` (double, optional, deprecated) — Cost of data usage.

### ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsSms

SMS usage for this day.

- `volume` (double, optional) — Total SMS count.
- `volume_tx` (double, optional) — SMS messages sent (Mobile Originated).
- `volume_rx` (double, optional) — SMS messages received (Mobile Terminated).
- `traffic_type` (ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsSmsTrafficType, optional) — Information about the traffic type.
- `currency` (ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsSmsCurrency, optional) — Currency used for cost calculations.
- `cost` (double, optional, deprecated) — Cost of SMS usage.

### ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsDataTrafficType

Information about the traffic type.

- `id` (integer, optional) — Traffic type identifier (5 = Data).
- `description` (string, optional) — Human-readable traffic type name.
- `unit` (string, optional) — Unit of measurement (MB for data).

### ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsDataCurrency

Currency used for cost calculations.

- `id` (integer, optional) — Currency identifier.
- `code` (string, optional) — ISO 4217 currency code (for example, EUR, USD).
- `symbol` (string, optional) — Currency symbol (for example, €, $).

### ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsSmsTrafficType

Information about the traffic type.

- `id` (integer, optional) — Traffic type identifier (6 = SMS).
- `description` (string, optional) — Human-readable traffic type name.
- `unit` (string, optional) — Unit of measurement (SMS for messages).

### ApiV1EndpointEndpointIdStatsDailyGetResponsesContentApplicationJsonSchemaItemsSmsCurrency

Currency used for cost calculations.

- `id` (integer, optional) — Currency identifier.
- `code` (string, optional) — ISO 4217 currency code (for example, EUR, USD).
- `symbol` (string, optional) — Currency symbol (for example, €, $).

## Examples

### Default - Current Month

**Response**

```json
[
  {
    "date": "2019-03-26",
    "data": {
      "volume": "0",
      "volume_tx": "0",
      "volume_rx": "0",
      "cost": "0"
    },
    "sms": {
      "volume": "0",
      "volume_tx": "0",
      "volume_rx": "0",
      "cost": "0"
    }
  },
  {
    "date": "2019-03-25",
    "data": {
      "volume": "0.632622",
      "volume_tx": "0.184861",
      "volume_rx": "0.447761",
      "traffic_type": {
        "id": 5,
        "description": "Data",
        "unit": "MB"
      },
      "cost": "0.1265244000"
    },
    "sms": {
      "volume": "0",
      "volume_tx": "0",
      "volume_rx": "0",
      "cost": "0"
    }
  }
]
```

**SDK Code**

```python Default - Current Month
import requests

url = "https://iot.telia.lt/api/v1/endpoint/123/stats/daily"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Default - Current Month
const url = 'https://iot.telia.lt/api/v1/endpoint/123/stats/daily';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Default - Current Month
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v1/endpoint/123/stats/daily"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Default - Current Month
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/endpoint/123/stats/daily")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Default - Current Month
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://iot.telia.lt/api/v1/endpoint/123/stats/daily")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Default - Current Month
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://iot.telia.lt/api/v1/endpoint/123/stats/daily', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Default - Current Month
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/endpoint/123/stats/daily");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Default - Current Month
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint/123/stats/daily")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by Start Date

**Response**

```json
[
  {
    "date": "2023-03-07",
    "data": {
      "volume": "1.5",
      "volume_tx": "0.8",
      "volume_rx": "0.7",
      "cost": "0.30"
    },
    "sms": {
      "volume": "5",
      "volume_tx": "3",
      "volume_rx": "2",
      "cost": "0.25"
    }
  },
  {
    "date": "2023-03-01",
    "data": {
      "volume": "1.2",
      "volume_tx": "0.6",
      "volume_rx": "0.6",
      "cost": "0.24"
    },
    "sms": {
      "volume": "3",
      "volume_tx": "2",
      "volume_rx": "1",
      "cost": "0.15"
    }
  }
]
```

**SDK Code**

```python Filter by Start Date
import requests

url = "https://iot.telia.lt/api/v1/endpoint/123/stats/daily"

querystring = {"start_date":"2023-03-01"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by Start Date
const url = 'https://iot.telia.lt/api/v1/endpoint/123/stats/daily?start_date=2023-03-01';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Filter by Start Date
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v1/endpoint/123/stats/daily?start_date=2023-03-01"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by Start Date
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?start_date=2023-03-01")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Filter by Start Date
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?start_date=2023-03-01")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by Start Date
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://iot.telia.lt/api/v1/endpoint/123/stats/daily?start_date=2023-03-01', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by Start Date
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?start_date=2023-03-01");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by Start Date
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint/123/stats/daily?start_date=2023-03-01")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by End Date

**Response**

```json
[
  {
    "date": "2023-02-15",
    "data": {
      "volume": "0.8",
      "volume_tx": "0.4",
      "volume_rx": "0.4",
      "cost": "0.16"
    },
    "sms": {
      "volume": "2",
      "volume_tx": "1",
      "volume_rx": "1",
      "cost": "0.10"
    }
  },
  {
    "date": "2023-02-01",
    "data": {
      "volume": "0.5",
      "volume_tx": "0.3",
      "volume_rx": "0.2",
      "cost": "0.10"
    },
    "sms": {
      "volume": "1",
      "volume_tx": "1",
      "volume_rx": "0",
      "cost": "0.05"
    }
  }
]
```

**SDK Code**

```python Filter by End Date
import requests

url = "https://iot.telia.lt/api/v1/endpoint/123/stats/daily"

querystring = {"end_date":"2023-02-15"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by End Date
const url = 'https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-02-15';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Filter by End Date
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-02-15"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by End Date
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-02-15")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Filter by End Date
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-02-15")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by End Date
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-02-15', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by End Date
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-02-15");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by End Date
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-02-15")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by Date Range

**Response**

```json
[
  {
    "date": "2023-03-07",
    "data": {
      "volume": "1.5",
      "volume_tx": "0.8",
      "volume_rx": "0.7",
      "traffic_type": {
        "id": 5,
        "description": "Data",
        "unit": "MB"
      },
      "cost": "0.30"
    },
    "sms": {
      "volume": "5",
      "volume_tx": "3",
      "volume_rx": "2",
      "traffic_type": {
        "id": 6,
        "description": "SMS",
        "unit": "SMS"
      },
      "cost": "0.25"
    }
  },
  {
    "date": "2023-03-01",
    "data": {
      "volume": "1.2",
      "volume_tx": "0.6",
      "volume_rx": "0.6",
      "cost": "0.24"
    },
    "sms": {
      "volume": "3",
      "volume_tx": "2",
      "volume_rx": "1",
      "cost": "0.15"
    }
  }
]
```

**SDK Code**

```python Filter by Date Range
import requests

url = "https://iot.telia.lt/api/v1/endpoint/123/stats/daily"

querystring = {"end_date":"2023-03-07","start_date":"2023-03-01"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by Date Range
const url = 'https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-03-07&start_date=2023-03-01';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Filter by Date Range
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-03-07&start_date=2023-03-01"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by Date Range
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-03-07&start_date=2023-03-01")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Filter by Date Range
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-03-07&start_date=2023-03-01")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by Date Range
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-03-07&start_date=2023-03-01', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by Date Range
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-03-07&start_date=2023-03-01");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by Date Range
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint/123/stats/daily?end_date=2023-03-07&start_date=2023-03-01")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```