Serial Codes Validator — Software Licensing API

Turn the serial keys you sell into real software licenses. Your own application (desktop app, plugin, SaaS, game) calls this REST API to activate, validate, deactivate and update-check a license. Available in the Premium plugin.

Base URL: https://YOUR-SITE.com/wp-json/sngmbh-scv/v1

Authentication

The serial code is the primary credential — send it together with a stable, unique instance id (e.g. a machine UUID or install hash). The API only works while your site holds a valid premium license. Optionally require an API key in the X-Api-Key header; each key can be bound to one code list and restricted to allowed request IPs. Repeated failed requests from the same IP are rate-limited (HTTP 429).

Endpoints

MethodEndpointPurpose
POST/activateActivate a license for an installation (code, instance, optional domain, platform). Enforces the activation limit; idempotent per instance.
POST/deactivateFree an activation slot (code, instance).
GET/validateLicense status: activation count, remaining activations, expiry, active instances (code, optional instance).
GET/versionCurrent version and update package URL for valid licenses (code).

Example (cURL)

curl -s -X POST "https://YOUR-SITE.com/wp-json/sngmbh-scv/v1/activate" 
  -H "Content-Type: application/json" 
  -H "X-Api-Key: scv_your_api_key" 
  -d '{"code":"ABCD-EFGH-IJKL","instance":"machine-uuid-123","domain":"customer-site.com"}'

Example response

{
  "data": { "valid": true, "activation_limit": 3, "activation_count": 1,
            "remaining_activations": 2, "instance_active": true, "expires_at": "" },
  "success": true,
  "status_code": 200
}

JavaScript (fetch)

const res = await fetch('https://YOUR-SITE.com/wp-json/sngmbh-scv/v1/activate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', 'X-Api-Key': 'scv_your_api_key' },
  body: JSON.stringify({ code: 'ABCD-EFGH-IJKL', instance: 'machine-uuid-123' })
});
const json = await res.json();
if (json.success) console.log('Remaining activations:', json.data.remaining_activations);

Error codes

  • HTTP 403 — site has no valid premium license
  • HTTP 429 — too many requests, IP temporarily blocked
  • HTTP 401 — missing or invalid API key
  • HTTP 403 — request IP not allowed for this API key
  • HTTP 403 — code is not part of the API key’s bound code list
  • HTTP 404 — code not found