---
title: Retrieve Entitlements
slug: docs/demo/retrieve-entitlements
description: Learn how to make a successful GET request to an API endpoint with this comprehensive document. Includes a code example using the curl command and covers essential headers for accepting and sending data in JSON format. Master the art of retrieving data ef
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "9I4fKfm_7vZJkknWVG086",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements",
    "name": "Retrieve Entitlements",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": ""
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "createDateMin",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "createDateMax",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "startDateMin",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "startDateMax",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "endDateMin",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "endDateMax",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "entitlementIdentifier",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "rowsPerPage",
          "type": "integer",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "currentPage",
          "type": "integer",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "exactMatch",
          "type": "boolean",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "displayInactive",
          "type": "boolean",
          "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": "array",
            "schema": [
              {
                "kind": "optional",
                "name": "name",
                "type": "string",
                "example": "",
                "description": "The name of the entitlement"
              },
              {
                "kind": "optional",
                "name": "identifier",
                "type": "string",
                "example": "",
                "description": "The identifier of the entitlement"
              },
              {
                "kind": "optional",
                "name": "startDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:17.604131",
                "description": "The creation date"
              },
              {
                "kind": "optional",
                "name": "endDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:17.604131",
                "description": "The expire date"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.ApplicationLayer.Entities.Entitlement",
            "customType": "FictiveGlobal.Api.Rest.ApplicationLayer.Entities.Entitlement[]",
            "isExpanded": true,
            "description": "Entitlement details"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": ""
      },
      {
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "schema": [
              {
                "kind": "optional",
                "name": "name",
                "type": "string",
                "example": "",
                "description": "The name of the entitlement"
              },
              {
                "kind": "optional",
                "name": "identifier",
                "type": "string",
                "example": "",
                "description": "The identifier of the entitlement"
              },
              {
                "kind": "optional",
                "name": "startDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:17.604131",
                "description": "The creation date"
              },
              {
                "kind": "optional",
                "name": "endDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:17.604131",
                "description": "The expire date"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.ApplicationLayer.Entities.Entitlement",
            "customType": "FictiveGlobal.Api.Rest.ApplicationLayer.Entities.Entitlement[]",
            "isExpanded": true,
            "description": "Entitlement details"
          }
        ],
        "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 search for a set of entitlements against the account based on creation date, end date, entitlement Identifier, etc.\r\n            <br /><br />The following custom headers will be returned in the response of the API\r\n            <br />X-totalNumberOfRecords\r\n            <br />X-pageNumber\r\n            <br />X-resultsPerPage",
    "examples": {
      "languages": [
        {
          "id": "za1W74VVxjBTx3zybgCLt",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "oSUrTqT6FO2szp7HZeESs",
          "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\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "JxeQthkzxm3r3-whJFX0c",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements\")\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": "axT-topxJwS0tqlU3i33r",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/entitlements\"\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": "za1W74VVxjBTx3zybgCLt"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"name\": \"\",\n    \"identifier\": \"\",\n    \"startDate\": \"2021-09-21T05:33:17.604131\",\n    \"endDate\": \"2021-09-21T05:33:17.604131\"\n  }\n]"
        },
        {
          "id": "response-1-204",
          "language": "204",
          "code": "// No entitlements found\n[\n  {\n    \"name\": \"\",\n    \"identifier\": \"\",\n    \"startDate\": \"2021-09-21T05:33:17.604131\",\n    \"endDate\": \"2021-09-21T05:33:17.604131\"\n  }\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": ""
    }
  ]
}