License API
Consumption
Add Feature Consumption
10min
schema request body type addfeatureconsumptionrequestbody = ({ // required for key based products license key string, } | { // required for user based products username string, }) & { // required parameters product string, hardware id string, feature string, // optional parameters license id? string | undefined, consumptions? number | undefined, event? ('consumption add' | 'offline floating consumptions sync')\[] | undefined, } json schema { "$schema" "https //json schema org/draft/2020 12/schema", "type" "object", "allof" \[ { "oneof" \[ { "type" "object", "properties" { "license key" { "type" "string" } }, "required" \["license key"], "additionalproperties" false }, { "type" "object", "properties" { "username" { "type" "string" } }, "required" \["username"], "additionalproperties" false } ] }, { "type" "object", "properties" { "hardware id" { "type" "string" }, "product" { "type" "string" }, "feature" { "type" "string" }, "license id" { "type" "number" }, "consumptions" { "type" "number" }, "event" { "type" "array", "items" { "type" "string", "enum" \["consumption add", "offline floating consumptions sync"] }, "minitems" 1, "not" { "allof" \[ { "contains" { "const" "consumption add" } }, { "contains" { "const" "offline floating consumptions sync" } } ] } } }, "required" \["hardware id", "product", "feature"], "additionalproperties" false } ] } response body type addfeatureconsumptionresponsebody = { allow negative consumptions boolean, allow overages boolean, allow unlimited consumptions boolean, consumption period 'daily' | 'weekly' | 'monthly' | 'annually' | null, is floating cloud boolean, is floating boolean, max consumptions number, max overages number, reset consumption boolean, total consumptions number, // the following properties are only present on floating and floating cloud features floating timeout? number | null, floating users? number, } json schema { "$schema" "https //json schema org/draft/2020 12/schema", "type" "object", "properties" { "id" { "type" "number" }, "max consumptions" { "type" "number" }, "total consumptions" { "type" "number" }, "allow unlimited consumptions" { "type" "boolean" }, "allow negative consumptions" { "type" "boolean" }, "allow overages" { "type" "boolean" }, "max overages" { "type" "number" }, "reset consumption" { "type" "boolean" }, "consumption period" { "type" \[ "string", "null" ], "enum" \[ "daily", "weekly", "monthly", "annually", null ] }, "is floating cloud" { "type" "boolean" }, "is floating" { "type" "boolean" }, "floating timeout" { "type" \[ "number", null ] }, "floating users" { "type" "number" }, }, "required" \[ "id", "max consumptions", "total consumptions", "allow unlimited consumptions", "allow negative consumptions", "allow overages", "max overages", "reset consumption", "consumption period", "is floating cloud", "is floating" ], "additionalproperties" false } 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 key user 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 { status number, code string, message string } json schema { "$schema" "https //json schema org/draft/2020 12/schema", "type" "object", "properties" { "status" { "type" "number" }, "code" { "type" "string" }, "message" { "type" "string" } }, "required" \[ "status", "code", "message" ], "additionalproperties" false } 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