# Document Types

**Base URL:** `https://api.welkinhealth.com/{tenantName}/{instanceName}/document-types`

Document Types define categories for patient documents configured in Welkin Designer.

***

## Get All Document Types

**GET** `/document-types`

Returns all document type definitions for the instance.

### Example Request

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

### Example Response

```json
[
  {
    "id": "doctype_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "lab_results",
    "label": "Lab Results",
    "description": "Laboratory test result documents",
    "allowedExtensions": ["pdf", "jpg", "png"],
    "requiresExpiration": false,
    "active": true
  },
  {
    "id": "doctype_b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "insurance_card",
    "label": "Insurance Card",
    "description": "Patient insurance card copies",
    "allowedExtensions": ["pdf", "jpg", "png"],
    "requiresExpiration": true,
    "active": true
  }
]
```

***

## Get Document Type by Name

**GET** `/document-types/{documentTypeName}`

Returns a single document type definition.

### Path Parameters

| Parameter          | Type   | Required | Description                            |
| ------------------ | ------ | -------- | -------------------------------------- |
| `documentTypeName` | string | Yes      | Programmatic name of the document type |

### Example Request

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

### Example Response

```json
{
  "id": "doctype_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "lab_results",
  "label": "Lab Results",
  "description": "Laboratory test result documents",
  "allowedExtensions": ["pdf", "jpg", "png"],
  "requiresExpiration": false,
  "active": true
}
```


---

# 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/document-types.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.
