bright, fresh software
Downloads  |  Buy

limelm.feature.add

Add a new custom license field for a particular version. Note that if you want to set the license field values for existing product keys, use the limelm.pkey.setDetails function.

Arguments

api_key (Required)
Your API application key. Your api key is available on your settings page.
version_id (Required)
The id of the version to add the new field to. You can get the version ID by examining the URL in your browser. For instance, from the URL http://wyday.com/limelm/version/100/ you can see the version ID is 100. (Note: The Version ID is not the Version GUID).
name (Required)
The name of the custom license field. Maximum 255 characters.
type (Optional)
The type of the license field. The 4 possible values are "string", "int", "date_time", and "checkbox". If this parameter isn't present (or is invalid) the type will default to "string".
required (Optional)
Whether this license field will be required to be filled out when a new product key is created. Possible values are "true" and "false". If this parameter isn't present (or is invalid) it will default to "true".
ta_readable (Optional)
Whether this license field will be readable from your application using the TurboActivate function GetFeatureValue(). Possible values are "true" and "false". If this parameter isn't present (or is invalid) it will default to "true".
description (Optional)
The description of the license field that will appear when you create and edit product keys. Maximum 255 characters.
default_val (Optional)
Set a default value that this custom license field will have if the value is left blank when creating new product keys.
default_dt_relative (Optional)
If this argument is set to "pkey_created" and the "type" is "date_time", then you can use relative times for the "default_val". The relative time must be in the form [+ | -] N [days | months | years | minutes | hours]. Examples of relative times:
  • + 22 days
  • - 1 months
  • + 2 years
If you're missing the leading +/- symbol then the value will be rejected and an error will be returned. If this "default_dt_relative" argument is set to anything other than "pkey_created" then the argument will be ignored.

Example Response

The method returns your newly created license field's ID.

<feature id="42"/>

Error Codes

100: Invalid API Key
The API key passed was not valid or has expired.
101: Method "xxx" not found
The requested method was not found.
108: The version id is missing.
The version id was not specified.
109: The version doesn't exist or you don't have access to it.
Check to make sure you have access to the version id you've passed in.
118: Your account is in dormant mode. Re-enable your account.
You cannot generate product keys when your account is in dormant mode. Re-enable your account and you will no longer get this error.
125: The "name" parameter must exist and it must be less than 255 characters long.
Make sure your license field name is greater than 0 characters and less than 255.
126: Please enter a new field name (FieldName already exists).
You can't have multiple features with the same name. Use a unique field name.
142: Service currently unavailable
The requested service is temporarily unavailable.
150: The "description" parameter must be less than 255 characters long.
If you're using a description it must be 255 characters or less.
154: Relative time is missing the preceding plus / minus sign.
The default value must be preceded by a "+" or "-".
155: The unit provided is not valid. Valid units are "days", "months", "years", "minutes", "hours".
Provide the valid unit for the relative default value.