Skip to content

Licenses

These endpoints claim, validate, release and check out a license from the device of your customer. This page describes the objects and the reasons that the endpoints share.

Endpoints

EndpointPathDescription
ClaimPOST /v1/licenses/claimTakes a seat for the user and binds the device, if the policy binds them.
ValidatePOST /v1/licenses/validateChecks that the license can be used on this device.
HeartbeatPOST /v1/licenses/heartbeatStarts the lease of the device again.
ReleasePOST /v1/licenses/releaseRemoves the binding of the device.
Check outPOST /v1/licenses/check-outReturns a signed license file for offline use.

Order of calls

  1. Claim the license once, on the first run.
  2. Validate the license on each start.
  3. Send heartbeats while your application runs, if the policy requires them.
  4. Release the license when the user signs out or moves to another device.

Check out a license file if your application must work without a network. See Add your application and Offline validation.

License check object

Claim, validate and heartbeat answer with this object. The process endpoints spawn and heartbeat answer with it too. Release and check-out have their own answers.

FieldTypeDescription
validbooleantrue if your application can use the license. Your application must decide on this field.
statusstringThe status of the license: active, grace, expired or suspended. See Status and validity.
expiredbooleantrue if the expiry date and the grace period have passed.
reasonstringThe cause when valid is false. It is null when valid is true. See Reasons.
licenseobjectThe license. See License.
entitlementsarrayThe entitlements of the license. See Entitlements.
limitsobjectThe limits of the license. See Limits.
deviceobjectThe binding of the device. See Device.
heartbeatobjectThe heartbeat settings of the policy. See Heartbeat.
processobjectThe process of the request. It is null in the answers of the license endpoints. See Processes.
process_heartbeatobjectThe process settings of the policy. See Process heartbeat.

Every field is always in the answer. A field without a value is null. See Refused answers.

License

FieldTypeDescription
idstringThe ID of the license.
namestringThe name of the license. It is null if the license has no name.
expires_atstringThe expiry date of the license. It is null if the license has no expiry date.
activated_atstringThe time of the first claim. It is null if the license was never claimed. See Activation.

The answer never contains the license key.

Entitlements

Each item of the array has these fields:

FieldTypeDescription
codestringThe code of the entitlement. Check this value in your application.
namestringThe name of the entitlement.

The array holds the entitlements of the policy and the extra entitlements of the license. See Entitlements.

Limits

FieldTypeDescription
max_devicesintegerThe device limit.
max_seatsintegerThe seat limit.
max_processesintegerThe limit on concurrent runs on each device. See Concurrent runs.

Null means that there is no limit. The values include the overrides of the license. See License overrides.

Device

FieldTypeDescription
idstringThe ID of the device binding.
expires_atstringThe end of the heartbeat lease. It is null if the policy does not require heartbeats. This is not the expiry date of the license.

The device object is null if the policy does not bind devices. See Heartbeats and leases.

Heartbeat

FieldTypeDescription
requiredbooleantrue if the policy requires heartbeats.
interval_secondsintegerThe number of seconds between two heartbeats. It is null if heartbeats are not required.
grace_secondsintegerThe extra seconds that the lease lasts after the interval. It is null if the policy has no heartbeat grace.

Process heartbeat

FieldTypeDescription
trackedbooleantrue if Seatify counts the concurrent runs of your application. The process endpoints work only when this field is true.
interval_secondsintegerThe number of seconds between two process heartbeats. It is null if tracked is false.
grace_secondsintegerThe extra seconds that the process lease lasts after the interval. It is null if the policy has no process grace.

Refused answers

When valid is false, some fields have no value:

  • An unknown license key, or a key of another product, answers only valid, expired and reason. The other objects are null, and entitlements is empty.
  • Every other refusal also has status, license, limits, heartbeat and process_heartbeat. entitlements is empty, and device is null.

So your application can show the status of a suspended or expired license.

{
  "valid": false,
  "status": null,
  "expired": false,
  "reason": "license_not_found",
  "license": null,
  "entitlements": [],
  "limits": null,
  "device": null,
  "heartbeat": null,
  "process": null,
  "process_heartbeat": null
}

Status and validity

status and valid are two different things. status is the state of the license. valid says whether your application can use it now. For example, an expired license is still valid if the policy uses Keep access or Perpetual fallback. The answer then has valid and expired set to true.

Your application must decide on valid. It can show status to the user. See Statuses.

Reasons

ReasonEndpointsDescription
license_not_foundAllNo license has this key.
product_mismatchAllThe license belongs to another product than the publishable key.
suspendedClaim, validate, heartbeat, check-outThe license is suspended.
expiredClaim, validate, heartbeat, check-outThe license has expired, and the policy uses Expire.
device_requiredClaim, validate, check-outThe policy binds devices, and the request has no device.
customer_requiredClaimThe policy binds customers, and the request has no customer.
device_limit_reachedClaimAll device slots of the license are taken.
seat_limit_reachedClaimAll seats of the license are taken.
not_claimedValidate, heartbeat, release, check-outThe device has no binding on this license.
heartbeat_not_requiredHeartbeatThe policy does not require heartbeats.
offline_validation_not_enabledCheck-outThe policy does not allow offline validation.

The process endpoints have more reasons. See Processes.