Get Entitlement
curl --request GET \
--url https://api.paygentic.io/v1/entitlements/{entitlementId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v1/entitlements/{entitlementId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v1/entitlements/{entitlementId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paygentic.io/v1/entitlements/{entitlementId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paygentic.io/v1/entitlements/{entitlementId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paygentic.io/v1/entitlements/{entitlementId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v1/entitlements/{entitlementId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "entitlement",
"id": "ent_a7b8c9d0e1f2g3h4",
"customerId": "cus_x1y2z3a4b5c6d7e8",
"featureId": "feat_p1q2r3s4t5u6v7w8",
"featureKey": "sso_enabled",
"featureType": "boolean",
"productId": "prod_m5n6o7p8q9r0s1t2",
"subscriptionId": "sub_m1n2o3p4q5r6s7t8",
"status": "active",
"hasAccess": true,
"activeFrom": "2024-01-01T00:00:00Z",
"activeTo": null,
"config": null,
"metadata": {}
}Entitlements
Get Entitlement
Retrieve a specific entitlement by ID. For metered entitlements, the response includes live balance, usage, and access status for the current billing period.
GET
/
v1
/
entitlements
/
{entitlementId}
Get Entitlement
curl --request GET \
--url https://api.paygentic.io/v1/entitlements/{entitlementId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v1/entitlements/{entitlementId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v1/entitlements/{entitlementId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paygentic.io/v1/entitlements/{entitlementId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paygentic.io/v1/entitlements/{entitlementId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paygentic.io/v1/entitlements/{entitlementId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v1/entitlements/{entitlementId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "entitlement",
"id": "ent_a7b8c9d0e1f2g3h4",
"customerId": "cus_x1y2z3a4b5c6d7e8",
"featureId": "feat_p1q2r3s4t5u6v7w8",
"featureKey": "sso_enabled",
"featureType": "boolean",
"productId": "prod_m5n6o7p8q9r0s1t2",
"subscriptionId": "sub_m1n2o3p4q5r6s7t8",
"status": "active",
"hasAccess": true,
"activeFrom": "2024-01-01T00:00:00Z",
"activeTo": null,
"config": null,
"metadata": {}
}Path Parameters
Query Parameters
Response
Successfully retrieved the entitlement.
- Option 1
- Option 2
- Option 3
A specific entitlement. The response shape varies by featureType.
Was this page helpful?