---
title: Retrieve Invites
slug: docs/demo/retrieve-invites
description: Learn how to make a GET request to a specific API endpoint using curl command in this document. Find a code example that includes the required headers for sending and receiving JSON data. Get insights into using a placeholder for the account group token i
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "CsJ4g1v4ZYB6RQz8CygNj",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/groups/{accountGroupToken}/invites",
    "name": "Retrieve Invites",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountGroupToken",
          "type": "string",
          "description": "The account group token used to identify the account group."
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "emailAddress",
          "type": "string"
        },
        {
          "kind": "optional",
          "name": "status",
          "type": "string"
        },
        {
          "kind": "optional",
          "name": "sentAfterUTC",
          "type": "string"
        },
        {
          "kind": "optional",
          "name": "sentBeforeUTC",
          "type": "string"
        },
        {
          "kind": "optional",
          "name": "acceptedAfterUTC",
          "type": "string"
        },
        {
          "kind": "optional",
          "name": "acceptedBeforeUTC",
          "type": "string"
        },
        {
          "kind": "optional",
          "name": "rowsPerPage",
          "type": "integer"
        },
        {
          "kind": "optional",
          "name": "pageNumber",
          "type": "integer"
        }
      ],
      "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": "totalNumberOfRecords",
                "type": "integer<int32>",
                "example": 0,
                "description": "Total number of records in search"
              },
              {
                "kind": "optional",
                "name": "pageNumber",
                "type": "integer<int32>",
                "example": 0,
                "description": "Current page number of result"
              },
              {
                "kind": "optional",
                "name": "resultsPerPage",
                "type": "integer<int32>",
                "example": 0,
                "description": "Number of items per page"
              },
              {
                "kind": "optional",
                "name": "items",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "invitationReference",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "emailAddress",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "expiryDate",
                    "type": "string<date-time>",
                    "example": "2021-09-21T05:33:08.0570737"
                  },
                  {
                    "kind": "optional",
                    "name": "status",
                    "type": "string<PendingAcceptance | Accepted | Revoked | Expired>",
                    "example": ""
                  },
                  {
                    "kind": "optional",
                    "name": "subscriptionReferences",
                    "type": "array",
                    "example": [],
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": ""
                  },
                  {
                    "kind": "optional",
                    "name": "created",
                    "type": "string<date-time>",
                    "example": "2021-09-21T05:33:08.0570737"
                  },
                  {
                    "kind": "optional",
                    "name": "lastUpdated",
                    "type": "string<date-time>",
                    "example": "2021-09-21T05:33:08.0570737"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ValidAccountGroupInvitation",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ValidAccountGroupInvitation[]",
                "description": "Generic items"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.SearchData[FictiveGlobal.Api.Rest.Dtos.v1.ValidAccountGroupInvitation]",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.SearchData[FictiveGlobal.Api.Rest.Dtos.v1.ValidAccountGroupInvitation]",
            "isExpanded": true,
            "description": "Generic type for search result"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "Ok",
        "jsonExample": "{\n  \"totalNumberOfRecords\": 0,\n  \"pageNumber\": 0,\n  \"resultsPerPage\": 0,\n  \"items\": [\n    {\n      \"invitationReference\": \"IAFSRAKA6712KABC\",\n      \"emailAddress\": \"jamie.muir@FictiveGlobal.com\",\n      \"expiryDate\": \"2017-07-07T15:41:30\",\n      \"status\": \"PendingAcceptance\",\n      \"subscriptionReferences\": [\n        \"ASJDKAS6712KABCD\",\n        \"ASJDKAS6712KDDEQ\",\n        \"ASJDKAS6712KEWQQ\"\n      ],\n      \"created\": \"0001-01-01T00:00:00\",\n      \"lastUpdated\": \"0001-01-01T00:00:00\"\n    },\n    {\n      \"invitationReference\": \"IBBSRATA6R122ABC\",\n      \"emailAddress\": \"josh.fogg@FictiveGlobal.com\",\n      \"expiryDate\": \"2017-07-07T15:41:30\",\n      \"status\": \"PendingAcceptance\",\n      \"subscriptionReferences\": [\n        \"ASJDKAS6712KABCD\",\n        \"ASJDKAS6712KDDEQ\",\n        \"ASJDKAS6712KEWQQ\"\n      ],\n      \"created\": \"0001-01-01T00:00:00\",\n      \"lastUpdated\": \"0001-01-01T00:00:00\"\n    }\n  ]\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "Request is invalid.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "403",
        "description": "Unable to authenticate using the provided session.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Subscription not found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will enable you to retrieve a list of invites for a specific account group and their status.",
    "examples": {
      "languages": [
        {
          "id": "OS4eXvtJHr2voEw8aAJbq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/accounts/groups/{accountGroupToken}/invites \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "YtXFB_0fnjiznEWYYR5qx",
          "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/groups/{accountGroupToken}/invites\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "wBKmmDoxWPO0eocRr_ey1",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/groups/{accountGroupToken}/invites\")\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": "MfApX2z1Nbfua_8S79unx",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/groups/{accountGroupToken}/invites\"\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": "OS4eXvtJHr2voEw8aAJbq"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"totalNumberOfRecords\": 0,\n  \"pageNumber\": 0,\n  \"resultsPerPage\": 0,\n  \"items\": [\n    {\n      \"invitationReference\": \"IAFSRAKA6712KABC\",\n      \"emailAddress\": \"jamie.muir@FictiveGlobal.com\",\n      \"expiryDate\": \"2017-07-07T15:41:30\",\n      \"status\": \"PendingAcceptance\",\n      \"subscriptionReferences\": [\n        \"ASJDKAS6712KABCD\",\n        \"ASJDKAS6712KDDEQ\",\n        \"ASJDKAS6712KEWQQ\"\n      ],\n      \"created\": \"0001-01-01T00:00:00\",\n      \"lastUpdated\": \"0001-01-01T00:00:00\"\n    },\n    {\n      \"invitationReference\": \"IBBSRATA6R122ABC\",\n      \"emailAddress\": \"josh.fogg@FictiveGlobal.com\",\n      \"expiryDate\": \"2017-07-07T15:41:30\",\n      \"status\": \"PendingAcceptance\",\n      \"subscriptionReferences\": [\n        \"ASJDKAS6712KABCD\",\n        \"ASJDKAS6712KDDEQ\",\n        \"ASJDKAS6712KEWQQ\"\n      ],\n      \"created\": \"0001-01-01T00:00:00\",\n      \"lastUpdated\": \"0001-01-01T00:00:00\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Request is invalid.\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Unable to authenticate using the provided session.\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Subscription not found\n"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}