---
title: Validate access for an entitlement
slug: docs/demo/validate-access-for-an-entitlement
description: Learn how to make a successful GET request to a specific URL using the versatile "curl" command. This document includes a code example and covers the essential headers needed for a seamless request experience. Boost your programming skills and enhance you
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "w7_M8Wr37gqF9sgBlCQui",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements/{entitlementIdentifier}",
    "name": "Validate access for an entitlement",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": ""
        },
        {
          "kind": "required",
          "name": "entitlementIdentifier",
          "type": "string",
          "description": ""
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "incrementUsage",
          "type": "boolean",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "deviceIdentifier",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "deviceLimitExceeded",
                "type": "boolean",
                "example": "",
                "description": "Entitlement concurrency limit reached"
              },
              {
                "kind": "optional",
                "name": "entitlementAvailable",
                "type": "boolean",
                "example": "",
                "description": "Has entitlement"
              },
              {
                "kind": "optional",
                "name": "remainingTime",
                "type": "number<double>",
                "example": "",
                "description": "Time remaining"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.EntitlementSummary",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.EntitlementSummary",
            "isExpanded": true,
            "description": "The summary data for an entitlement"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": ""
      },
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "deviceLimitExceeded",
                "type": "boolean",
                "example": "",
                "description": "Entitlement concurrency limit reached"
              },
              {
                "kind": "optional",
                "name": "entitlementAvailable",
                "type": "boolean",
                "example": "",
                "description": "Has entitlement"
              },
              {
                "kind": "optional",
                "name": "remainingTime",
                "type": "number<double>",
                "example": "",
                "description": "Time remaining"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.EntitlementSummary",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.EntitlementSummary",
            "isExpanded": true,
            "description": "The summary data for an entitlement"
          }
        ],
        "isExpanded": true,
        "statusCode": "204",
        "description": "No entitlements found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "Unable to authenticate using the provided session",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Account could not be found: Account cannot be found. Invalid UKI and PIN or Password.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to check whether an account is applicable to consume the content requested on the device requested on",
    "examples": {
      "languages": [
        {
          "id": "FMaCXmpUkBaQB6oa3_NIX",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements/{entitlementIdentifier} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "lyWC8Fil0j39a-7SfFQAY",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements/{entitlementIdentifier}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "r0amZtE1YP_lVdZ6Zzlxb",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements/{entitlementIdentifier}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "hsAbvyCFtocJ6khpgfPDJ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements/{entitlementIdentifier}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "FMaCXmpUkBaQB6oa3_NIX"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"deviceLimitExceeded\": false,\n  \"entitlementAvailable\": false,\n  \"remainingTime\": \"\"\n}"
        },
        {
          "id": "response-1-204",
          "language": "204",
          "code": "// No entitlements found\n{\n  \"deviceLimitExceeded\": false,\n  \"entitlementAvailable\": false,\n  \"remainingTime\": \"\"\n}"
        },
        {
          "id": "response-2-400",
          "language": "400",
          "code": "// Unable to authenticate using the provided session\n"
        },
        {
          "id": "response-3-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Account could not be found: Account cannot be found. Invalid UKI and PIN or Password.\n"
        },
        {
          "id": "response-5-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}