# PatientView API

> PatientView API on Apizie: 15 endpoints (Log In, Log Out, Get Basic User Information, Get Basic Patient Information, …) returned as clean JSON through one API key. 15 endpoints are live now. Call it over REST at https://zieapi.vercel.app/v1/open-data:patientview/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `open-data:patientview`
- Category: Open Data
- Status: live
- Source: https://patientview.org
- Page: https://zieapi.vercel.app/api/open-data/patientview
- OpenAPI: https://zieapi.vercel.app/api/open-data/patientview/openapi.json

The recommended REST API endpoints to be used when integrating with PatientView

## Endpoints

### Log In
`POST https://zieapi.vercel.app/v1/open-data:patientview/log-in`

| Parameter | Type | Required | Description |
|---|---|---|---|
| body | object | no | JSON request body |

### Log Out
`POST https://zieapi.vercel.app/v1/open-data:patientview/log-out`

| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | yes | token |

### Get Basic User Information
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-basic-user-information`

| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | yes | token |

### Get Basic Patient Information
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-basic-patient-details`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |

### getPatientManagementDiagnoses
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-patient-management-diagnoses`

### getPatientManagementLookupTypes
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-patient-management-lookup-types`

### validatePatientManagement
`POST https://zieapi.vercel.app/v1/open-data:patientview/validate-patient-management`

| Parameter | Type | Required | Description |
|---|---|---|---|
| body | object | no | JSON request body |

### getPatientManagement
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-patient-management`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |
| groupId | integer | yes | groupId |
| identifierId | integer | yes | identifierId |

### savePatientManagement
`POST https://zieapi.vercel.app/v1/open-data:patientview/save-patient-management`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |
| groupId | integer | yes | groupId |
| identifierId | integer | yes | identifierId |
| body | object | no | JSON request body |

### savePatientManagementSurgeries
`POST https://zieapi.vercel.app/v1/open-data:patientview/save-patient-management-surgeries`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |
| groupId | integer | yes | groupId |
| identifierId | integer | yes | identifierId |
| body | object | no | JSON request body |

### Get Available Observations Types For a User
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-available-observation-headings`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |

### Get Observations of Multiple Types For a User
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-observations-by-codes`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |
| code | array | yes | code |
| limit | integer | yes | limit |
| offset | integer | yes | offset |
| orderDirection | string | yes | orderDirection |

### Get Observations of a Certain Type For a User
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-observations-by-code`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |
| code | string | yes | code |

### Get patient entered Observations of a Certain Type For a User
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-patient-entered-observations-by-code`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |
| code | string | yes | code |

### Get Available Patient Entered Observations Types For a User
`GET https://zieapi.vercel.app/v1/open-data:patientview/get-patient-entered-observation-headings`

| Parameter | Type | Required | Description |
|---|---|---|---|
| userId | integer | yes | userId |

## Example
```
curl "https://zieapi.vercel.app/v1/open-data:patientview/log-in" \
  -H "x-api-key: $APIZIE_KEY"
```

## FAQ

### How do I call the PatientView API?
Create a free Apizie key, then send POST https://zieapi.vercel.app/v1/open-data:patientview/log-in with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the PatientView API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card.

### Can AI agents use the PatientView API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key open-data:patientview.

### What is the status of the PatientView API?
Live: works with just an Apizie key
