# town.delve.ageassurance.getState

> Published by [delve.town](https://lexicon.garden/identity/did:plc:qzqct2rrq4u2gmy5g3mjxske)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.ageassurance.getState)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.ageassurance.getState/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.ageassurance.getState/examples)

## Definitions

### `town.delve.ageassurance.getState`

**Type**: `query`

Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `countryCode` | `string` | Yes |  |
| `regionCode` | `string` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `metadata` | `ref` → `town.delve.ageassurance.defs#stateMetadata` | Yes |  |
| `state` | `ref` → `town.delve.ageassurance.defs#state` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "metadata": {
              "ref": "town.delve.ageassurance.defs#stateMetadata",
              "type": "ref"
            },
            "state": {
              "ref": "town.delve.ageassurance.defs#state",
              "type": "ref"
            }
          },
          "required": [
            "state",
            "metadata"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "countryCode": {
            "type": "string"
          },
          "regionCode": {
            "type": "string"
          }
        },
        "required": [
          "countryCode"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "town.delve.ageassurance.getState",
  "lexicon": 1
}
```
