# ovok_sdk.resources.sharing

Canonical page: https://docs.ovok.com/python-sdk/reference/resources/sharing

The `ovok.sharing` namespace: patient record sharing.

## SharingInvitesResource [#sharinginvitesresource]

```python
SharingInvitesResource(http: HttpClient)
```

Share invitations a patient creates and a recipient redeems.

Access it as `ovok.sharing.invites`.

### create() [#create]

```python
create(body: JsonObject) -> Any
```

Create a share invitation.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `body` | `JsonObject` |  | The invitation as the route takes it. |

**Returns**

- `Any`: The created invitation.

### redeem() [#redeem]

```python
redeem(body: JsonObject) -> Any
```

Redeem a share invitation.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `body` | `JsonObject` |  | The redemption as the route takes it, usually the invite code. |

**Returns**

- `Any`: The API's response.

## SharingSettingsResource [#sharingsettingsresource]

```python
SharingSettingsResource(http: HttpClient)
```

The patient's sharing settings.

Access it as `ovok.sharing.settings`.

### retrieve() [#retrieve]

```python
retrieve() -> Any
```

Read the sharing settings.

**Returns**

- `Any`: The settings as the API returns them.

### update() [#update]

```python
update(settings: JsonObject) -> Any
```

Replace the sharing settings.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `settings` | `JsonObject` |  | The new settings. |

**Returns**

- `Any`: The updated settings.

## SharingSharesResource [#sharingsharesresource]

```python
SharingSharesResource(http: HttpClient)
```

Active shares of the patient's record.

Access it as `ovok.sharing.shares`.

### list() [#list]

```python
list() -> Any
```

List the active shares.

**Returns**

- `Any`: The shares grouped by kind; `practitioners`, `relatedPersons` and `received`
- `Any`: are always present, empty when there are none.

### revoke() [#revoke]

```python
revoke(consent_id: str) -> None
```

Revoke a share.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `consent_id` | `str` |  | The ID of the Consent behind the share. |

## SharingResource [#sharingresource]

```python
SharingResource(http: HttpClient)
```

Patient record sharing: invitations, shares and settings.

Created by `Ovok`; access it as `ovok.sharing`.
