# ovok_sdk.resources.consent

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

The `ovok.consent` namespace: the signed-in user's legal and medical consent.

## LegalConsentResource [#legalconsentresource]

```python
LegalConsentResource(http: HttpClient)
```

The user's acceptance of the terms and conditions.

Access it as `ovok.consent.legal`.

### retrieve() [#retrieve]

```python
retrieve() -> dict[str, Any]
```

Read the user's legal consent.

**Returns**

- `dict[str, Any]`: The consent state as the API returns it.

### set() [#set]

```python
set(accepted: bool) -> dict[str, Any]
```

Accept or decline the terms and conditions.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `accepted` | `bool` |  | True to accept, False to decline. |

**Returns**

- `dict[str, Any]`: The updated consent state.

## MedicalConsentResource [#medicalconsentresource]

```python
MedicalConsentResource(http: HttpClient)
```

The user's consent to medical settings notifications.

Access it as `ovok.consent.medical`.

### retrieve() [#retrieve-1]

```python
retrieve() -> dict[str, Any]
```

Read the user's medical consent.

**Returns**

- `dict[str, Any]`: The consent state as the API returns it.

### set() [#set-1]

```python
set(accepted: bool) -> dict[str, Any]
```

Give or withdraw medical consent.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `accepted` | `bool` |  | True to give consent, False to withdraw it. |

**Returns**

- `dict[str, Any]`: The updated consent state.

## ConsentResource [#consentresource]

```python
ConsentResource(http: HttpClient)
```

Legal and medical consent, and consent signature requests.

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

### request_signature() [#request_signature]

```python
request_signature(consent_id: str) -> dict[str, Any]
```

Ask for a FHIR Consent to be signed.

**Parameters**

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

**Returns**

- `dict[str, Any]`: The API's response to the signature request.
