This endpoint can be used to query single License record.
Endpoint
GET
/wp-json/dlm/v1/licenses/{license_key}
Responses
{
"success": true,
"data": {
"id": 5,
"order_id": 39,
"product_id": 12,
"user_id": 1,
"license_key": "Z09Z-D0DZ-9A29-3BCD",
"expires_at": "2022-06-27 16:58:10",
"valid_for": 365,
"source": 1,
"status": 2,
"times_activated": 1,
"activations_limit": 5,
"is_expired": false,
"created_at": "2021-06-27 16:58:10",
"created_by": 1,
"updated_at": "2021-06-30 23:23:58",
"updated_by": 1,
"activations": [
{
"id": 4,
"token": "93d7bb4273a6e5...",
"license_id": 5,
"label": null,
"source": 2,
"ip_address": "192.168.20.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"meta_data": "a:0:{}",
"created_at": "2021-07-04 08:38:17",
"updated_at": "2021-07-09 16:52:51",
"deactivated_at": null
}
]
}
}
{
"code": "data_error",
"message": "License Key: Z09Z-D0DZ-9A29-3BCD could not be found.",
"data": {
"status": 404
}
}
Examples
Example
use IdeoLogix\DigitalLicenseManagerClient\Service;
$api = new Service( 'http://site.com', 'ck_XXXX', 'cs_XXXX' );
$response = $api->licenses()->find( 'DWA9-AAZZ-3199-Z312' );
print_r( $response->get_data() );
Response
Array
(
[id] => 33
[order_id] => 56
[product_id] => 12
[user_id] => 1
[license_key] => DWA9-AAZZ-3199-Z312
[expires_at] => 2022-07-25 09:38:12
[valid_for] => 365
[source] => 1
[status] => 2
[times_activated] => 5
[activations_limit] => 5
[is_expired] => 0
[created_at] => 2021-07-25 09:38:12
[updated_at] => 2021-07-25 09:38:12
[activations] => Array
(
[0] => Array
(
[id] => 11
[token] => fa587c7786608c8fef4684f2d5452578321a3635
[license_id] => 33
[label] => NULL
[source] => 2
[ip_address] => 127.0.0.1
[user_agent] => ''
[meta_data] => Array()
[created_at] => 2021-07-30 16:37:53
[updated_at] => 2021-08-22 17:27:35
[deactivated_at] => NULL
)
[1] => Array
(
[id] => 12
[token] => 7ebb5cc3be72451894ce1241165de263731ee87e
[license_id] => 33
[label] => NULL
[source] => 2
[ip_address] => 127.0.0.1
[user_agent] => ''
[meta_data] => Array()
[created_at] => 2021-07-30 16:39:09
[updated_at] => NULL
[deactivated_at] => NULL
)
)
)
For more details please click here.