API Documentation
API Documentation
API Overview
Last Updated: March 31, 2026API Overview DMSI DDLS provides a REST API for integrating license management with your client software. Base URL https://your-site.com/wp-json/dmsilm/v1 Format All requests and responses use JSON format. Main Endpoints Category Purpose License Endpoints Create, read, update, delete licenses (authenticated) Validate Check if a license key is valid (public) Activate / Deactivate Register or remove a...
Authentication
Last Updated: March 22, 2026API Authentication The API supports three authentication methods. 1. Cookie Authentication No additional headers required. Used for WordPress admin area requests. 2. Application Passwords Use HTTP Basic Authentication with WordPress application passwords: curl -u "username:password" https://example.com/wp-json/dmsilm/v1/licenses 3. API Keys (Custom) Include API key in header: X-API-Key: dmsi_your_key_here Or as query parameter: ?api_key=dmsi_your_key_here Public Endpoints These...
Rate Limiting
Last Updated: March 22, 2026API Rate Limiting Requests are rate-limited based on authentication method. Rate Limits Authentication Limit Unauthenticated 60 requests/hour Cookie/App Password 120 requests/hour API Key 300 requests/hour Rate Limit Headers All responses include: Header Description X-RateLimit-Limit Maximum requests allowed X-RateLimit-Remaining Requests remaining X-RateLimit-Reset Unix timestamp when limit resets Rate Limit Exceeded When limit exceeded, you receive 429...
Error Handling
Last Updated: March 31, 2026API Error Handling All errors follow WordPress REST API standards. Error Response Format Field Description code Machine-readable error code message Human-readable message data.status HTTP status code Common Error Codes Code Status Description rest_forbidden 403 Authentication required rest_rate_limit 429 Rate limit exceeded dmsilm_license_not_found 404 License not found dmsilm_license_invalid 400 License invalid or expired dmsilm_license_expired 400 License...
Pagination
Last Updated: March 22, 2026API Pagination List endpoints support pagination. Query Parameters Parameter Type Default Description page integer 1 Current page number per_page integer 10 Items per page (max 100) search string – Search term orderby string id Sort field order string DESC Sort direction Pagination Headers Header Description X-WP-Total Total items X-WP-TotalPages Total pages Example Request GET /licenses?page=2&per_page=20&order=ASC...
License Endpoints
Last Updated: March 22, 2026License Endpoints Endpoints for managing licenses. List Licenses Property Value Method GET Endpoint /licenses Auth Required Parameters: page, per_page, search, orderby, order Response: Array of license objects. Each license now includes variation metadata fields (v1.2.0): license_type, activation_limit, license_duration. Get License Property Value Method GET Endpoint /licenses/{id} Auth Required Response: Single license object including variation metadata...
Validate License Endpoint
Last Updated: March 31, 2026Validate License Endpoint Public endpoint to validate a license key. Endpoint Details Property Value Method POST Endpoint /licenses/validate Auth None (public) Rate Limit Strict (60/hour) Request Body Field Type Required Description license_key string Yes The license key to validate product_id integer Yes Product ID the license should belong to (enforced in v2.0.0) site_url string No...
Activation Endpoints
Last Updated: March 31, 2026Activation Endpoints Endpoints for activating and deactivating site licenses. Activate Site (ID-Based) Property Value Method POST Endpoint /licenses/{id}/activate Auth None (public) Request Body: Field Type Required Description site_url string Yes URL of the site to activate product_id integer Yes Product ID the license belongs to (required v2.0.0) customer_email string No Customer email to capture (new...
Health and Utility Endpoints
Last Updated: December 2, 2025Health and Utility Endpoints Utility endpoints for monitoring and integration. Health Check Property Value Method GET Endpoint /health Auth None (Public) Response: Field Description status ok version API version timestamp Current server time Use this to verify API is responding. Get Product Info Property Value Method GET Endpoint /products/{id} Auth Required Returns product details including...
API Integration Examples
Last Updated: March 22, 2026API Integration Examples Common integration patterns. WordPress Plugin Integration Validate License on Activation User enters license key in plugin settings Plugin sends POST to /licenses/validate If valid, store key and activate If invalid, show error message Activate Using Key-Based Endpoint (Recommended, v1.2.0) Call POST /licenses/activate with license_key and site_url No need to look up internal...
