# Get a patient's plan

Canonical page: https://docs.ovok.com/api/patient-billing/get-a-patient-s-plan

`GET /v1/patient-billing/patients/{patientId}/plan`

Gets the app plan the patient pays for, as your server last set it: a self-pay FHIR `Coverage` with the plan as its `plan` class.

**Scope:** the caller's project, with `PATIENT_BILLING_ENABLED` on.

## Behaviour

- Your access policy must grant `patient_billing_invoices` `read` and let you read the patient, else **403** `PATIENT_BILLING_NOT_ALLOWED` or **404** `PATIENT_BILLING_PATIENT_NOT_FOUND`.
- `status` is `active` while the plan runs and `cancelled` once it ended.
- A patient who never had a plan answers **404** `PLAN_NOT_FOUND`.

## Example

```bash
curl 'https://api.sandbox.ovok.com/v1/patient-billing/patients/<patientId>/plan' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
