# Instructors

## Get instructors

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/instructors`

Get the instructors of the given partner.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The ID of the partner. |

#### Query Parameters

| Name   | Type    | Description                           |
| ------ | ------- | ------------------------------------- |
| page   | integer | The current page. Defaults to 1.      |
| search | string  | Filter instructors by name and email. |

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

```
```

{% endtab %}
{% endtabs %}

## Create a new instructor

<mark style="color:green;">`POST`</mark> `/api/internal/v1/partners/:partner_id/instructors`

Create a new instructor for the given partner.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The ID of the partner. |

#### Request Body

| Name                   | Type    | Description                                                                                         |
| ---------------------- | ------- | --------------------------------------------------------------------------------------------------- |
| name                   | string  | The name of the instructor.                                                                         |
| email                  | string  | The email address of the instructor.                                                                |
| note                   | string  | Internal note regarding the instructor.                                                             |
| display\_phone\_number | boolean | Indicates if the instructor phone number should be visible in the online profile. Default is false. |
| display\_email         | boolean | Indicates if the instructor email address should be visible in the online profile. Default is true. |
| website                | string  | The instructor website link.                                                                        |
| facebook\_link         | string  | The Facebook profile link of the instructor.                                                        |
| youtube\_link          | string  | The Youtube profile link of the instructor.                                                         |
| twitter\_link          | string  | The Twitter profile link of the instructor.                                                         |
| profile\_image         | object  | The profile image of the instructor.                                                                |
| category\_ids          | array   | Array with the IDs of the categories that should be associated with the instructor.                 |

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

```
```

{% endtab %}
{% endtabs %}

## Get a specific instructor

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/instructors/:instructor_id`

Get a specific instructor.

#### Path Parameters

| Name           | Type    | Description               |
| -------------- | ------- | ------------------------- |
| partner\_id    | integer | The ID of the partner.    |
| instructor\_id | integer | The ID of the instructor. |

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

```
```

{% endtab %}
{% endtabs %}

## Update instructor

<mark style="color:orange;">`PUT`</mark> `/api/internal/v1/partners/:partner_id/instructors/:instructor_id`

Update the given instructor. The fields used when creating a new instructor are also applied here.

#### Path Parameters

| Name           | Type    | Description               |
| -------------- | ------- | ------------------------- |
| partner\_id    | integer | The ID of the partner.    |
| instructor\_id | integer | The ID of the instructor. |

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

```
```

{% endtab %}
{% endtabs %}

## Delete instructor

<mark style="color:red;">`DELETE`</mark> `/api/internal/v1/partners/:partner_id/instructors/:instructor_id`

Delete the given instructor.

#### Path Parameters

| Name           | Type    | Description                             |
| -------------- | ------- | --------------------------------------- |
| partner\_id    | integer | The ID of the partner.                  |
| instructor\_id | integer | The ID of the instructor to be deleted. |

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

```
```

{% endtab %}
{% endtabs %}

## Update instructor profile image

<mark style="color:orange;">`PUT`</mark> `/api/internal/v1/partners/:partner_id/instructors/:instructor_id/profile-image`

Update the profile image of the given instructor.

#### Path Parameters

| Name           | Type    | Description               |
| -------------- | ------- | ------------------------- |
| partner\_id    | integer | The ID of the partner.    |
| instructor\_id | integer | The ID of the instructor. |

#### Request Body

| Name           | Type   | Description               |
| -------------- | ------ | ------------------------- |
| profile\_image | object | The image to be uploaded. |

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

```
```

{% endtab %}
{% endtabs %}

## Delete instructor profile image

<mark style="color:red;">`DELETE`</mark> `/api/internal/v1/partners/:partner_id/instructors/:instructor_id/profile-image`

Delete the profile image of the given instructor.

#### Path Parameters

| Name           | Type    | Description               |
| -------------- | ------- | ------------------------- |
| partner\_id    | integer | The ID of the partner.    |
| instructor\_id | integer | The ID of the instructor. |

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

```
```

{% endtab %}
{% endtabs %}
