# Dictionaries

**Base URL:** `https://api.welkinhealth.com/{tenantName}/{instanceName}/dictionaries`

Dictionaries define reusable lookup lists (e.g., diagnosis codes, disposition values, referral sources) configured in Welkin Designer.

***

## Get All Dictionaries

**GET** `/dictionaries`

Returns all dictionaries defined for the instance.

### Query Parameters

| Parameter | Type    | Required | Description              |
| --------- | ------- | -------- | ------------------------ |
| `page`    | integer | No       | Page number (default: 0) |
| `size`    | integer | No       | Page size (default: 20)  |

### Example Request

```bash
curl -X GET "https://api.welkinhealth.com/acme/live/dictionaries" \
  -H "Authorization: Bearer {access_token}"
```

### Example Response

```json
[
  {
    "id": "dict_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "referral_source",
    "label": "Referral Source",
    "entries": [
      { "value": "physician", "label": "Physician Referral", "active": true, "sortOrder": 1 },
      { "value": "self", "label": "Self Referral", "active": true, "sortOrder": 2 }
    ]
  }
]
```

***

## Get Dictionary by Name

**GET** `/dictionaries/{dictionaryName}`

Returns a single dictionary and all its entries.

### Path Parameters

| Parameter        | Type   | Required | Description                                                   |
| ---------------- | ------ | -------- | ------------------------------------------------------------- |
| `dictionaryName` | string | Yes      | Programmatic name of the dictionary (e.g., `referral_source`) |

### Example Request

```bash
curl -X GET "https://api.welkinhealth.com/acme/live/dictionaries/referral_source" \
  -H "Authorization: Bearer {access_token}"
```

### Example Response

```json
{
  "id": "dict_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "referral_source",
  "label": "Referral Source",
  "entries": [
    { "value": "physician", "label": "Physician Referral", "active": true, "sortOrder": 1 },
    { "value": "self", "label": "Self Referral", "active": true, "sortOrder": 2 }
  ]
}
```

***

## Dictionary Entry Object

| Field       | Type    | Description                      |
| ----------- | ------- | -------------------------------- |
| `value`     | string  | Internal value stored in records |
| `label`     | string  | Human-readable display label     |
| `active`    | boolean | Whether entry is active          |
| `sortOrder` | integer | Display order                    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.welkinhealth.com/developer-and-integration-guide/api-reference/dictionaries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
