> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dodopayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# अधिकार प्राप्त करें

> एकल अधिकार को इसके हल किए गए इंटीग्रेशन कॉन्फ़िगरेशन के साथ पुनः प्राप्त करें। डिजिटल फ़ाइलों के अधिकारों के लिए, फ़ाइल मेटाडाटा और प्रीसाइन किए गए डाउनलोड URL प्रतिक्रिया में भरे जाते हैं।



## OpenAPI

````yaml get /entitlements/{id}
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.105.23
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /entitlements/{id}:
    get:
      tags:
        - Entitlements
      summary: GET /entitlements/{id}
      operationId: get_entitlement_public_handler
      parameters:
        - name: id
          in: path
          description: Entitlement ID
          required: true
          schema:
            type: string
          example: ent_jt7jcvI79Xh8eehqgWdcm
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntitlementResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '500':
          description: Something went wrong
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            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);
        - lang: Python
          source: |-
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\tentitlement, err := client.Entitlements.Get(context.TODO(), \"ent_jt7jcvI79Xh8eehqgWdcm\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", entitlement.ID)\n}\n"
        - lang: Java
          source: >-
            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");
                }
            }
        - lang: Kotlin
          source: >-
            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")
            }
        - lang: Ruby
          source: >-
            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)
        - lang: PHP
          source: |-
            <?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();
            }
        - lang: C#
          source: |-
            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);
        - lang: Rust
          source: |-
            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(())
            }
components:
  schemas:
    EntitlementResponse:
      type: object
      description: |-
        Detailed view of a single entitlement: identity, integration type,
        integration-specific configuration, and metadata.
      required:
        - id
        - business_id
        - integration_type
        - name
        - integration_config
        - is_active
        - metadata
        - created_at
        - updated_at
      properties:
        business_id:
          type: string
          description: Identifier of the business that owns this entitlement.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the entitlement was created.
        description:
          type:
            - string
            - 'null'
          description: Optional description supplied at creation.
        id:
          type: string
          description: Unique identifier of the entitlement.
        integration_config:
          $ref: '#/components/schemas/IntegrationConfigResponse'
          description: |-
            Integration-specific configuration. For `digital_files` entitlements
            this includes presigned download URLs for each attached file.
        integration_type:
          $ref: '#/components/schemas/EntitlementIntegrationType'
          description: Platform integration this entitlement uses.
        is_active:
          type: boolean
          description: |-
            Always `true` for entitlements returned by the public API;
            soft-deleted entitlements are not returned.
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: Arbitrary key-value metadata supplied at creation or via PATCH.
        name:
          type: string
          description: Display name supplied at creation.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the entitlement was last modified.
    IntegrationConfigResponse:
      oneOf:
        - type: object
          title: Feature Flag Config
          required:
            - feature_type
            - feature_id
          properties:
            feature_id:
              type: string
              description: >-
                Merchant-chosen identifier for the capability this entitlement
                unlocks.
            feature_type:
              $ref: '#/components/schemas/FeatureType'
              description: Type of capability conferred. Only `boolean` is supported today.
        - type: object
          title: Github Config
          required:
            - target_id
            - permission
          properties:
            permission:
              $ref: '#/components/schemas/GithubPermission'
              description: Permission to grant on the repository.
            target_id:
              type: string
              description: Repository or organisation slug to grant access to.
        - type: object
          title: Discord Config
          required:
            - guild_id
          properties:
            guild_id:
              type: string
              description: Discord guild (server) ID.
            role_id:
              type:
                - string
                - 'null'
              description: Optional Discord role to assign within the guild.
        - type: object
          title: Telegram Config
          required:
            - chat_id
          properties:
            chat_id:
              type: string
              description: >-
                Telegram chat ID. For groups this is typically a negative
                integer.
        - type: object
          title: Figma Config
          required:
            - figma_file_id
          properties:
            figma_file_id:
              type: string
              description: Figma file identifier to grant access to.
        - type: object
          title: Framer Config
          required:
            - framer_template_id
          properties:
            framer_template_id:
              type: string
              description: Framer template identifier to grant access to.
        - type: object
          title: Notion Config
          required:
            - notion_template_id
          properties:
            notion_template_id:
              type: string
              description: Notion template identifier to grant access to.
        - type: object
          title: Digital Files Config
          required:
            - digital_files
          properties:
            digital_files:
              $ref: '#/components/schemas/ResolvedDigitalFiles'
              description: |-
                Populated digital-files payload with each file's metadata and a
                short-lived presigned download URL.
        - type: object
          title: License Key Config
          properties:
            activation_message:
              type:
                - string
                - 'null'
              description: |-
                Optional message displayed when a customer activates the license
                key (≤ 2500 characters).
            activations_limit:
              type:
                - integer
                - 'null'
              format: int32
              description: >-
                Maximum activations allowed per issued license key. Omit for
                unlimited.
            duration_count:
              type:
                - integer
                - 'null'
              format: int32
              description: |-
                Validity duration of issued license keys. Provide both
                `duration_count` and `duration_interval` together for a fixed
                duration; omit both for non-expiring keys.
            duration_interval:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/TimeInterval'
                  description: Unit of `duration_count`.
            fulfillment_mode:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/FulfillmentMode'
                  description: >-
                    How license keys are fulfilled. `auto` (default) generates
                    and delivers

                    keys to customers automatically; `manual` creates pending
                    grants that you

                    fulfill with the supplied key via `POST
                    /grants/{grant_id}/license-key`.
      description: |-
        Integration-specific configuration on an entitlement read response.

        For `digital_files` entitlements the response includes presigned
        download URLs for each attached file; other integrations match the
        shape supplied at creation.
    EntitlementIntegrationType:
      type: string
      enum:
        - discord
        - telegram
        - github
        - figma
        - framer
        - notion
        - digital_files
        - license_key
        - feature_flag
    Metadata:
      type: object
      title: Metadata
      description: >-
        Arbitrary key-value metadata. Values can be string, integer, number, or
        boolean.
      additionalProperties:
        oneOf:
          - type: string
            title: String
          - type: integer
            title: Integer
            format: int64
          - type: number
            title: Number
            format: double
          - type: boolean
            title: Boolean
        title: Metadata Value
        description: Metadata value can be a string, integer, number, or boolean
    FeatureType:
      type: string
      description: Type of capability a `feature_flag` entitlement confers.
      enum:
        - boolean
      x-stainless-const: true
    GithubPermission:
      type: string
      description: Repository permission to grant on a `github` entitlement.
      enum:
        - pull
        - push
        - admin
        - maintain
        - triage
    ResolvedDigitalFiles:
      type: object
      description: |-
        Populated digital-files payload on entitlement read responses. Each file
        carries a short-lived presigned download URL.
      required:
        - files
      properties:
        external_url:
          type:
            - string
            - 'null'
          description: |-
            Optional external URL, passed through from the entitlement
            configuration.
        files:
          type: array
          items:
            $ref: '#/components/schemas/ResolvedDigitalFile'
          description: One entry per attached file.
        instructions:
          type:
            - string
            - 'null'
          description: |-
            Optional human-readable delivery instructions, passed through from
            the entitlement configuration.
    TimeInterval:
      type: string
      description: Unit of a duration count (e.g. license-key validity period).
      enum:
        - Day
        - Week
        - Month
        - Year
    FulfillmentMode:
      type: string
      description: How license keys for this entitlement are fulfilled.
      enum:
        - auto
        - manual
    ResolvedDigitalFile:
      type: object
      description: One file in a resolved digital-files payload.
      required:
        - file_id
        - download_url
        - filename
        - expires_in
      properties:
        content_type:
          type:
            - string
            - 'null'
          description: Optional content-type declared at upload.
        download_url:
          type: string
          description: Short-lived presigned URL for downloading the file.
        expires_in:
          type: integer
          format: int64
          description: Seconds until `download_url` expires.
        file_id:
          type: string
          description: Identifier of the attached file.
        file_size:
          type:
            - integer
            - 'null'
          format: int64
          description: Optional size of the file in bytes.
        filename:
          type: string
          description: Original filename of the attached file.
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````