Vai al contenuto principale
GET
/
entitlements
/
{id}
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

const entitlement = await client.entitlements.retrieve('ent_jt7jcvI79Xh8eehqgWdcm');

console.log(entitlement.id);
import os
from dodopayments import DodoPayments

client = DodoPayments(
    bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
)
entitlement = client.entitlements.retrieve(
    "ent_jt7jcvI79Xh8eehqgWdcm",
)
print(entitlement.id)
package main

import (
	"context"
	"fmt"

	"github.com/dodopayments/dodopayments-go"
	"github.com/dodopayments/dodopayments-go/option"
)

func main() {
	client := dodopayments.NewClient(
		option.WithBearerToken("My Bearer Token"),
	)
	entitlement, err := client.Entitlements.Get(context.TODO(), "ent_jt7jcvI79Xh8eehqgWdcm")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", entitlement.ID)
}
package com.dodopayments.api.example;

import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.entitlements.Entitlement;
import com.dodopayments.api.models.entitlements.EntitlementRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

        Entitlement entitlement = client.entitlements().retrieve("ent_jt7jcvI79Xh8eehqgWdcm");
    }
}
package com.dodopayments.api.example

import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.entitlements.Entitlement
import com.dodopayments.api.models.entitlements.EntitlementRetrieveParams

fun main() {
    val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

    val entitlement: Entitlement = client.entitlements().retrieve("ent_jt7jcvI79Xh8eehqgWdcm")
}
require "dodopayments"

dodo_payments = Dodopayments::Client.new(
  bearer_token: "My Bearer Token",
  environment: "test_mode" # defaults to "live_mode"
)

entitlement = dodo_payments.entitlements.retrieve("ent_jt7jcvI79Xh8eehqgWdcm")

puts(entitlement)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;

$client = new Client(
  bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
  environment: 'test_mode',
);

try {
  $entitlement = $client->entitlements->retrieve('ent_jt7jcvI79Xh8eehqgWdcm');

  var_dump($entitlement);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Entitlements;

DodoPaymentsClient client = new();

EntitlementRetrieveParams parameters = new()
{
    ID = "ent_jt7jcvI79Xh8eehqgWdcm"
};

var entitlement = await client.Entitlements.Retrieve(parameters);

Console.WriteLine(entitlement);
use dodopayments::Client;

#[tokio::main]
async fn main() -> dodopayments::Result<()> {
    let client = Client::from_env()?;
    let id = "id";
    let result = client
        .entitlements()
        .retrieve()
        .id(id)
        .await?;
    println!("{result:?}");
    Ok(())
}
curl --request GET \
  --url https://test.dodopayments.com/entitlements/{id} \
  --header 'Authorization: Bearer <token>'
{
  "business_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "integration_config": {
    "feature_id": "<string>",
    "feature_type": "boolean"
  },
  "is_active": true,
  "metadata": {},
  "name": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>"
}

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parametri del percorso

id
string
obbligatorio

Entitlement ID

Risposta

Detailed view of a single entitlement: identity, integration type, integration-specific configuration, and metadata.

business_id
string
obbligatorio

Identifier of the business that owns this entitlement.

created_at
string<date-time>
obbligatorio

Timestamp when the entitlement was created.

id
string
obbligatorio

Unique identifier of the entitlement.

integration_config
Feature Flag Config · object
obbligatorio

Integration-specific configuration. For digital_files entitlements this includes presigned download URLs for each attached file.

integration_type
enum<string>
obbligatorio

Platform integration this entitlement uses.

Opzioni disponibili:
discord,
telegram,
github,
figma,
framer,
notion,
digital_files,
license_key,
feature_flag
is_active
boolean
obbligatorio

Always true for entitlements returned by the public API; soft-deleted entitlements are not returned.

metadata
Metadata · object
obbligatorio

Arbitrary key-value metadata supplied at creation or via PATCH.

name
string
obbligatorio

Display name supplied at creation.

updated_at
string<date-time>
obbligatorio

Timestamp when the entitlement was last modified.

description
string | null

Optional description supplied at creation.

Ultima modifica il 13 maggio 2026