Add Feature Consumption
Endpoint
Method:
POSTPath:
/api/v4/add_feature_consumptionDescription: Adds 1 or more consumptions to a license feature (licenses with consumption features only).
Authentication
See License API Authorization.
Required headers
Date(string) — RFC7231 GMT date stringAuthorization(string)
Recommended headers
Accept: application/jsonContent-Type: application/json
Request
Body parameters
Required:
hardware_id(string)product(string)feature(string)
One of:
license_key(string)username(string)
Optional:
license_id(number)consumptions(number) — Defaults to1. Can be negative if allowed.event(array of strings) —consumption_add(default) oroffline_floating_consumptions_sync(mutually exclusive)
Schema
Response
Examples
License Authorization Method
There are two types of product licenses based on how the client application authorizes itself to interact with a license:
Key-based product licenses: client interactions with the license have to be authorized using a
license_keyUser-based product licenses: the license has a corresponding "license user" instead of a license key. Client interactions with the license have to be authorized using a
username
Errors
If an error occurs, the response will have an HTTP status code of 400 or higher, and the response body will contain an error description in the following format:
:::CodeblockTabs
:::
JSON Schema
:::CodeblockTabs
:::
List of exceptions
unknown_product (400): Provided product was not found
license_not_found (400): License with the provided license user not found
license_not_active (400): The license is not active
license_not_enabled (400): The license is not enabled
unsupported_product_feature (400): One or more of requested product features do not exists or they are not enabled on the product
feature_not_enough_consumptions (400): Not enough consumptions left
negative_consumptions_not_allowed (400): Negative consumptions not allowed
device_not_found (400): An active device matching the hardware_id not found
blacklisted (400): This device is blacklisted
Last updated
Was this helpful?