Skip to navigation
EndpointSet data quota

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.

We have deprecated throttling as an action on quota exhaustion and the associated peak throughput parameter. These were decommissioned as of December 9, 2024.**

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

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.

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

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_idintegerRequired
Numeric ID of an endpoint

Request

This endpoint expects an object.
statusobjectRequired
volumefloatRequired
expiry_datestringRequiredformat: "^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$"
action_on_exhaustionobjectRequired
last_volume_addedfloatOptional
last_status_change_datestringOptionalformat: "^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$"
auto_refillintegerOptional
threshold_volumefloatOptional
threshold_percentagefloatOptional

Response

Resource Created

Errors

403
Forbidden Error