License API
Trial Key
9 min
tab examples url api v4 trial key name api v4 trial key method get request pathparameters queryparameters kind required name hardware id type string children description in rfc7231 format see license api authorization eg thu 17 nov 2022 20 51 35 gmt kind required name product type string children description product short code kind optional name email type string children description required if product is user based attach the assigned license user email eq user example com name license policy kind optional type string description sets license policy license policy code if omited the default license policy for the product will be used children name first name kind optional type string description optional for user based product licenses only children name last name kind optional type string description optional for user based product licenses only children name phone kind optional type string description optional for user based product licenses only children name password kind optional type string description only for user based licenses sets the license user s password if not provided a random password will be generated and returned in the response children headerparameters kind required name date type string children description in rfc7231 format see license api authorization eg thu 17 nov 2022 20 51 35 gmt kind required name authorization type string children description see license api authorization article bodydataparameters formdataparameters results languages id qlx3ifr3fpkeqnnhkuaxk code n license key t7gb c4jx 4y8r 1234 n id 1737130277841509 n order id 1737130277837489 n product id 1 n created at 1737130277925 n updated at 1737130277925 n max activations 1 n times activated 0 n is trial true n active false n enabled true n trial days 15 n license type time limited n max transfers 0 n prevent vm false n enable maintenance period false n maintenance duration null n metadata n is hardware key auth false n validity period null n licenseproductfeatures n n id 1737130277926519 n product feature id 5 n max consumption 10 n allow overages false n max overages 0 n reset consumption false n consumption period null n expiry date null n metadata n is floating false n is floating cloud false n n n licensecustomfields n license t7gb c4jx 4y8r 1234 n language 200 customlabel selectedlanguageid qlx3ifr3fpkeqnnhkuaxk examples languages id gcdqge3uarg ovc11afkf language curl code curl location request get api v4 trial key?hardware id string product string license key string username string n header accept application json n header date string n header authorization string customlabel id kvmrurwfg1wdvhbr jjsi language nodejs code var request require request ; nvar options n method get n url api v4 trial key?hardware id string product string license key string username string n headers n accept application json n date string n authorization string n n ; nrequest options function error response n if error throw new error error ; n console log response body ; n ; n customlabel id vzsng xq9b50ttfx7fgle language javascript code var myheaders new headers ; nmyheaders append accept application json ; nmyheaders append date string ; nmyheaders append authorization string ; n nvar requestoptions n method get n headers myheaders n redirect follow n ; n nfetch api v4 trial key?hardware id string product string license key string username string requestoptions n then response response text n then result console log result n catch error console log error error ; customlabel id fanx6wpbmq3niaudjgpum language python code import requests n nurl api v4 trial key?hardware id string product string license key string username string n npayload nheaders n accept application json n date string n authorization string n n nresponse requests request get url headers headers data payload n nprint response text n customlabel id z5q0sg9xmqtnvhkxucjn language ruby code require uri nrequire net http n nurl uri api v4 trial key?hardware id string product string license key string username string n nhttp net http new url host url port ; nrequest net http get new url nrequest accept application json nrequest date string nrequest authorization string n nresponse http request request nputs response read body n customlabel selectedlanguageid fanx6wpbmq3niaudjgpum description creates and returns a trial license currentnewparameter label query parameter value queryparameters for a trial license to be created, the product must have trial licenses enabled by setting allow trial to true by default, the same combination of hardwareid and product will generate the same trial key this ensures that users cannot obtain multiple trial keys on the same device if you want to permit multiple trial licenses on the same device, you can enable this feature by adjusting the allow multiple licenses on trial setting in the vendor platform under your company account settings schema request query parameters type trialkeyrequestparameters = { // required parameters product string, hardware id string, // required for key based products license key string, // required for user based products email string, // optional for user based products password? string | undefined, // optional property license policy? string | undefined, // if any of the following optional properties is set, a customer is created for (or associated to) this trial key request first name? string | undefined, last name? string | undefined, phone? string | undefined, phone? string | undefined, address? string | undefined, postcode? string | undefined, state? string | undefined, country? string | undefined, city? string | undefined, reference ? string | undefined, } json schema { "$schema" "https //json schema org/draft/2020 12/schema", "type" "object", "properties" { "product" { "type" "string" }, "hardware id" { "type" "string" }, "license key" { "type" "string" }, "email" { "type" "string", "format" "email" }, "password" { "type" \["string"] }, "license policy" { "type" \["string"] }, "first name" { "type" \["string"] }, "last name" { "type" \["string"] }, "phone" { "type" \["string"] }, "address" { "type" \["string"] }, "postcode" { "type" \["string"] }, "state" { "type" \["string"] }, "country" { "type" \["string"] }, "city" { "type" \["string"] }, "reference" { "type" \["string"] } }, "oneof" { "required" { \["product", "hardware id", "license key"] }, "required" { \["product", "hardware id", "email"] } }, "additionalproperties" false } response body the response from this endpoint will differ depending in whether a trial license already exists for the requested product, hardware id and email ( if using user based license) 1\ if a new trial license is being created type trialkeyresponsebody = { id number, license type 'perpetual' | 'time limited' | 'consumption' | 'subscription', order id number, product id number, max activations number, times activated number, is trial true, active boolean, enabled boolean, max transfers number, trial days number, maintenance duration string | null, // length of time expressed in days, months or years, e g 5d, 2m, 3y validity period string | null, // date string in full iso 8601 format, e g "2024 09 27t23 30 48 016z" enable maintenance period boolean, prevent vm boolean, is hardware key auth boolean, initial password string, metadata json, created at number, // unix timestamp in milliseconds updated at number, // unix timestamp in milliseconds licenseproductfeatures ({ id number, product feature id number, max consumption number, allow overages boolean, max overages number, reset consumption number, consumption period string | null, expiry date string | null, // date string in full iso 8601 format, e g "2024 09 27t23 30 48 016z" is floating boolean, is floating cloud boolean, metadata json, // the following properties are only present if is floating=true or is floating cloud=true floating timeout number, floating users number, })\[], licensecustomfields { product custom field id number, value string }\[], // the following properties are only present for key based product licenses license string, license key string, // the following properties are only present for user based product licenses license user string, initial password string, max license users number, license user id number | null, // the following properties are only present if license type="subscription" grace period number, allow grace period boolean, // the following properties are only present if license type="consumption" allow overages boolean, max overages number, max consumptions number, valid duration null, consumption period string | null, reset consumption boolean, } json schema 2\ if a trial license already exists { license type 'perpetual' | 'time limited' | 'consumption' | 'subscription', is trial true, // the following property is only present on key based product licenses license string, // the following property is only present on user based product licenses license user string, } json schema 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