Skip to main content
GET
https://api.chariow.com/v1
/
licenses
/
{licenseKey}
/
activations
curl -X GET "https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activations?per_page=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "message": "success",
  "data": {
    "activations": [
      {
        "id": 3,
        "issued_license_id": 1,
        "activated_by_ip": "203.0.113.45",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
        "device_identifier": "00:1B:44:11:3A:B7",
        "metadata": null,
        "created_at": "2025-01-18T15:42:00.000000Z"
      },
      {
        "id": 2,
        "issued_license_id": 1,
        "activated_by_ip": "198.51.100.12",
        "user_agent": "MyApp/1.2.0 (macOS 14.2)",
        "device_identifier": "A4:5E:60:D8:2F:11",
        "metadata": null,
        "created_at": "2025-01-16T09:15:00.000000Z"
      },
      {
        "id": 1,
        "issued_license_id": 1,
        "activated_by_ip": "192.0.2.100",
        "user_agent": "MyApp/1.0.0 (Windows 11)",
        "device_identifier": "desktop-workstation-001",
        "metadata": null,
        "created_at": "2025-01-15T10:30:00.000000Z"
      }
    ],
    "pagination": {
      "next_cursor": null,
      "prev_cursor": null,
      "has_more": false,
      "per_page": 20
    },
    "summary": {
      "total_activations": 3,
      "max_activations": 10,
      "activations_remaining": 7
    }
  },
  "errors": []
}
Fetches a cursor-paginated list of all activation records for a specific license, ordered by most recent first. Each activation record contains detailed information about when and where the license was activated, including IP address, user agent, device identifier, and timestamp. This endpoint is useful for auditing license usage, tracking device activations, and debugging activation-related issues. The response includes pagination metadata and a summary of total, maximum, and remaining activations.

Path Parameters

licenseKey
string
required
The license key to retrieve activations for (e.g., ABC-123-XYZ-789)

Query Parameters

per_page
integer
default:"50"
Number of activation records to return per page (max 100)
cursor
string
Cursor for pagination. Use the next_cursor from the previous response.

Response

data
object
curl -X GET "https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activations?per_page=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "message": "success",
  "data": {
    "activations": [
      {
        "id": 3,
        "issued_license_id": 1,
        "activated_by_ip": "203.0.113.45",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
        "device_identifier": "00:1B:44:11:3A:B7",
        "metadata": null,
        "created_at": "2025-01-18T15:42:00.000000Z"
      },
      {
        "id": 2,
        "issued_license_id": 1,
        "activated_by_ip": "198.51.100.12",
        "user_agent": "MyApp/1.2.0 (macOS 14.2)",
        "device_identifier": "A4:5E:60:D8:2F:11",
        "metadata": null,
        "created_at": "2025-01-16T09:15:00.000000Z"
      },
      {
        "id": 1,
        "issued_license_id": 1,
        "activated_by_ip": "192.0.2.100",
        "user_agent": "MyApp/1.0.0 (Windows 11)",
        "device_identifier": "desktop-workstation-001",
        "metadata": null,
        "created_at": "2025-01-15T10:30:00.000000Z"
      }
    ],
    "pagination": {
      "next_cursor": null,
      "prev_cursor": null,
      "has_more": false,
      "per_page": 20
    },
    "summary": {
      "total_activations": 3,
      "max_activations": 10,
      "activations_remaining": 7
    }
  },
  "errors": []
}

Use Cases

Audit Trail

Track all devices that have activated a license:
async function getActivationHistory(licenseKey) {
  const response = await fetch(
    `https://api.chariow.com/v1/licenses/${licenseKey}/activations`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const { data } = await response.json();

  console.log(`License activated ${data.summary.total_activations} times`);
  console.log(`${data.summary.activations_remaining} activations remaining`);

  data.activations.forEach(activation => {
    console.log(`Device: ${activation.device_identifier}`);
    console.log(`IP: ${activation.activated_by_ip}`);
    console.log(`Date: ${activation.created_at}`);
  });

  return data;
}

Device Management

Display activation history to customers:
async function showCustomerActivations(licenseKey) {
  const response = await fetch(
    `https://api.chariow.com/v1/licenses/${licenseKey}/activations`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const { data } = await response.json();

  return {
    devices: data.activations.map(a => ({
      name: a.device_identifier || 'Unknown Device',
      ip: a.activated_by_ip,
      activatedAt: new Date(a.created_at).toLocaleDateString()
    })),
    summary: data.summary
  };
}

Fraud Detection

Identify suspicious activation patterns:
async function detectSuspiciousActivity(licenseKey) {
  const response = await fetch(
    `https://api.chariow.com/v1/licenses/${licenseKey}/activations`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const { data } = await response.json();

  // Check for multiple activations from different locations
  const uniqueIPs = new Set(data.activations.map(a => a.activated_by_ip));

  if (uniqueIPs.size > 5) {
    console.warn('Suspicious: License activated from multiple IP addresses');
  }

  // Check for rapid activations
  const activations = data.activations.map(a => new Date(a.created_at));
  // ... implement your logic

  return {
    suspicious: uniqueIPs.size > 5,
    uniqueLocations: uniqueIPs.size,
    activations: data.activations
  };
}

Pagination

This endpoint uses cursor-based pagination for efficient traversal of large activation lists:
async function getAllActivations(licenseKey) {
  let allActivations = [];
  let cursor = null;

  do {
    const url = cursor
      ? `https://api.chariow.com/v1/licenses/${licenseKey}/activations?cursor=${cursor}`
      : `https://api.chariow.com/v1/licenses/${licenseKey}/activations`;

    const response = await fetch(url, {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    });

    const { data } = await response.json();
    allActivations = [...allActivations, ...data.activations];
    cursor = data.pagination.next_cursor;

  } while (cursor);

  return allActivations;
}

Notes

  • Activations are ordered by most recent first (created_at DESC)
  • Each activation is immutable and cannot be modified
  • Activation records persist even after a license is revoked
  • The device_identifier field is optional and may be null if not provided during activation
  • IP addresses and user agents are automatically captured during activation