Variation Metadata in Responses #
New in v1.2.0
License response objects now include variation metadata fields that tell client software which licensing tier settings apply.
Affected Endpoints #
Variation metadata is included in responses from:
- GET /licenses (list)
- GET /licenses/{id} (single)
- POST /licenses/validate (validate)
- POST /licenses/activate (key-based activate)
- POST /licenses/{id}/activate (ID-based activate)
Metadata Fields #
| Field | Type | Description |
|---|---|---|
| license_type | string | Slug of the License Type applied (e.g., “professional”) |
| activation_limit | integer | Effective activation limit (resolved from License Type/product/variation) |
| license_duration | string | Effective duration: “lifetime” or a number of months as a string (e.g., “12”) |
Where These Values Come From #
The values are resolved by resolve_effective_settings(), which applies a 3-level inheritance chain:
The final resolved values are what appears in the API response. This means two licenses for the same product but different variations will return different activation_limit and license_duration values.
Example: Variable Product #
A vendor sells “Pro Plugin” as a variable product with three variations:
| Variation | License Type | Activation Limit | Duration |
|---|---|---|---|
| Personal | standard | 1 | 12 months |
| Business | professional | 5 | 12 months |
| Agency | professional | 25 | lifetime |
A GET /licenses/{id} call for a “Business” license returns:
{
"id": 789,
"license_key": "DMSI-XXXX-XXXX-XXXX-XXXX",
"status": "active",
"license_type": "professional",
"activation_limit": 5,
"license_duration": "12"
}
A GET /licenses/{id} call for an “Agency” license returns:
{
"id": 790,
"license_key": "DMSI-YYYY-YYYY-YYYY-YYYY",
"status": "active",
"license_type": "professional",
"activation_limit": 25,
"license_duration": "lifetime"
}
Use Cases #
Displaying tier information in plugin settings:
Read license_type to show “Professional License” label in your plugin’s settings screen.
Enforcing limits client-side:
Read activation_limit to display “X of Y activations used” without a second API call.
Showing renewal dates:
Read license_duration to calculate and display the expected renewal period.
Adapting UI per tier:
Different license_type values can enable or disable features in your plugin UI based on the purchased tier.
Related Topics #
- [Validate License Endpoint](#)
- [Key-Based Activate and Deactivate](#)
- [License Endpoints](#)
- [License Types](#) (Part 13)
Summary #
API Documentation covers:
- Authentication methods (Cookie, App Passwords, API Keys)
- Rate limiting by authentication type
- Error handling and status codes
- Pagination for list endpoints
- License endpoints (CRUD operations)
- Public validate endpoint (with variation metadata)
- Activation endpoints (ID-based and key-based)
- Key-based activate/deactivate (new in v1.2.0)
- Variation metadata in responses (new in v1.2.0)
- Utility endpoints (health check)
- Integration examples
Next Steps #
- Review [API Settings](#) in the admin
- Test endpoints with a REST client
- Use [Key-Based Activate and Deactivate](#) for new integrations
- See [Variation Metadata in Responses](#) to use tier data in your plugin UI
Document Created: 2025-11-24 | Updated: 2026-03-22 for v1.2.2
Category: API Documentation (ddls-api-documentation)
Total Docs: 12
Status: Ready for BetterDocs import
