> 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.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_mcp/server.

# List endpoint data usage per coverage area

GET https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data

Required permissions Beta [Learn more](/developers/api-guidelines/permissions#how-permissions-work)`Endpoint.Stats` + `Get` [+3 endpoints](/developers/api-guidelines/permission-endpoints#permission-endpoint-stats-get "This permission also grants 3 other endpoints")Roles: Administrator User ObserverReturns the data usage of each endpoint in your organization per coverage area, with endpoints ranked by total volume.
Use it to find the endpoints that caused the data usage in a coverage area.
In the API, coverage areas are rate zones, so the fields are named `ratezone` and `ratezone_id`.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` minus `volume_zero_rated`.When `q` filters by `ratezone_id`, the totals and the ranking cover only those coverage areas.**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.emnify.com/developers/api/endpoint/list-endpoint-ratezone-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, `ratezone_id:3398||3515`). **Fields:** * `endpoint_id` - Endpoint ID * `ratezone_id` - Coverage area ID. Restricts the totals and the ranking to these coverage areas.
- `sort` (string, optional) — Sorts endpoints by total `volume`. Use `-volume` for descending or `volume` for ascending order. Defaults to `-volume`. 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 EndpointRatezoneDataUsage`

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

### EndpointRatezoneDataUsage

- `endpoint_id` (integer, required) — Endpoint ID.
- `volume` (double, required) — Total volume in MB in the requested period, summed across the coverage areas in `ratezone`. Includes zero-rated traffic.
- `volume_zero_rated` (double, required) — Zero-rated (not billed) portion of `volume`, in MB.
- `ratezone` (list of RatezoneDataUsage, required) — Volume per coverage area, ordered by volume descending.

### RatezoneDataUsage

- `id` (integer, required) — Coverage area ID.
- `name` (string, required, nullable) — Coverage area name, also for deleted coverage areas. `null` when the coverage area is unknown.
- `volume` (double, required) — Volume in MB in this coverage area in the requested period, including zero-rated traffic.
- `volume_zero_rated` (double, required) — Zero-rated (not billed) portion of `volume`, in MB.

## Examples

### Default - Current month

**Response**

```json
[
  {
    "endpoint_id": 9,
    "volume": 1234.75,
    "volume_zero_rated": 0.5,
    "ratezone": [
      {
        "id": 3398,
        "name": "EU28",
        "volume": 1000.25,
        "volume_zero_rated": 0.5
      },
      {
        "id": 3515,
        "name": "Rest of Europe",
        "volume": 234.5,
        "volume_zero_rated": 0
      }
    ]
  },
  {
    "endpoint_id": 10,
    "volume": 512,
    "volume_zero_rated": 0,
    "ratezone": [
      {
        "id": 3398,
        "name": "EU28",
        "volume": 512,
        "volume_zero_rated": 0
      }
    ]
  }
]
```

**SDK Code**

```python Default - Current month
import requests

url = "https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data"

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

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

print(response.json())
```

```javascript Default - Current month
const url = 'https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/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
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/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
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Default - Current month
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data");
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://cdn.emnify.net/api/v2/endpoint/stats/ratezone/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 coverage area and date range

**Response**

```json
[
  {
    "endpoint_id": 17,
    "volume": 9216.5,
    "volume_zero_rated": 0,
    "ratezone": [
      {
        "id": 3515,
        "name": "Rest of Europe",
        "volume": 9216.5,
        "volume_zero_rated": 0
      }
    ]
  }
]
```

**SDK Code**

```python Filter by coverage area and date range
import requests

url = "https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data"

querystring = {"end_date":"2026-08-31","q":"ratezone_id:3515","start_date":"2026-08-01"}

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

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

print(response.json())
```

```javascript Filter by coverage area and date range
const url = 'https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data?end_date=2026-08-31&q=ratezone_id%3A3515&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 coverage area and date range
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data?end_date=2026-08-31&q=ratezone_id%3A3515&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 coverage area and date range
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data?end_date=2026-08-31&q=ratezone_id%3A3515&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 coverage area and date range
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data?end_date=2026-08-31&q=ratezone_id%3A3515&start_date=2026-08-01")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data?end_date=2026-08-31&q=ratezone_id%3A3515&start_date=2026-08-01', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Filter by coverage area and date range
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data?end_date=2026-08-31&q=ratezone_id%3A3515&start_date=2026-08-01");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by coverage area and date range
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v2/endpoint/stats/ratezone/data?end_date=2026-08-31&q=ratezone_id%3A3515&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()
```