# Invoices

The Invoices API provides read-only access to invoice records. Invoices can be retrieved individually, by patient, or by encounter.

> **Access requirement:** Your API client Security Policy must include invoice read permissions. See [Authentication](/developer-and-integration-guide/getting-started/authentication.md) for details on setting up API clients.
>
> **Base path:** `/{tenantName}/{instanceName}/invoices`
>
> ***
>
> ### Endpoints
>
> #### GET Get Invoices
>
> **GET** `/{tenantName}/{instanceName}/invoices`
>
> Returns a paginated list of all invoice records in the instance.
>
> **Query Parameters**

| Parameter   | Type    | Default | Description                                            |
| ----------- | ------- | ------- | ------------------------------------------------------ |
| `page`      | integer | `0`     | Page number                                            |
| `size`      | integer | `20`    | Results per page                                       |
| `status`    | string  | —       | Filter by invoice status (`PENDING`, `PAID`, `VOIDED`) |
| `startDate` | string  | —       | Filter invoices created on or after (ISO 8601)         |
| `endDate`   | string  | —       | Filter invoices created on or before (ISO 8601)        |

> **Example Request**
>
> ```http
> GET /acme-health/live/invoices?status=PENDING&page=0&size=20
> Authorization: Bearer <token>
> ```
>
> **Example Response `200 OK`**
>
> ```json
> {
>   "data": [
>     {
>       "id": "inv-uuid",
>       "patientId": "a1b2c3d4",
>       "encounterId": "enc-uuid",
>       "amount": 150.00,
>       "currency": "USD",
>       "status": "PENDING",
>       "dueDate": "2026-04-01",
>       "createdAt": "2026-03-15T10:00:00Z"
>     }
>   ],
>   "metaInfo": { "page": 0, "pageSize": 20, "totalElements": 45 }
> }
> ```
>
> ***
>
> #### GET Get Invoice by ID
>
> **GET** `/{tenantName}/{instanceName}/invoices/{invoiceId}`
>
> Returns a single invoice record with full details including line items.
>
> **Path Parameters**

| Parameter   | Type   | Required | Description  |
| ----------- | ------ | -------- | ------------ |
| `invoiceId` | string | Yes      | Invoice UUID |

> ***
>
> #### GET Get Invoices by Patient ID
>
> **GET** `/{tenantName}/{instanceName}/patients/{patientId}/invoices`
>
> Returns all invoices associated with a specific patient.
>
> **Path Parameters**

| Parameter   | Type   | Required | Description         |
| ----------- | ------ | -------- | ------------------- |
| `patientId` | string | Yes      | Welkin patient UUID |

> ***
>
> #### GET Get Invoices by Encounter ID
>
> **GET** `/{tenantName}/{instanceName}/encounters/{encounterId}/invoices`
>
> Returns all invoices associated with a specific encounter.
>
> **Path Parameters**

| Parameter                                                                           | Type   | Required | Description    |
| ----------------------------------------------------------------------------------- | ------ | -------- | -------------- |
| `encounterId`                                                                       | string | Yes      | Encounter UUID |
| description: Retrieve patient invoice records by patient, encounter, or invoice ID. |        |          |                |

> ***
>
> ## Invoices
>
> The Invoices API provides read-only access to invoice records. Invoices can be retrieved individually, by patient, or by encounter.
>
> > **Access requirement:** Your API client Security Policy must include invoice read permissions. See [Authentication](/developer-and-integration-guide/getting-started/authentication.md) for details on setting up API clients.
> >
> > **Base path:** `/{tenantName}/{instanceName}/invoices`
> >
> > ***
> >
> > ### Endpoints
> >
> > #### GET Get Invoices
> >
> > **GET** `/{tenantName}/{instanceName}/invoices`
> >
> > Returns a paginated list of all invoice records in the instance.
> >
> > **Query Parameters**

| Parameter   | Type    | Default | Description                                            |
| ----------- | ------- | ------- | ------------------------------------------------------ |
| `page`      | integer | `0`     | Page number                                            |
| `size`      | integer | `20`    | Results per page                                       |
| `status`    | string  | —       | Filter by invoice status (`PENDING`, `PAID`, `VOIDED`) |
| `startDate` | string  | —       | Filter invoices created on or after (ISO 8601)         |
| `endDate`   | string  | —       | Filter invoices created on or before (ISO 8601)        |

> > **Example Request**
> >
> > ```http
> > GET /acme-health/live/invoices?status=PENDING&page=0&size=20
> > Authorization: Bearer <token>
> > ```
> >
> > **Example Response `200 OK`**
> >
> > ```json
> > {
> >   "data": [
> >     {
> >       "id": "inv-uuid",
> >       "patientId": "a1b2c3d4",
> >       "encounterId": "
> > ```


---

# 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/invoices.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.
