Set data quota

Set a new data quota. You can set a new data quota for a device at any time. At an initial state, when no data quota is set, the device is denied from using data services. To top-up the data volume, you need to retrieve the remaining volume, increase it by the top-up volume, and set it as the new quota volume. <Warning> We have deprecated throttling as an action on quota exhaustion and the associated peak throughput parameter. These will be decommissioned as of December 9, 2024.** </Warning> The following parameters can be configured: * `status` (required) - The status of the quota: - 1: `ACTIVE` - 2: `EXHAUSTED` - 3: `EXPIRED` * `volume` - Remaining quota volume in MB * `expiry_date` (required) - Timestamp when the quota expires and the device is denied from using further data services * `auto_refill` (default: `0`) - Whether the quota should be refilled on a daily basis: - `0`: Disabled - `1`: Enabled * `threshold_percentage` - The remaining quota percentage when the system generates a "Quota threshold reached" event * `action_on_exhaustion`: Action executed after the quota is exhausted: - `id` (required) - Unique identifer of the action on quota exhaustion - `1`: Block - **DEPRECATED** `2`: Throttle - **DEPRECATED** `peak_throughput` - The maximum bandwidth in octets per second after the device has been throttled. <Note> **Events**: The system generates a "Quota used up" event if the data quota is completely depleted. Then, the device is blocked from further consumption of data. The quota object is included in the event details. </Note> <Info> The device can instantly use data services after successfully making this API call. You can set any timestamp with a future date. This allows you to create data packages as required (for example, 1 hour, 24 hours, 7 days, or any other timeframe). </Info>

Authentication

AuthorizationBearer

An auth_token should be provided to authenticate a session.

To obtain an auth_token, see the /api/v1/authenticate POST request.

Path parameters

endpoint_idstringRequired

Request

This endpoint expects an object.
statusobjectRequired
volumedoubleRequired
expiry_datestringRequiredformat: "^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$"
action_on_exhaustionobjectRequired
last_volume_addeddoubleOptional
last_status_change_datestringOptionalformat: "^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$"
auto_refillintegerOptional
threshold_volumedoubleOptional
threshold_percentagedoubleOptional

Response

Resource Created

Errors