# ovok_sdk.resources.registration

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

Sign-up requests for `ovok.auth.register` and `ovok.auth.register_practitioner`.

## Registration [#registration]

```python
Registration(email: str, password: str, password_confirm: str, name: str, surname: str)
```

A practitioner sign-up; the tenant comes from the client's config, as it does for login.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `email` | `str` |  | The account's email address. |
| `password` | `str` |  | The account's password. |
| `password_confirm` | `str` |  | The password again; checked locally and never sent. |
| `name` | `str` |  | The given name. |
| `surname` | `str` |  | The family name. |

### body_for() [#body_for]

```python
body_for(tenant_code: str) -> dict[str, Any]
```

Build the request body for a tenant; the confirmation is checked here and never sent.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `tenant_code` | `str` |  | The tenant the account is registered in. |

**Returns**

- `dict[str, Any]`: The JSON body the register route takes.

**Raises**

- `OvokValidationError`: The password and its confirmation differ.

## PatientRegistration [#patientregistration]

```python
PatientRegistration(
    email: str,
    password: str,
    password_confirm: str,
    name: str,
    surname: str,
    continue_as_patient_token: str | None = None,
)
```

Bases: `Registration`

A patient sign-up.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `continue_as_patient_token` | `str \| None` | `None` | Optional token that turns an existing account into a patient. |

### body_for() [#body_for-1]

```python
body_for(tenant_code: str) -> dict[str, Any]
```

Build the request body for a tenant, with the continuation token when set.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `tenant_code` | `str` |  | The tenant the account is registered in. |

**Returns**

- `dict[str, Any]`: The JSON body the register route takes.

**Raises**

- `OvokValidationError`: The password and its confirmation differ.

## ClinicianInvite [#clinicianinvite]

```python
ClinicianInvite(status: Literal['clinician-invite'] = 'clinician-invite')
```

The project routed the email to a clinician invitation, so no one is signed in.

## is_clinician_invite() [#is_clinician_invite]

```python
is_clinician_invite(response: Mapping[str, Any]) -> bool
```

Tell whether a register response routed the email to a clinician invitation.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `response` | `Mapping[str, Any]` |  | The register route's JSON response. |

**Returns**

- `bool`: True when the next step is a clinician invitation.
