# Alumnos  (students) v.0

Métodos relacionados con ALUMNOS&#x20;

## &#x20;perform: searchStudent

<mark style="color:blue;">`GET`</mark> `https://xxxx/app/apilead.php`

Permite buscar alumnos matriculado en el centro y nos devuelve un array con los datos mínimos

#### Request Body

| Name                                      | Type   | Description             |
| ----------------------------------------- | ------ | ----------------------- |
| student\_name                             | string | { Nombre del alumno }   |
| student\_lastname                         | string | { Apellido del alumno } |
| student\_email                            | string | { Email del alumno }    |
| student\_phone                            | string | { Télefono del alumno } |
| perform<mark style="color:red;">\*</mark> | string | searchStudent           |
| apikey<mark style="color:red;">\*</mark>  | string | { APIKEY }              |

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

```
{
    "status": "success",
    "data": [
        {
            "student_id": "1",
            "student_name": "Student",
            "student_phone": null,
            "student_lastname": "Classlife",
            "student_email": "student@classlife.es"
        }, ...
    ]
}
```

{% endtab %}
{% endtabs %}

## perform:  getStudent

<mark style="color:blue;">`GET`</mark> `https://xxxx/app/apilead.php`

#### Request Body

| Name                                          | Type   | Description                |
| --------------------------------------------- | ------ | -------------------------- |
| student\_id<mark style="color:red;">\*</mark> | string | Identificador de alumno ID |
| perform<mark style="color:red;">\*</mark>     | string | getStudent                 |
| apikey<mark style="color:red;">\*</mark>      | string | { APIKEY }                 |

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

```
{
    "status": "success",
    "data": [
        {
            "student_id": "1",
            "student_name": "Student",
            "student_phone": null,
            "student_lastname": "Classlife",
            "student_email": "student@classlife.es"
        }, ...
    ]
}
```

{% endtab %}
{% endtabs %}

## perform:  updateStudent

<mark style="color:green;">`POST`</mark> `https://xxxx/app/apilead.php`

Esta operación actualiza los datos principales de un alumno

#### Request Body

| Name                                          | Type   | Description                  |
| --------------------------------------------- | ------ | ---------------------------- |
| student\_id<mark style="color:red;">\*</mark> | string | Identificador de alumno ID   |
| perform<mark style="color:red;">\*</mark>     | string | updateStudent                |
| apikey<mark style="color:red;">\*</mark>      | string | { APIKEY }                   |
| name                                          | String | Nombre del alumno            |
| lastname                                      | String | Primer apellido del alumno   |
| lastnameend                                   | String | Segundo apellido del alumno  |
| email                                         | String | Email principal del alumno   |
| phone                                         | String | Teléfono principal el alumno |

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

```
{
    "status": "success",
    "data": [
        {
            "student_id": "1",
            "student_name": "Student",
            "student_phone": null,
            "student_lastname": "Classlife",
            "student_email": "student@classlife.es"
        }, ...
    ]
}
```

{% endtab %}
{% endtabs %}

## perform:  removeStudent

<mark style="color:green;">`POST`</mark> `https://xxxx/app/apilead.php`

Esta operación realiza un softdelete (borrado lógico) de un alumno. El alumno estará en la "papelera" y se puede recuperar con permisos administrativos.

#### Request Body

| Name                                          | Type   | Description                |
| --------------------------------------------- | ------ | -------------------------- |
| student\_id<mark style="color:red;">\*</mark> | string | Identificador de alumno ID |
| perform<mark style="color:red;">\*</mark>     | string | updateStudent              |
| apikey<mark style="color:red;">\*</mark>      | string | { APIKEY }                 |
| name                                          | String | Nombre del alumno          |

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

```
{
    "status": "success",
    "data": [
        {
            "student_id": "1",
            "student_name": "Student",
            "student_phone": null,
            "student_lastname": "Classlife",
            "student_email": "student@classlife.es"
        }, ...
    ]
}
```

{% endtab %}
{% endtabs %}
