# health.hats.listRequests

> The requests waiting on the caller: access asked for their own spaces that policy leaves to them. Authenticated as the patient (service auth), so each patient sees only their own.

- Kind: query
- Authority: hats.health
- Lexicon: 1
- Published by [hats.health](https://lexicon.garden/identity/did:plc:uvvhtareovj2oaregs7vsibv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uvvhtareovj2oaregs7vsibv/health.hats.listRequests)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uvvhtareovj2oaregs7vsibv/health.hats.listRequests/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uvvhtareovj2oaregs7vsibv/health.hats.listRequests/analytics)

## Query (`health.hats.listRequests`)

Type: query · GET

### Output (application/json)

- `requests` (array, required)
  - `items` (ref)
    - Reference: `#request`

## #request (`health.hats.listRequests#request`)

Type: object

One request, as the coordinator recorded it.

### Properties

- `createdAt` (string · datetime, required)
- `id` (string, required): Identifier to answer this request by in answerRequest.
- `picks` (array, required): The option ids asked for, from the requester's menu.
  - `items` (string)
- `reason` (ref, required)
  - Reference: `health.hats.requestAccess#reason`
- `requester` (ref, required)
  - Reference: `#requester`

## #requester (`health.hats.listRequests#requester`)

Type: object

Who asked, from the coordinator's provider registry.

### Properties

- `did` (string · did, required)
- `institution` (string): The institution the requester acts for, as the registry names it.
- `role` (string): NUCC Health Care Provider Taxonomy code.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The requests waiting on the caller: access asked for their own spaces that policy leaves to them. Authenticated as the patient (service auth), so each patient sees only their own.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "requests": {
              "items": {
                "ref": "#request",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "requests"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "request": {
      "description": "One request, as the coordinator recorded it.",
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "id": {
          "description": "Identifier to answer this request by in answerRequest.",
          "type": "string"
        },
        "picks": {
          "description": "The option ids asked for, from the requester's menu.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "reason": {
          "ref": "health.hats.requestAccess#reason",
          "type": "ref"
        },
        "requester": {
          "ref": "#requester",
          "type": "ref"
        }
      },
      "required": [
        "id",
        "requester",
        "reason",
        "picks",
        "createdAt"
      ],
      "type": "object"
    },
    "requester": {
      "description": "Who asked, from the coordinator's provider registry.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "institution": {
          "description": "The institution the requester acts for, as the registry names it.",
          "type": "string"
        },
        "role": {
          "description": "NUCC Health Care Provider Taxonomy code.",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    }
  },
  "id": "health.hats.listRequests",
  "lexicon": 1
}
```
