> 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.

# Monthly organization traffic and cost statistics

GET https://iot.telia.lt/api/v1/organisation/{org_id}/stats

Retrieves traffic and cost statistics for the selected organization.

Traffic statistics accumulate for the `current_month` and `last_month` of the selected organization and all child organizations.
All other returned values (SIM statistics, user counts, etc.) are only for the selected organization.


Reference: https://docs.iot.telia.lt/developers/api/organization/get-organisation-monthly-stats

## 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

- `org_id` (integer, required) — Numerical ID of an organization

## Response

### 200

OK

- `current_month` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonth, optional)
- `last_month` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonth, optional)
- `sim` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaSim, optional) — Amount of SIMs per SIM status where the selected organisation is either the customer organisation or the issuer organisation
- `service_profiles` (double, optional) — Amount of service profiles
- `tariff_profiles` (double, optional) — Amount of service profiles
- `users` (double, optional) — Amount of users
- `active_chargeable_sims` (double, optional) — Amount of active SIMs that will be charged within the current month. This field is omitted if there are no chargeable SIMs.
- `hosting_fees` (double, optional) — Total of SIM hosting fees for all `active_chargeable_sims`. This field is omitted if there are no chargeable SIMs.
- `inclusive_volume` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaInclusiveVolume, optional)
- `prepaid_balance` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaPrepaidBalance, optional)

## 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)

### 422 Unprocessable Entity Error

Selected organisation not found or not accessible

- `any`

## Types

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonth

- `data` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthData, optional)
- `sms` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthSms, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonth

- `data` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthData, optional)
- `sms` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthSms, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaSim

Amount of SIMs per SIM status where the selected organisation is either the customer organisation or the issuer organisation

- `issued` (double, optional)
- `factory_mode` (double, optional)
- `active` (double, optional)
- `suspended` (double, optional)
- `total` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaInclusiveVolume

- `unpooled` (double, optional) — Total cost of all unpooled inclusive volumes
- `pooled` (double, optional) — Total cost of all pooled inclusive volumes

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaPrepaidBalance

- `amount` (double, optional) — Remaining prepaid balance
- `currency` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaPrepaidBalanceCurrency, optional)
- `last_updated` (string, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthData

- `cost` (double, optional) — Total cost
- `month` (string, optional) — The month that the data has been accumulated in `YYYY-MM-01` format
- `currency` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthDataCurrency, optional)
- `traffic_type` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthDataTrafficType, optional)
- `volume` (double, optional) — Total consumption (`volume_rx` + `volume_tx`)
- `volume_rx` (double, optional) — * For traffic type `5` (`Data`): Downloaded data * For traffic type `6` (`SMS`): SMS MT
- `volume_tx` (double, optional) — * For traffic type `5` (`Data`): Uploaded data * For traffic type `6` (`SMS`): SMS MO

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthSms

- `cost` (double, optional) — Total cost
- `month` (string, optional) — The month that the data has been accumulated in `YYYY-MM-01` format
- `currency` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthSmsCurrency, optional)
- `traffic_type` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthSmsTrafficType, optional)
- `volume` (double, optional) — Total consumption (`volume_rx` + `volume_tx`)
- `volume_rx` (double, optional) — * For traffic type `5` (`Data`): Downloaded data * For traffic type `6` (`SMS`): SMS MT
- `volume_tx` (double, optional) — * For traffic type `5` (`Data`): Uploaded data * For traffic type `6` (`SMS`): SMS MO

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthData

- `cost` (double, optional) — Total cost
- `month` (string, optional) — The month that the data has been accumulated in `YYYY-MM-01` format
- `currency` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthDataCurrency, optional)
- `traffic_type` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthDataTrafficType, optional)
- `volume` (double, optional) — Total consumption (`volume_rx` + `volume_tx`)
- `volume_rx` (double, optional) — * For traffic type `5` (`Data`): Downloaded data * For traffic type `6` (`SMS`): SMS MT
- `volume_tx` (double, optional) — * For traffic type `5` (`Data`): Uploaded data * For traffic type `6` (`SMS`): SMS MO

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthSms

- `cost` (double, optional) — Total cost
- `month` (string, optional) — The month that the data has been accumulated in `YYYY-MM-01` format
- `currency` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthSmsCurrency, optional)
- `traffic_type` (ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthSmsTrafficType, optional)
- `volume` (double, optional) — Total consumption (`volume_rx` + `volume_tx`)
- `volume_rx` (double, optional) — * For traffic type `5` (`Data`): Downloaded data * For traffic type `6` (`SMS`): SMS MT
- `volume_tx` (double, optional) — * For traffic type `5` (`Data`): Uploaded data * For traffic type `6` (`SMS`): SMS MO

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaPrepaidBalanceCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthDataCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthDataTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthSmsCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaCurrentMonthSmsTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthDataCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthDataTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthSmsCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV1OrganisationOrgIdStatsGetResponsesContentApplicationJsonSchemaLastMonthSmsTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

## Examples

### Organization with Inclusive Volume

**Response**

```json
{
  "current_month": {
    "data": {
      "cost": 9.713,
      "month": "2022-12-01T00:00:00.000Z",
      "currency": {
        "code": "EUR",
        "symbol": "€",
        "id": 1
      },
      "traffic_type": {
        "description": "Data",
        "unit": "MB",
        "id": 5
      },
      "volume": 80.21357,
      "volume_rx": 50.106785,
      "volume_tx": 30.106785
    },
    "sms": {
      "cost": 0.6,
      "month": "2022-12-01T00:00:00.000Z",
      "currency": {
        "code": "EUR",
        "symbol": "€",
        "id": 1
      },
      "traffic_type": {
        "description": "SMS",
        "unit": "SMS",
        "id": 6
      },
      "volume": 9,
      "volume_rx": 2,
      "volume_tx": 7
    }
  },
  "last_month": {
    "data": {
      "cost": 11.519,
      "month": "2022-11-01T00:00:00.000Z",
      "currency": {
        "code": "USD",
        "symbol": "$",
        "id": 2
      },
      "traffic_type": {
        "description": "Data",
        "unit": "MB",
        "id": 5
      },
      "volume": 100.21357,
      "volume_rx": 50.106785,
      "volume_tx": 50.106785
    },
    "sms": {
      "cost": 0.7,
      "month": "2022-11-01T00:00:00.000Z",
      "currency": {
        "code": "EUR",
        "symbol": "€",
        "id": 1
      },
      "traffic_type": {
        "description": "SMS",
        "unit": "SMS",
        "id": 6
      },
      "volume": 10,
      "volume_rx": 6,
      "volume_tx": 4
    }
  },
  "sim": {
    "issued": 0,
    "active": 498,
    "suspended": 2,
    "total": 500,
    "factory_test": 0
  },
  "service_profiles": 1,
  "tariff_profiles": 2,
  "users": 5,
  "active_chargeable_sims": 10,
  "hosting_fees": 100,
  "inclusive_volume": {
    "unpooled": 60.5,
    "pooled": 14.3
  }
}
```

**SDK Code**

```python Organization with Inclusive Volume
import requests

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

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

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

print(response.json())
```

```javascript Organization with Inclusive Volume
const url = 'https://iot.telia.lt/api/v1/organisation/123/stats';
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 Organization with Inclusive Volume
package main

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

func main() {

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

	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 Organization with Inclusive Volume
require 'uri'
require 'net/http'

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

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 Organization with Inclusive Volume
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Organization with Inclusive Volume
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Organization with Inclusive Volume
using RestSharp;

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

```swift Organization with Inclusive Volume
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/organisation/123/stats")! 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()
```

### Organization with Prepaid Balance

**Response**

```json
{
  "current_month": {
    "data": {
      "cost": 9.713,
      "month": "2022-12-01T00:00:00.000Z",
      "currency": {
        "code": "EUR",
        "symbol": "€",
        "id": 1
      },
      "traffic_type": {
        "description": "Data",
        "unit": "MB",
        "id": 5
      },
      "volume": 80.21357,
      "volume_rx": 50.106785,
      "volume_tx": 30.106785
    },
    "sms": {
      "cost": 0.6,
      "month": "2022-12-01T00:00:00.000Z",
      "currency": {
        "code": "EUR",
        "symbol": "€",
        "id": 1
      },
      "traffic_type": {
        "description": "SMS",
        "unit": "SMS",
        "id": 6
      },
      "volume": 9,
      "volume_rx": 2,
      "volume_tx": 7
    }
  },
  "last_month": {
    "data": {
      "cost": 11.519,
      "month": "2022-11-01T00:00:00.000Z",
      "currency": {
        "code": "USD",
        "symbol": "$",
        "id": 2
      },
      "traffic_type": {
        "description": "Data",
        "unit": "MB",
        "id": 5
      },
      "volume": 100.21357,
      "volume_rx": 50.106785,
      "volume_tx": 50.106785
    },
    "sms": {
      "cost": 0.7,
      "month": "2022-11-01T00:00:00.000Z",
      "currency": {
        "code": "EUR",
        "symbol": "€",
        "id": 1
      },
      "traffic_type": {
        "description": "SMS",
        "unit": "SMS",
        "id": 6
      },
      "volume": 10,
      "volume_rx": 6,
      "volume_tx": 4
    }
  },
  "sim": {
    "issued": 0,
    "active": 498,
    "suspended": 2,
    "total": 500,
    "factory_test": 0
  },
  "service_profiles": 1,
  "tariff_profiles": 2,
  "users": 5,
  "active_chargeable_sims": 10,
  "hosting_fees": 100,
  "prepaid_balance": {
    "amount": 14.634,
    "currency": {
      "code": "EUR",
      "symbol": "€",
      "id": 1
    },
    "last_updated": "2022-12-08T14:11:35.000Z"
  }
}
```

**SDK Code**

```python Organization with Prepaid Balance
import requests

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

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

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

print(response.json())
```

```javascript Organization with Prepaid Balance
const url = 'https://iot.telia.lt/api/v1/organisation/123/stats';
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 Organization with Prepaid Balance
package main

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

func main() {

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

	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 Organization with Prepaid Balance
require 'uri'
require 'net/http'

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

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 Organization with Prepaid Balance
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Organization with Prepaid Balance
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Organization with Prepaid Balance
using RestSharp;

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

```swift Organization with Prepaid Balance
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/organisation/123/stats")! 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()
```