# List shares

Canonical page: https://docs.ovok.com/api/patient-sharing/list-shares

`GET /v1/patient-sharing/shares`

Lists the signed-in patient's active shares in both directions, the practitioners their whole record is shared with, and the related persons they share codes with. For a signed-in related person (a carer), lists the shares patients gave them.

**Auth:** bearer token of a Patient or a RelatedPerson.
**Scope:** the caller's project (from the token).

## Behaviour

- `outgoing`: the caller's active patient-to-patient shares (Consents where the caller is the sharer), including the `includeMedications` choice.
- `incoming`: what is shared with the caller, read from the grants on the caller's own membership, since those decide what the caller can see. Each share includes its `includeMedications` choice. A grant whose Consent cannot be read is still listed, so it can be ended.
- `practitioners`: the caller's active record shares with practitioners.
- `relatedPersons`: the caller's active shares with related persons (carers), each with its `codes` and `includeMedications` choice.
- `received`: for a related person, the active shares patients gave them: the sharing patient (`sharer`), the shared `codes`, `includeMedications` and `startedAt`. Only their own: another carer's shares never show. Empty for a patient.
- A related person gets only `received`; the other lists are empty.
- Names are the display names of the Patient, Practitioner and RelatedPerson profiles in the project.
- A practitioner gets 403.
- Each Consent search returns at most 100 entries; there is no paging.
- Pending invites (drafts) are not listed.

## Example

```bash
curl -X GET 'https://api.sandbox.ovok.com/v1/patient-sharing/shares' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
