> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/license-api/license-activation-and-deactivation/activate-bundle-offline-method.md).

# Activate Bundle (Offline Method)

{% hint style="info" %}
Currently we support trial, perpetual and consumption license types for offline activation purposes.
{% endhint %}

### Endpoint

* Method: `POST`
* Path: `/api/v4/activate_bundle_offline`
* Description: Activates all licenses inside a bundle using the offline activation flow (base64 payload).

### Authentication

See [License API Authorization](/license-api/license-api-authorization.md).

#### Required headers

* `Date` (string) — RFC7231 GMT date string
* `Authorization` (string) — signature or bearer token

#### Recommended headers

* `Accept: application/json`

### Request

#### Body

The request body is a **base64-encoded, stringified JSON object**.

<details>

<summary><strong>Interactive API reference</strong></summary>

:::ApiMethodV2

```json
{
  "tab": "examples",
  "url": "/api/v4/activate_bundle_offline",
  "name": "/api/v4/activate_bundle_offline",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "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": [
      {
        "name": "base64-encoded JSON object",
        "kind": "required",
        "type": "Object",
        "description": "The request body is a base64-encoded stringified JSON object containing the properties below. See the \"Finalized payload\" section for examples on how to generate this payload",
        "children": [
          {
            "name": "api_key OR client_id",
            "kind": "required",
            "type": "string",
            "description": "Authorization parameter used for the request, either `api_key` if using API key-based authorization, or `client_id` if using SSO authorization"
          },
          {
            "name": "date",
            "kind": "required",
            "type": "string",
            "description": "In RFC7231 format (see \"License API Authorization\"), eg.: Thu, 17 Nov 2022 20:51:35 GMT"
          },
          {
            "name": "request_id",
            "kind": "required",
            "type": "string",
            "description": "Custom unique ID used to identify the request"
          },
          {
            "name": "request",
            "kind": "required",
            "type": "string",
            "description": "Determines the type of request: \"activation\" or \"deactivation\""
          },
          {
            "name": "signature",
            "kind": "required",
            "type": "string",
            "description": "Calculated request signature (see section below)"
          },
          {
            "name": "product",
            "kind": "required",
            "type": "string",
            "description": "Product short code"
          },
          {
            "name": "hardware_id",
            "kind": "required",
            "type": "string",
            "description": "Unique hardware ID generated for the client device"
          },
          {
            "name": "license_key",
            "kind": "optional",
            "type": "string",
            "description": "Required if product is key-based (see section below)"
          },
          {
            "name": "username",
            "kind": "optional",
            "type": "string",
            "description": "Required if product is user based (see section below)"
          },
          {
            "name": "password",
            "kind": "optional",
            "type": "string",
            "description": "Required if product is user based (see section below)"
          },
          {
            "name": "license_id",
            "kind": "optional",
            "type": "Number",
            "description": "Ensures that the action affects only the license with the specified ID. This is useful if e.g. you have multiple licenses for the same product assigned to the same user"
          },
          {
            "name": "os_ver",
            "kind": "optional",
            "type": "string",
            "description": "Operating System description string which will be stored in license device data"
          },
          {
            "name": "hostname",
            "kind": "optional",
            "type": "string",
            "description": "Hostname string which will be stored in license device data"
          },
          {
            "name": "os_hostname",
            "kind": "optional",
            "type": "string",
            "description": "Legacy version of \"hostname\" parameter (see above)"
          },
          {
            "name": "ip",
            "kind": "optional",
            "type": "string",
            "description": "Client IP address string which will be stored in license device data"
          },
          {
            "name": "ip_local",
            "kind": "optional",
            "type": "string",
            "description": "Legacy version of \"ip\" parameter (see above)"
          },
          {
            "name": "app_ver",
            "kind": "optional",
            "type": "string",
            "description": "Application version string which will be stored in license device data"
          },
          {
            "name": "sdk_ver",
            "kind": "optional",
            "type": "string",
            "description": "SDK version string which will be stored in license device data"
          },
          {
            "name": "mac_address",
            "kind": "optional",
            "type": "string",
            "description": "Client MAC address which will be stored in license device data"
          },
          {
            "name": "variables",
            "kind": "optional",
            "type": "Object",
            "description": "Stores device variables. Variables are sent as a JSON object where the key is the variable name, and the value is the value of the variable"
          }
        ],
        "schema": [
          {
            "name": "api_key OR client_id",
            "kind": "required",
            "type": "string",
            "description": "Authorization parameter used for the request, either `api_key` if using API key-based authorization, or `client_id` if using SSO authorization"
          },
          {
            "name": "date",
            "kind": "required",
            "type": "string",
            "description": "In RFC7231 format (see \"License API Authorization\"), eg.: Thu, 17 Nov 2022 20:51:35 GMT"
          },
          {
            "name": "request_id",
            "kind": "required",
            "type": "string",
            "description": "Custom unique ID used to identify the request"
          },
          {
            "name": "request",
            "kind": "required",
            "type": "string",
            "description": "Determines the type of request: \"activation\" or \"deactivation\""
          },
          {
            "name": "signature",
            "kind": "required",
            "type": "string",
            "description": "Calculated request signature (see section below)"
          },
          {
            "name": "product",
            "kind": "required",
            "type": "string",
            "description": "Product short code"
          },
          {
            "name": "hardware_id",
            "kind": "required",
            "type": "string",
            "description": "Unique hardware ID generated for the client device"
          },
          {
            "name": "license_key",
            "kind": "optional",
            "type": "string",
            "description": "Required if product is key-based (see section below)"
          },
          {
            "name": "username",
            "kind": "optional",
            "type": "string",
            "description": "Required if product is user based (see section below)"
          },
          {
            "name": "password",
            "kind": "optional",
            "type": "string",
            "description": "Required if product is user based (see section below)"
          },
          {
            "name": "license_id",
            "kind": "optional",
            "type": "Number",
            "description": "Ensures that the action affects only the license with the specified ID. This is useful if e.g. you have multiple licenses for the same product assigned to the same user"
          },
          {
            "name": "os_ver",
            "kind": "optional",
            "type": "string",
            "description": "Operating System description string which will be stored in license device data"
          },
          {
            "name": "hostname",
            "kind": "optional",
            "type": "string",
            "description": "Hostname string which will be stored in license device data"
          },
          {
            "name": "os_hostname",
            "kind": "optional",
            "type": "string",
            "description": "Legacy version of \"hostname\" parameter (see above)"
          },
          {
            "name": "ip",
            "kind": "optional",
            "type": "string",
            "description": "Client IP address string which will be stored in license device data"
          },
          {
            "name": "ip_local",
            "kind": "optional",
            "type": "string",
            "description": "Legacy version of \"ip\" parameter (see above)"
          },
          {
            "name": "app_ver",
            "kind": "optional",
            "type": "string",
            "description": "Application version string which will be stored in license device data"
          },
          {
            "name": "sdk_ver",
            "kind": "optional",
            "type": "string",
            "description": "SDK version string which will be stored in license device data"
          },
          {
            "name": "mac_address",
            "kind": "optional",
            "type": "string",
            "description": "Client MAC address which will be stored in license device data"
          },
          {
            "name": "variables",
            "kind": "optional",
            "type": "Object",
            "description": "Stores device variables. Variables are sent as a JSON object where the key is the variable name, and the value is the value of the variable"
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "es8g1cuKJMbNPiIVt9VoF",
        "code": "",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "7eyIlKSv2QgJcowEsDZ-2",
        "code": "",
        "language": "400",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "es8g1cuKJMbNPiIVt9VoF"
  },
  "examples": {
    "languages": [
      {
        "id": "MVswmprxv53Y8L_yhrmmd",
        "language": "curl",
        "code": "curl --location --request POST '/api/v4/activate_bundle_offline' \\\n--header 'Accept: application/json' \\\n--header 'Date: string' \\\n--header 'Authorization: string' \\\n--data-raw '_BASE64_PAYLOAD_HERE_'",
        "customLabel": ""
      },
      {
        "id": "ZCTQO7_LVyOjAVX7pP4kO",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': '/api/v4/activate_bundle_offline',\n   'headers': {\n      'Accept': 'application/json',\n      'Date': 'string',\n      'Authorization': 'string'\n   },\n   body: Buffer.from(JSON.stringify(offline_payload)).toString('base64')\n};\n\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "LI5XFmSVTa4QEJC9tahg2",
        "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: 'POST',\n   headers: myHeaders,\n   body: btoa(JSON.stringify(offline_payload)),\n   redirect: 'follow'\n};\n\nfetch(\"/api/v4/activate_bundle_offline\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "cmQNdWH3b3clWrX7G_IxJ",
        "language": "python",
        "code": "import requests\n\nurl = \"/api/v4/activate_bundle_offline\"\n\npayload = \"{\\\"Payload\\\":\\\"Object\\\"}\"\nheaders = {\n   'Accept': 'application/json',\n   'Date': 'string',\n   'Authorization': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "i6V2Wf-nI00sMv9ahE5rB",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"/api/v4/activate_bundle_offline\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Date\"] = \"string\"\nrequest[\"Authorization\"] = \"string\"\nrequest.body = \"{\\\"Payload\\\":\\\"Object\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "i6V2Wf-nI00sMv9ahE5rB"
  },
  "description": "Activates all licenses inside of a bundle using the offline activation method. Returns the list of activated licenses in response\n",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```

:::

</details>

### Schema

#### Request Body

The request body is a string representing a base64-encoded JSON object containing all the required activation data.

{% hint style="danger" %}
If using `multipart/form-data`, the `file` form parameter is mandatory.
{% endhint %}

<details>

<summary><strong>Request schema (TypeScript + JSON Schema)</strong></summary>

**TypeScript**

```typescript
type LicenseOfflineActivationObject = ({

  // for key-based licenses:
  license_key: string

} | {

  // for user-based licenses:
  username: string
  password: string

}) & {

  // required properties:
  hardware_id: string
  product: string
  request_id: string
  signature: string
  date: string
  request: "activation"

} & ({
  api_key: string // for API key authorization
} | {
  client_id: string // for OAuth authorization
}) & {

  // optional properties:
  bundle_code?: string | undefined
  license_id?: number | undefined
  is_vm?: boolean | undefined
  vm_info?: string | undefined
  os_ver?: string | undefined
  hostname?: string | undefined
  os_hostname?: string | undefined
  ip?: string | undefined
  ip_local?: string | undefined
  app_ver?: string | undefined
  sdk_ver?: string | undefined
  mac_address?: string | undefined
  variables?: { [key: string]: string } | undefined
}
```

**JSON Schema**

```json
{
  "$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" },
            "password": { "type": "string" }
          },
          "required": ["username", "password"],
          "additionalProperties": false
        }
      ]
    },
    {
      "type": "object",
      "properties": {
        "api_key": { "type": "string" },
        "client_id": { "type": "string" },
        "request": { "type": "string" },
        "request_id": { "type": "string" },
        "date": { "type": "string" },
        "signature": { "type": "string" },
        "hardware_id": { "type": "string" },
        "product": { "type": "string" },
        "bundle_code": { "type": "string" },
        "license_id": { "type": "number" },
        "is_vm": { "type": "boolean" },
        "vm_info": { "type": "string" },
        "os_ver": { "type": "string" },
        "hostname": { "type": "string" },
        "os_hostname": { "type": "string" },
        "ip": { "type": "string" },
        "ip_local": { "type": "string" },
        "app_ver": { "type": "string" },
        "sdk_ver": { "type": "string" },
        "mac_address": { "type": "string" },
        "variables": {
          "type": "object",
          "additionalProperties": { "type": "string" }
        }
      },
     "allOf": [
        { "anyOf": [{ "required": ["api_key"] }, { "required": ["client_id"] }] },
        { "anyOf": [{ "required": ["license_key"] }, { "required": ["username"] }] }
      ],
      "required": ["hardware_id", "product", "date", "signature"],
      "additionalProperties": false
    }
  ]
}
```

</details>

#### Signature

The `signature` value is constructed as follows:

{% stepper %}
{% step %}

### Build the signing string — part 1

Start with the literal string: licenseSpring then a newline.
{% endstep %}

{% step %}

### Build the signing string — part 2

Append: date: then a newline.
{% endstep %}

{% step %}

### Build the signing string — part 3

Append either the license identifier (whichever is present for the request):

* the "license\_key" value, or
* the "username" value then a newline.
  {% endstep %}

{% step %}

### Build the signing string — part 4

Append the "hardware\_id" value, then a newline.
{% endstep %}

{% step %}

### Build the signing string — part 5

Append the authorization identifier:

* the "api\_key" value (if using API key auth), or
* the "client\_id" value (if using OAuth) This completes the signing string.
  {% endstep %}

{% step %}

### Create HMAC

Encrypt the complete signing string using HMAC-SHA256 with the company signing key:

* If using API key authorization: signing key = Shared Key
* If using OAuth: signing key = Client Secret

Example (Node.js):
{% endstep %}
{% endstepper %}

```javascript
import crypto from 'node:crypto';

const activationPayload = {
  // ...payload content...
};

// api_key or client_id depending on authorization type used:
const key = (activationPayload.api_key || activationPayload.client_id);

// if using API key authorization: the signing key is the Shared Key
// if using OAuth: the signing key is the Client Secret
const signingKey = '...';

const signingString =
  'licenseSpring\n' +
  'date: ' + activationPayload.date + '\n' +
  (activationPayload.license_key || activationPayload.username) + '\n' +
  activationPayload.hardware_id + '\n' +
  key;

const signature = crypto
  .createHmac('sha256', signingKey)
  .update(signingString)
  .digest('base64');
```

#### Finalized payload

This object is then stringified and encoded to base64.

{% tabs %}
{% tab title="JS Browser" %}

```javascript
const activationPayload = {
  // ...payload content...
};
const requestBody = btoa(JSON.stringify(activationPayload));
```

{% endtab %}

{% tab title="nodeJS" %}

```javascript
const activationPayload = {
  // ...payload content...
};
const requestBody = Buffer.from(JSON.stringify(activationPayload)).toString('base64');
```

{% endtab %}
{% endtabs %}

#### Response Body

<details>

<summary><strong>Response schema (TypeScript + JSON Schema)</strong></summary>

**TypeScript**

```typescript
type BundleActivationResponseBody = {
  licenses: LicenseActivationResponse[],
  bundle_signature_v2: string,
};

type LicenseActivationResponse = {
  id: number,
  allow_grace_period: boolean,
  allow_overages: boolean,
  allow_unlimited_activations: boolean,
  borrowed_until: string | null,
  can_borrow: boolean,
  channel: string,
  device_id: number,
  enable_maintenance_period: boolean
  environment: string,
  eula_link: string,
  floating_timeout: number,
  grace_period: number,
  hash_md5: string,
  installation_file: string,
  is_air_gapped: boolean,
  is_borrowed: boolean,
  is_expired: boolean,
  is_floating_cloud: boolean,
  is_floating: boolean,
  is_hardware_key_auth: boolean,
  license_active: boolean,
  license_enabled: boolean,
  license_signature: string,
  license_signature_v2: string,
  offline_signature: string,
  license_type: string,
  maintenance_period: string | null,
  max_activations: number,
  max_borrow_time: number,
  max_license_users: number,
  max_overages: number,
  max_transfers: number,
  order_store_id: string,
  prevent_vm: boolean,
  release_date: string,
  release_notes_link: string,
  requires_version: string,
  size: string,
  start_date: string | null,
  times_activated: number,
  transfer_count: number,
  validity_period: string | null, // string is in DateISO8601UTC format
  version: string,
  company: { id: number },
  
  product_features: ({
    id: number,
    code: string,
    name: string,
    expiry_date: string,
    metadata: JSON,
    feature_type: 'activation' | 'consumption',
    is_floating: boolean,
    is_floating_cloud: boolean,

    // the following properties are only present if is_floating=true or is_floating_cloud=true
    floating_users: number,
    floating_timeout: number,

    // the following properties are only present if feature_type=consumption
    max_consumption: number,
    allow_unlimited_consumptions: boolean,
    total_consumptions: number,
    allow_overages: number,
    max_overages: number,
    reset_consumption: boolean,
    consumption_period: 'daily' | 'weekly' | 'monthly' | 'annualy' | null,
  })[],
  
  custom_fields: ({
    name: string,
    data_type: 'numer' | 'text' | 'date/time',
    value: string,
  })[],
  
  customer: {
    email: string,
    company_name: string,
    reference: string,
    phone: string,
    first_name: string,
    last_name: string,
    city: string,
    postcode: string,
    state: string,
    country: string,
    address: string,
    customer_account: string | null,
    metadata: JSON,
  },
  
  product_details: {
    product_id: number,
    product_name: string,
    short_code: string,
    authorization_method: 'license-key' | 'user',
    metadata: JSON,
  },
  
  metadata: JSON,
  
  // the following property is only present if is_trial=true
  trial_days: number,
  
  // the following properties is only present if is_floating=true or is_floating_cloud=true
  floating_in_use_devices: number,
  floating_users: number,
  
  // the following properties are only present if license_type='consumption'
  max_consumptions: number,
  total_consumptions: number,
  allow_unlimited_consumptions: boolean,
  reset_consumption: boolean,
  consumption_period: string | null, // string is in DateISO8601UTC format
  
} & ({

  // for key-based licenses:
  license_key: string,

} | {

  // for user-based licenses:
  user: {
    id: number,
    email: string,
    first_name: string,
    last_name: string,
    phone_number: string,
    is_initial_password: boolean,
    max_activations: number,
    allow_unlimited_activations: boolean,
    total_activations: number
  }
});
```

**JSON Schema**

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "bundle_signature_v2": {
      "type": "string"
    },
    "licenses": {
      "type": "array",
      "items": {
        "type": "object",
        "allOf": [
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "license_key": {
                    "type": "string"
                  }
                },
                "required": [
                  "license_key"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "user": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "email": {
                        "type": "string"
                      },
                      "first_name": {
                        "type": "string"
                      },
                      "last_name": {
                        "type": "string"
                      },
                      "phone_number": {
                        "type": "string"
                      },
                      "is_initial_password": {
                        "type": "boolean"
                      },
                      "max_activations": {
                        "type": "number"
                      },
                      "allow_unlimited_activations": {
                        "type": "boolean"
                      },
                      "total_activations": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "email",
                      "first_name",
                      "last_name",
                      "phone_number",
                      "is_initial_password",
                      "max_activations",
                      "allow_unlimited_activations",
                      "total_activations"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "user"
                ],
                "additionalProperties": false
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "number"
              },
              "allow_grace_period": {
                "type": "boolean"
              },
              "allow_overages": {
                "type": "boolean"
              },
              "allow_unlimited_activations": {
                "type": "boolean"
              },
              "borrowed_until": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "can_borrow": {
                "type": "boolean"
              },
              "channel": {
                "type": "string"
              },
              "device_id": {
                "type": "number"
              },
              "enable_maintenance_period": {
                "type": "boolean"
              },
              "environment": {
                "type": "string"
              },
              "eula_link": {
                "type": "string"
              },
              "floating_timeout": {
                "type": "number"
              },
              "grace_period": {
                "type": "number"
              },
              "hash_md5": {
                "type": "string"
              },
              "installation_file": {
                "type": "string"
              },
              "is_air_gapped": {
                "type": "boolean"
              },
              "is_borrowed": {
                "type": "boolean"
              },
              "is_expired": {
                "type": "boolean"
              },
              "is_floating_cloud": {
                "type": "boolean"
              },
              "is_floating": {
                "type": "boolean"
              },
              "is_hardware_key_auth": {
                "type": "boolean"
              },
              "license_active": {
                "type": "boolean"
              },
              "license_enabled": {
                "type": "boolean"
              },
              "license_signature": {
                "type": "string"
              },
              "license_signature_v2": {
                "type": "string"
              },
              "offline_signature": {
                "type": "string"
              },
              "license_type": {
                "type": "string"
              },
              "maintenance_period": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_activations": {
                "type": "number"
              },
              "max_borrow_time": {
                "type": "number"
              },
              "max_license_users": {
                "type": "number"
              },
              "max_overages": {
                "type": "number"
              },
              "max_transfers": {
                "type": "number"
              },
              "order_store_id": {
                "type": "string"
              },
              "prevent_vm": {
                "type": "boolean"
              },
              "release_date": {
                "type": "string"
              },
              "release_notes_link": {
                "type": "string"
              },
              "requires_version": {
                "type": "string"
              },
              "size": {
                "type": "string"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "times_activated": {
                "type": "number"
              },
              "transfer_count": {
                "type": "number"
              },
              "validity_period": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "company": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number"
                  }
                }
              },
              "product_features": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "expiry_date": {
                      "type": "string"
                    },
                    "metadata": {},
                    "feature_type": {
                      "type": "string",
                      "enum": [
                        "activation",
                        "consumption"
                      ]
                    },
                    "is_floating": {
                      "type": "boolean"
                    },
                    "is_floating_cloud": {
                      "type": "boolean"
                    },
                    "floating_users": {
                      "type": "number"
                    },
                    "floating_timeout": {
                      "type": "number"
                    },
                    "max_consumption": {
                      "type": "number"
                    },
                    "allow_unlimited_consumptions": {
                      "type": "boolean"
                    },
                    "total_consumptions": {
                      "type": "number"
                    },
                    "allow_overages": {
                      "type": "boolean"
                    },
                    "max_overages": {
                      "type": "number"
                    },
                    "reset_consumption": {
                      "type": "boolean"
                    },
                    "consumption_period": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "daily",
                        "weekly",
                        "monthly",
                        "annualy",
                        null
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "code",
                    "name",
                    "expiry_date",
                    "metadata",
                    "feature_type",
                    "is_floating",
                    "is_floating_cloud"
                  ]
                }
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "data_type": {
                      "type": "string",
                      "enum": [
                        "numer",
                        "text",
                        "date/time"
                      ]
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "data_type",
                    "value"
                  ]
                }
              },
              "customer": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "company_name": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "first_name": {
                    "type": "string"
                  },
                  "last_name": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "postcode": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "address": {
                    "type": "string"
                  },
                  "customer_account": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "metadata": {}
                },
                "required": [
                  "email",
                  "company_name",
                  "reference",
                  "phone",
                  "first_name",
                  "last_name",
                  "city",
                  "postcode",
                  "state",
                  "country",
                  "address",
                  "metadata"
                ]
              },
              "product_details": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "number"
                  },
                  "product_name": {
                    "type": "string"
                  },
                  "short_code": {
                    "type": "string"
                  },
                  "authorization_method": {
                    "type": "string",
                    "enum": [
                      "license-key",
                      "user"
                    ]
                  },
                  "metadata": {}
                },
                "required": [
                  "product_id",
                  "product_name",
                  "short_code",
                  "authorization_method",
                  "metadata"
                ]
              },
              "metadata": {},
              "trial_days": {
                "type": "number"
              },
              "floating_in_use_devices": {
                "type": "number"
              },
              "floating_users": {
                "type": "number"
              },
              "max_consumptions": {
                "type": "number"
              },
              "total_consumptions": {
                "type": "number"
              },
              "allow_unlimited_consumptions": {
                "type": "boolean"
              },
              "reset_consumption": {
                "type": "boolean"
              },
              "consumption_period": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "allow_grace_period",
              "allow_overages",
              "allow_unlimited_activations",
              "can_borrow",
              "channel",
              "device_id",
              "enable_maintenance_period",
              "environment",
              "eula_link",
              "floating_timeout",
              "grace_period",
              "hash_md5",
              "installation_file",
              "is_air_gapped",
              "is_borrowed",
              "is_expired",
              "is_floating_cloud",
              "is_floating",
              "is_hardware_key_auth",
              "license_active",
              "license_enabled",
              "license_signature",
              "license_signature_v2",
              "offline_signature",
              "license_type",
              "max_activations",
              "max_borrow_time",
              "max_license_users",
              "max_overages",
              "max_transfers",
              "order_store_id",
              "prevent_vm",
              "release_date",
              "release_notes_link",
              "requires_version",
              "size",
              "times_activated",
              "transfer_count",
              "version",
              "product_features",
              "custom_fields",
              "customer",
              "product_details",
              "metadata"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  }
}
```

</details>

#### Response Signature

The response objects two digital signatures which the client app can use to verify the authenticty of the response:

1. `license_signature` is the HMAC-SHA256 signature explained in the [Response Signature](/license-api/license-api-authorization/response-signature.md) article.
2. `offline_signature` is an additional HMAC-SHA256 signature specific to this endpoint. This value is constructed identically to the `signature` parameter in the request payload (see [Signature](#signature) above) using the `date` value received in the response.

### 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

Each license assigned to the product requires the client to provide a license key in order to activate, check or deactivate the license (property `license_key` in the request body).

The license response object will contain the `license_key` property, and the property `product_details.authorization_method` will be the string `license_key`.

#### User-based product licenses

Each license assigned to the product has a corresponding "license user" instead of a license key. Requires `username` and `password` to be provided.

In the license response object, `product_details.authorization_method` will have the string value `user` and the response object will contain the `user` object with information on the license user.

### License Types

The `license_type` property defines one of the 4 types of licenses based on their duration and how the license is used:

* Perpetual: `perpetual`
* Time-limited: `time-limited`
* Subscription: `subscription`
* Consumption: `consumption`

For more information see: [License Types](/license-entitlements/license-types.md)

### Device variables

The optional `variables` parameter lets you set device variables during activation. For more information, see [Device Variables](/license-api/device-variables.md).

### 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:

```typescript
{
  status: number,
  code: string,
  message: string
}
```

JSON Schema

```json
{
  "$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

> **missing\_headers** (400): some headers are missing

* when missing authorization or date headers

> **missing\_parameters** (400): some parameters are missing in the request: different, parameters

* when no request body at all or no file found in request body

> **authorization\_missing\_params** (400): some parameters are missing in authorization: different, parameters

* when has request body but request body is not properly base 64 encoded
* when file is missing in request body
* when license\_key or hardware\_id body parameters are missing
* when data body parameter is missing
* when api\_key parameter is missing

> **product\_not\_bundle** (400): Specified product "{CODE}" is not a bundle

{% hint style="info" %}
If you want to use this API endpoint directly, instead of using an SDK (which does most of the heavy lifting), contact us for additional instructions.
{% endhint %}

### Guide on using Offline Licenses

If any aspect of the offline licensing model remains unclear or raises questions, we encourage you to explore our in-depth guide on [link](https://docs.licensespring.com/license-entitlements/activation-types/offline)

This resource offers a comprehensive explanation of the offline licensing process, how it operates, and ways to utilize its advantages for your specific software applications.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.licensespring.com/license-api/license-activation-and-deactivation/activate-bundle-offline-method.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
