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

> Stream event and usage data with detailed object schemas for data types, traffic types, tariffs, operators, and volume tracking.

> **Note**
>
> **Compatibility notes:** The Data Streamer is under active development.
> It's regularly updated for performance and quality improvements so that you're able to gain rich insights into the event and usage data when using the Event API or a data stream.
> If you've built custom integrations, you should expect that additional data may be added in the future.
> emnify recommends using mature and tested libraries designed for parsing or reading JSON for custom integrations to ensure compatibility.

## Data properties

Data types are referred to in the following sections to assist with integration or database schemas.
They should be interpreted as follows:

| Type           | Description                                                                                         |
| :------------- | :-------------------------------------------------------------------------------------------------- |
| Integer        | An integer value usually used for entity IDs, won't exceed 32-bit values.                           |
| Long           | For event and usage data record IDs, a 64 bit long value should be expected.                        |
| Boolean        | `true` or `false`                                                                                   |
| String         | A string value enclosed in `"` double quotation characters.                                         |
| Decimal(14,6)  | Used for data volume measurements (`volume.total`, `volume.tx`, `volume.rx`) with 6 decimal places. |
| Decimal(14,10) | Cost calculation (`cost` property) may have up to 10 decimal places.                                |
| Timestamp      | Timestamp property in UTC enclosed in `"` double quotation characters.                              |

## Event object

See the [Events Reference page](/developers/reference/events).

## Usage object

The following table shows the properties in a usage data record.
These properties are included in **all** records, independent of traffic type:

| Property          | Type           | Description                                                                                                                                                                           |
| :---------------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id`              | Long           | Unique identifier of the usage data record.                                                                                                                                           |
| `traffic_type`    | JSON object    | Type of traffic (that is, data or SMS) (see [Traffic type object](#traffic-type-object)).                                                                                             |
| `start_timestamp` | Timestamp      | Start time of the reported service consumption.                                                                                                                                       |
| `end_timestamp`   | Timestamp      | End time of the reported service consumption.                                                                                                                                         |
| `organisation`    | JSON object    | Organization associated with the usage data record (see [Organization object](/developers/reference/organization#organization-object)).                                               |
| `endpoint`        | JSON object    | Device details (see [Endpoint object](/developers/reference/endpoint#endpoint-object)).                                                                                               |
| `sim`             | JSON object    | SIM details (see [SIM object](/developers/reference/sim#sim-object)).                                                                                                                 |
| `imsi_id`         | Integer        | Unique identifier of the active IMSI when service was consumed.                                                                                                                       |
| `imsi`            | String         | International mobile subscriber identity (IMSI). The unique number identifying the currently active IMSI of the SIM.                                                                  |
| `session_id`      | String         | Session UUID for correlating PDP context events and usage record objects.                                                                                                             |
| `tariff`          | JSON object    | Information about the tariff assigned to the device (see [Tariff object](#tariff-object)).                                                                                            |
| `operator`        | JSON object    | Mobile network operator (MNO) details (see [Operator object](#operator-object)).                                                                                                      |
| `volume`          | JSON object    | Volume consumed in a PDP context (see [Volume object](/developers/reference/events#volume-object)).                                                                                   |
| `cost`            | Decimal(14,10) | Estimated cost calculation with up to 10 decimal places. This value represents either excess costs accrued or an estimation based on the assigned pay-as-you-go tariff (cost per MB). |
| `currency`        | JSON object    | Cost currency details.                                                                                                                                                                |

### Traffic type object

| Property      | Type    | Description                                                            |
| :------------ | :------ | :--------------------------------------------------------------------- |
| `id`          | Integer | Unique identifier of the traffic type, either `5` (Data) or `6` (SMS). |
| `description` | String  | String representation of the traffic type, either `"Data"` or `"SMS"`  |

### Tariff object

| Property   | Type        | Description                                         |
| :--------- | :---------- | :-------------------------------------------------- |
| `id`       | Integer     | Unique identifier of the tariff used by the device. |
| `name`     | String      | Name of the tariff.                                 |
| `ratezone` | JSON object | Details of the coverage area used by the device.    |

### Operator object

| Property  | Type        | Description                                                                                                  |
| :-------- | :---------- | :----------------------------------------------------------------------------------------------------------- |
| `id`      | Long        | Unique identifier of the mobile network operator (MNO) used.                                                 |
| `name`    | String      | Name of the MNO.                                                                                             |
| `country` | JSON object | Country of the MNO (see [Country object](/developers/reference/events#country-object)).                      |
| `mnc`     | JSON array  | List of mobile network codes (MNC) of the MNO used (see [MNC array](/developers/reference/events#mnc-array)) |