# ovok_sdk.resources.invites

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

The `ovok.invites` namespace: create and accept invitations.

## InviteFlowResource [#inviteflowresource]

```python
InviteFlowResource(http: HttpClient, path: str)
```

Creates and accepts one kind of invitation.

Access it as `ovok.invites.<flow>`, such as `ovok.invites.care`.

### create() [#create]

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

Create an invitation.

**Parameters**

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

**Returns**

- `Any`: The created invitation.

### accept() [#accept]

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

Accept an invitation.

**Parameters**

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

**Returns**

- `Any`: The API's response.

## InvitesResource [#invitesresource]

```python
InvitesResource(http: HttpClient, session: UserSession | None = None)
```

Invitation flows: record shares, care, practitioners and patients.

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

### accept() [#accept-1]

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

Accept an invitation through the flow that fits the signed-in profile.

A Practitioner accepts a record share; a Patient accepts a care invitation.

**Parameters**

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

**Returns**

- `Any`: The API's response.

**Raises**

- `OvokConfigError`: No Patient or Practitioner is signed in.
