> 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.smartsim.telecom.li/llms.txt.

# List endpoint data usage per data plan

GET https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data

Returns the data usage of each endpoint in your organization against its data plan, with endpoints ranked by total volume.
Use it to find the endpoints that use up a data plan's allowance, the endpoints without a data plan, and the endpoints with traffic outside the coverage areas of their data plan.
In the API, the data plan is the `data_allowance` object.

Only endpoints with data usage in the requested period are returned.
Volumes are in MB and include zero-rated traffic.
The zero-rated portion is reported separately, so the billable volume is `volume_mb` minus `volume_zero_rated_mb`.

* `covered` is the traffic in the coverage areas of the data plan. This traffic counts against the allowance.
* `uncovered` is the traffic outside those coverage areas. For an endpoint without a data plan, all traffic is `uncovered`.
* `covered.volume_mb` plus `uncovered.volume_mb` always equals `volume_mb`.

Each `rated_cost` is the cost at list price, not the invoiced amount.

For a pooled data plan (`data_allowance.pooled` is `true`), `volume_per_sim_mb` is the volume each SIM contributes to the pooled allowance of the organization, not a quota for the endpoint.

`sim_id`, `tariff_profile_id`, and `data_allowance` describe the endpoint on its most recent day with data usage in the requested period.

**Date range**

`start_date` and `end_date` are inclusive UTC days:

* Neither set: the current month up to today.
* Only `start_date`: from `start_date` up to today. If that period is longer than 31 days, also set `end_date`.
* Only `end_date`: from the first day of the month of `end_date` up to `end_date`.
* Both set: the period as given. It can be at most 31 days long, and `start_date` can't be after `end_date`.

`start_date` can't be earlier than the first day of the month 6 months before the current month.
For example, on October 26, 2026, the earliest `start_date` is `2026-04-01`.

Usage data comes from daily usage records, which can lag behind live traffic by up to 3 days.

Reference: https://docs.smartsim.telecom.li/developers/api/endpoint/list-endpoint-allowance-data-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

### Query parameters

- `start_date` (string, optional) — First day of the period, in `YYYY-MM-DD` format (UTC, inclusive). See the endpoint description for the date range rules.
- `end_date` (string, optional) — Last day of the period, in `YYYY-MM-DD` format (UTC, inclusive). See the endpoint description for the date range rules.
- `q` (string, optional) — Filters endpoints by field value. Use `<field>:<criteria>` format. Combine filters on different fields with commas, and separate multiple values for one field with `||` (for example, `data_allowance_id:49||51`). **Fields:** * `endpoint_id` - Endpoint ID * `sim_id` - SIM ID * `data_allowance_id` - Data plan ID * `tariff_profile_id` - Tariff profile ID * `tariff_id` - Tariff ID * `pooled` - `true` for endpoints on a pooled data plan, `false` for endpoints on a per-SIM data plan * `has_allowance` - `true` for endpoints with a data plan, `false` for endpoints without one
- `sort` (string, optional) — Sorts endpoints by field value. Use `<operator><field>` format. Combine multiple sort fields with commas (for example, `-uncovered_volume,-volume`). **Operators:** * `-` descending (highest value or most recent date first) * `+` ascending (lowest value or oldest date first) **Fields:** * `volume` - `volume_mb` * `covered_volume` - `covered.volume_mb` * `uncovered_volume` - `uncovered.volume_mb` * `uncovered_cost` - `uncovered.rated_cost` * `zero_rated_volume` - `volume_zero_rated_mb` * `last_active` - `last_active_date` Defaults to ascending order if no operator is specified. Defaults to `-volume` if `sort` isn't set. Endpoints with identical values are sorted by ascending `endpoint_id`.
- `page` (integer, optional, default: 1) — Page number to retrieve. Starts at 1.
- `per_page` (integer, optional, default: 25) — Number of endpoints to return per page. Values above 100 are treated as 100.

## Response

### 200

Returns an array of endpoints ranked by total volume. Pagination metadata is included in the response headers.

- `list of EndpointDataAllowanceUsage`

## Errors

### 400 Bad Request Error

The request fails for one of these reasons: - `start_date` or `end_date` isn't a valid `YYYY-MM-DD` date. - `start_date` is after `end_date`. - `start_date` is earlier than the first day of the month 6 months before the current month. - The period is longer than 31 days. - `q` contains a malformed expression, an unsupported field, or a value of the wrong type. - `sort` contains a malformed expression or an unsupported field.

- `status_code` (integer, required) — HTTP status code.
- `message` (string, required) — Error message.

### 401 Unauthorized Error

The request has no valid authentication token.

- `message` (string, required) — Error message.

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

### EndpointDataAllowanceUsage

- `organisation_id` (integer, required) — ID of the organization that owns the endpoint.
- `endpoint_id` (integer, required) — Endpoint ID.
- `sim_id` (integer, required, nullable) — ID of the SIM in the endpoint on its most recent day with data usage in the requested period.
- `tariff_profile_id` (integer, required, nullable) — ID of the tariff profile assigned to the endpoint on its most recent day with data usage in the requested period.
- `data_allowance` (EndpointDataAllowance, required, nullable) — Data plan of the endpoint on its most recent day with data usage in the requested period. `null` when the endpoint has no data plan, in which case all traffic is rated at list price.
- `volume_mb` (double, required) — Total volume in MB in the requested period, including zero-rated traffic.
- `volume_tx_mb` (double, required) — Uplink (endpoint to network) portion of `volume_mb`, in MB.
- `volume_rx_mb` (double, required) — Downlink (network to endpoint) portion of `volume_mb`, in MB.
- `volume_zero_rated_mb` (double, required) — Zero-rated (not billed) portion of `volume_mb`, in MB.
- `covered` (DataAllowanceVolume, required) — Traffic in the coverage areas of the data plan. This traffic counts against the allowance.
- `uncovered` (DataAllowanceVolume, required) — Traffic outside the coverage areas of the data plan, or all traffic when the endpoint has no data plan.
- `currency` (EndpointDataAllowanceUsageCurrency, required, nullable) — Currency of `rated_cost`, `fee`, and `excess_rate_per_mb`.
- `last_active_date` (string, required) — Most recent day (UTC) with data usage in the requested period, in `YYYY-MM-DD` format.

### EndpointDataAllowance

- `id` (integer, required) — Data plan ID.
- `name` (string, required) — Data plan name.
- `pooled` (boolean, required) — `true` when the allowance is pooled across the SIMs of the organization. `false` for a per-SIM allowance, where `volume_per_sim_mb` is the quota of the endpoint.
- `volume_per_sim_mb` (double, required, nullable) — Allowance per SIM, in MB. For a pooled allowance, this is the volume each SIM contributes to the pooled allowance.
- `fee` (double, required, nullable) — Recurring data plan fee per SIM, in `currency`.
- `excess_rate_per_mb` (double, required, nullable) — List price per MB for traffic that exceeds the allowance, in `currency`.
- `start_date` (string, required, nullable) — Day (UTC) from which the data plan is in effect, in `YYYY-MM-DD` format. Not related to the `start_date` query parameter.
- `tariff_id` (integer, required, nullable) — ID of the tariff the data plan belongs to.

### DataAllowanceVolume

- `volume_mb` (double, required) — Volume in MB.
- `rated_cost` (double, required) — Cost of `volume_mb` at list price, in `currency`. This isn't the invoiced amount.

### EndpointDataAllowanceUsageCurrency

Currency of `rated_cost`, `fee`, and `excess_rate_per_mb`.

- `id` (integer, required) — Currency ID.
- `code` (string, required) — ISO 4217 currency code.

## Examples

### Default - Current month, pooled data plan

**Response**

```json
[
  {
    "organisation_id": 100,
    "endpoint_id": 14020374,
    "sim_id": 7476552,
    "tariff_profile_id": 404713,
    "data_allowance": {
      "id": 49,
      "name": "Regional Pro EUR - Europe Basic - 30 MB - Pooled allowance",
      "pooled": true,
      "volume_per_sim_mb": 30,
      "fee": 0.68,
      "excess_rate_per_mb": 0.04,
      "start_date": "2024-07-01",
      "tariff_id": 557
    },
    "volume_mb": 0.963194,
    "volume_tx_mb": 0.642429,
    "volume_rx_mb": 0.320765,
    "volume_zero_rated_mb": 0,
    "covered": {
      "volume_mb": 0.963194,
      "rated_cost": 0.03852776
    },
    "uncovered": {
      "volume_mb": 0,
      "rated_cost": 0
    },
    "currency": {
      "id": 1,
      "code": "EUR"
    },
    "last_active_date": "2026-10-17"
  }
]
```

**SDK Code**

```python Default - Current month, pooled data plan
import requests

url = "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data"

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

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

print(response.json())
```

```javascript Default - Current month, pooled data plan
const url = 'https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data';
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, pooled data plan
package main

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

func main() {

	url := "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data"

	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, pooled data plan
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data")

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, pooled data plan
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Default - Current month, pooled data plan
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Default - Current month, pooled data plan
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Default - Current month, pooled data plan
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data")! 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 data plan and date range

**Response**

```json
[
  {
    "organisation_id": 100,
    "endpoint_id": 14020375,
    "sim_id": 7476553,
    "tariff_profile_id": 404713,
    "data_allowance": {
      "id": 51,
      "name": "Global M - 30 MB - Per SIM allowance",
      "pooled": false,
      "volume_per_sim_mb": 30,
      "fee": 1.2,
      "excess_rate_per_mb": 0.05,
      "start_date": "2025-01-01",
      "tariff_id": 561
    },
    "volume_mb": 3.512,
    "volume_tx_mb": 1.204,
    "volume_rx_mb": 2.308,
    "volume_zero_rated_mb": 0,
    "covered": {
      "volume_mb": 2.712,
      "rated_cost": 0
    },
    "uncovered": {
      "volume_mb": 0.8,
      "rated_cost": 0.04
    },
    "currency": {
      "id": 1,
      "code": "EUR"
    },
    "last_active_date": "2026-08-29"
  }
]
```

**SDK Code**

```python Filter by data plan and date range
import requests

url = "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data"

querystring = {"end_date":"2026-08-31","q":"data_allowance_id:51","start_date":"2026-08-01"}

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

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

print(response.json())
```

```javascript Filter by data plan and date range
const url = 'https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?end_date=2026-08-31&q=data_allowance_id%3A51&start_date=2026-08-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 data plan and date range
package main

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

func main() {

	url := "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?end_date=2026-08-31&q=data_allowance_id%3A51&start_date=2026-08-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 data plan and date range
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?end_date=2026-08-31&q=data_allowance_id%3A51&start_date=2026-08-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 data plan and date range
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?end_date=2026-08-31&q=data_allowance_id%3A51&start_date=2026-08-01")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by data plan and date range
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?end_date=2026-08-31&q=data_allowance_id%3A51&start_date=2026-08-01', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Filter by data plan and date range
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?end_date=2026-08-31&q=data_allowance_id%3A51&start_date=2026-08-01");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by data plan and date range
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?end_date=2026-08-31&q=data_allowance_id%3A51&start_date=2026-08-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()
```

### Endpoints without a data plan

**Response**

```json
[
  {
    "organisation_id": 100,
    "endpoint_id": 14020376,
    "sim_id": 7476554,
    "tariff_profile_id": null,
    "data_allowance": null,
    "volume_mb": 12.5,
    "volume_tx_mb": 4.5,
    "volume_rx_mb": 8,
    "volume_zero_rated_mb": 0.5,
    "covered": {
      "volume_mb": 0,
      "rated_cost": 0
    },
    "uncovered": {
      "volume_mb": 12.5,
      "rated_cost": 0.625
    },
    "currency": {
      "id": 1,
      "code": "EUR"
    },
    "last_active_date": "2026-10-24"
  }
]
```

**SDK Code**

```python Endpoints without a data plan
import requests

url = "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data"

querystring = {"q":"has_allowance:false"}

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

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

print(response.json())
```

```javascript Endpoints without a data plan
const url = 'https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?q=has_allowance%3Afalse';
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 Endpoints without a data plan
package main

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

func main() {

	url := "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?q=has_allowance%3Afalse"

	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 Endpoints without a data plan
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?q=has_allowance%3Afalse")

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 Endpoints without a data plan
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?q=has_allowance%3Afalse")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Endpoints without a data plan
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?q=has_allowance%3Afalse', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Endpoints without a data plan
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?q=has_allowance%3Afalse");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Endpoints without a data plan
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?q=has_allowance%3Afalse")! 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()
```

### Sort by uncovered volume

**Response**

```json
[
  {
    "organisation_id": 100,
    "endpoint_id": 14020376,
    "sim_id": 7476554,
    "tariff_profile_id": null,
    "data_allowance": null,
    "volume_mb": 12.5,
    "volume_tx_mb": 4.5,
    "volume_rx_mb": 8,
    "volume_zero_rated_mb": 0.5,
    "covered": {
      "volume_mb": 0,
      "rated_cost": 0
    },
    "uncovered": {
      "volume_mb": 12.5,
      "rated_cost": 0.625
    },
    "currency": {
      "id": 1,
      "code": "EUR"
    },
    "last_active_date": "2026-10-24"
  },
  {
    "organisation_id": 100,
    "endpoint_id": 14020375,
    "sim_id": 7476553,
    "tariff_profile_id": 404713,
    "data_allowance": {
      "id": 51,
      "name": "Global M - 30 MB - Per SIM allowance",
      "pooled": false,
      "volume_per_sim_mb": 30,
      "fee": 1.2,
      "excess_rate_per_mb": 0.05,
      "start_date": "2025-01-01",
      "tariff_id": 561
    },
    "volume_mb": 3.512,
    "volume_tx_mb": 1.204,
    "volume_rx_mb": 2.308,
    "volume_zero_rated_mb": 0,
    "covered": {
      "volume_mb": 2.712,
      "rated_cost": 0
    },
    "uncovered": {
      "volume_mb": 0.8,
      "rated_cost": 0.04
    },
    "currency": {
      "id": 1,
      "code": "EUR"
    },
    "last_active_date": "2026-10-23"
  }
]
```

**SDK Code**

```python Sort by uncovered volume
import requests

url = "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data"

querystring = {"sort":"-uncovered_volume"}

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

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

print(response.json())
```

```javascript Sort by uncovered volume
const url = 'https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?sort=-uncovered_volume';
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 Sort by uncovered volume
package main

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

func main() {

	url := "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?sort=-uncovered_volume"

	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 Sort by uncovered volume
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?sort=-uncovered_volume")

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 Sort by uncovered volume
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?sort=-uncovered_volume")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Sort by uncovered volume
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?sort=-uncovered_volume', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Sort by uncovered volume
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?sort=-uncovered_volume");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Sort by uncovered volume
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/endpoint/stats/allowance/data?sort=-uncovered_volume")! 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()
```