> For the complete documentation index, see [llms.txt](https://dentalwhale.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dentalwhale.gitbook.io/documentation/orca-api/education-breakaway.md).

# Education/Breakaway

Breakaway Endpoints

## Register new user and payment method

<mark style="color:green;">`POST`</mark> `{{HOST}}api/loneUserRegistration`

This endpoint allows you to create a new user and enrolled in a course.

#### Request Body

| Name        | Type   | Description          |
| ----------- | ------ | -------------------- |
| token       | string | Stripe token         |
| mobile      | string | User phone number    |
| plan        | number | Type of payment plan |
| email       | string | User email address   |
| last\_name  | string | User last name       |
| first\_name | string | User first name      |

{% tabs %}
{% tab title="200 User  successfully added." %}

```
{ 
 "data" => '',
 "message" => '',
 "errorCode" => NULL,
 "errors" => []
 }
```

{% endtab %}

{% tab title="400 The user is already enrolled in this course" %}

```
{ 
 "data" => '',
 "message" => 'This user is already enrolled in this course',
 "errorCode" => NULL,
 "errors" => []
 }
```

{% endtab %}
{% endtabs %}

## Enroll user existing users

<mark style="color:green;">`POST`</mark> `{{HOST}}api/enrollUser`

This endpoint allows you to enroll a user into an existing course

#### Request Body

| Name     | Type   | Description             |
| -------- | ------ | ----------------------- |
| plan     | number | Type of enrollment plan |
| token    | string | Stripe token            |
| username | string | Username                |

{% tabs %}
{% tab title="200 " %}

```
{ 
 "data" => '',
 "message" => '',
 "errorCode" => NULL,
 "errors" => []
 }
```

{% endtab %}

{% tab title="400 " %}

```
{ 
 "data" => '',
 "message" => 'Breakaway Enroll Partial.ly Error Service',
 "errorCode" => 'E-000A',
 "errors" => []
 }
```

{% endtab %}
{% endtabs %}
