MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

This API is not authenticated.

Student management

APIs for managing students

Display a listing of the students.

Get all students

Example request:
curl --request GET \
    --get "/api/students" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/students"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

[
    {
        "id": 1,
        "name": "Aliyah Berge",
        "email": "katheryn42@example.net",
        "phone": "681-790-9749",
        "language": "en",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 2,
        "name": "Damion Hodkiewicz I",
        "email": "elisabeth.sanford@example.com",
        "phone": "+1 (743) 251-2848",
        "language": "en",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 3,
        "name": "Kailey Cartwright",
        "email": "white.juston@example.net",
        "phone": "934-219-0599",
        "language": "en",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 4,
        "name": "Mohammed Rempel",
        "email": "imogene03@example.com",
        "phone": "541.540.9268",
        "language": "es",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 5,
        "name": "Kennith Torphy",
        "email": "hodkiewicz.cristal@example.com",
        "phone": "980.882.8777",
        "language": "es",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 6,
        "name": "Jeanie Labadie",
        "email": "kwolff@example.net",
        "phone": "520.904.2760",
        "language": "en",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 7,
        "name": "Cielo Bernhard",
        "email": "elena.hammes@example.com",
        "phone": "754-620-3483",
        "language": "es",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 8,
        "name": "Chloe Kutch",
        "email": "schamberger.stuart@example.net",
        "phone": "314.562.0468",
        "language": "es",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 9,
        "name": "Era Kreiger",
        "email": "major.dubuque@example.com",
        "phone": "+1-269-809-4460",
        "language": "es",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 10,
        "name": "Newton Russel",
        "email": "smohr@example.net",
        "phone": "(352) 651-9422",
        "language": "en",
        "created_at": "2024-11-20T02:13:41.000000Z",
        "updated_at": "2024-11-20T02:13:41.000000Z"
    },
    {
        "id": 11,
        "name": "Ronny Schuster",
        "email": "koelpin.camden@example.net",
        "phone": "820-603-6609",
        "language": "es",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 12,
        "name": "Zoe Fay",
        "email": "jules12@example.org",
        "phone": "562-731-7664",
        "language": "es",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 13,
        "name": "Andy Casper",
        "email": "ngrimes@example.net",
        "phone": "928.347.3846",
        "language": "es",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 14,
        "name": "Mr. Rocio Veum Jr.",
        "email": "myron74@example.net",
        "phone": "+1.913.521.1275",
        "language": "en",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 15,
        "name": "Thurman Corwin",
        "email": "eleannon@example.com",
        "phone": "480.778.4371",
        "language": "en",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 16,
        "name": "Ms. Pearl Armstrong Jr.",
        "email": "volkman.hettie@example.net",
        "phone": "929-838-6576",
        "language": "es",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 17,
        "name": "Mr. Osbaldo Bernhard",
        "email": "thalia.wintheiser@example.org",
        "phone": "1-808-464-3335",
        "language": "es",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 18,
        "name": "Dr. Jimmy Hilpert Sr.",
        "email": "hilpert.tina@example.org",
        "phone": "830-367-6720",
        "language": "en",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 19,
        "name": "Davin Krajcik",
        "email": "dakota.quigley@example.net",
        "phone": "1-346-904-3768",
        "language": "en",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 20,
        "name": "Marlin Heaney",
        "email": "jermey.schmidt@example.org",
        "phone": "1-304-321-2671",
        "language": "es",
        "created_at": "2024-11-20T03:16:54.000000Z",
        "updated_at": "2024-11-20T03:16:54.000000Z"
    },
    {
        "id": 21,
        "name": "Elvis Gaylord",
        "email": "jake55@example.org",
        "phone": "(781) 729-5313",
        "language": "es",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 22,
        "name": "Weldon Kutch DDS",
        "email": "greenholt.cornell@example.com",
        "phone": "410.359.7761",
        "language": "es",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 23,
        "name": "Lottie Jacobson",
        "email": "uriah.cassin@example.net",
        "phone": "(325) 478-5214",
        "language": "es",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 24,
        "name": "Mr. Cleve Wunsch",
        "email": "destiney.gulgowski@example.org",
        "phone": "1-934-776-7976",
        "language": "es",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 25,
        "name": "Dennis Kutch",
        "email": "ifriesen@example.com",
        "phone": "(718) 456-6468",
        "language": "en",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 26,
        "name": "Prof. Shana Daugherty PhD",
        "email": "ewyman@example.com",
        "phone": "1-571-652-5529",
        "language": "en",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 27,
        "name": "Julio Torp V",
        "email": "aglae.fay@example.com",
        "phone": "+1-973-452-4270",
        "language": "en",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 28,
        "name": "Baylee Kerluke",
        "email": "bernard05@example.com",
        "phone": "+1-402-966-4474",
        "language": "en",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 29,
        "name": "Electa Fadel",
        "email": "estel.ryan@example.com",
        "phone": "830-231-7308",
        "language": "es",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    },
    {
        "id": 30,
        "name": "Elenora Hayes",
        "email": "sgoodwin@example.net",
        "phone": "(586) 529-1693",
        "language": "en",
        "created_at": "2024-11-20T03:16:57.000000Z",
        "updated_at": "2024-11-20T03:16:57.000000Z"
    }
]
 

Example response (404):


{
    "message": "No hay estudiantes registrados",
    "status": 200
}
 

Request      

GET api/students

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Display the specified student.

Get a specific student

Example request:
curl --request GET \
    --get "/api/students/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/students/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": 1,
    "name": "Juan",
    "email": " [email protected]",
    "phone": "1234567890",
    "language": "English",
    "created_at": "2021-08-26T00:00:00.000000Z",
    "updated_at": "2021-08-26T00:00:00.000000Z"
}
 

Example response (404):


{
    "message": "Estudiante no encontrado",
    "status": 404
}
 

Request      

GET api/students/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the student. Example: 1

Store a newly created student in storage.

Create a new student

Example request:
curl --request POST \
    "/api/students" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vzdpgxcqqddo\",
    \"email\": \"kreiger.bernard@example.com\",
    \"phone\": \"1051246116\",
    \"language\": \"Spanish\"
}"
const url = new URL(
    "/api/students"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vzdpgxcqqddo",
    "email": "kreiger.bernard@example.com",
    "phone": "1051246116",
    "language": "Spanish"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "student": {
        "name": "Juan",
        "email": " [email protected]",
        "phone": "1234567890",
        "language": "English",
        "updated_at": "2021-08-26T00:00:00.000000Z",
        "created_at": "2021-08-26T00:00:00.000000Z",
        "id": 1
    },
    "status": 201
}
 

Example response (400):


{
    "message": "Error en la validación de los datos",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "email": [
            "The email field is required."
        ],
        "phone": [
            "The phone field is required."
        ],
        "language": [
            "The language field is required."
        ]
    },
    "status": 400
}
 

Example response (500):


{
    "message": "Error al crear el estudiante",
    "status": 500
}
 

Request      

POST api/students

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vzdpgxcqqddo

email   string   

Must be a valid email address. Example: kreiger.bernard@example.com

phone   string   

Must be 10 digits. Example: 1051246116

language   string   

Example: Spanish

Must be one of:
  • English
  • Spanish
  • French
  • German

Update the specified student in storage.

Update a specific student

Example request:
curl --request PUT \
    "/api/students/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"yzyjlwyencaqmmwgrgev\",
    \"email\": \"winnifred17@example.com\",
    \"phone\": \"1480526168\",
    \"language\": \"French\"
}"
const url = new URL(
    "/api/students/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "yzyjlwyencaqmmwgrgev",
    "email": "winnifred17@example.com",
    "phone": "1480526168",
    "language": "French"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Estudiante actualizado",
    "student": {
        "id": 1,
        "name": "Juan",
        "email": " [email protected]",
        "phone": "1234567890",
        "language": "English",
        "created_at": "2021-08-26T00:00:00.000000Z",
        "updated_at": "2021-08-26T00:00:00.000000Z"
    },
    "status": 200
}
 

Example response (400):


{
    "message": "Error en la validación de los datos",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "email": [
            "The email field is required."
        ],
        "phone": [
            "The phone field is required."
        ],
        "language": [
            "The language field is required."
        ]
    },
    "status": 400
}
 

Example response (404):


{
    "message": "Estudiante no encontrado",
    "status": 404
}
 

Example response (500):


{
    "message": "Error al actualizar el estudiante",
    "status": 500
}
 

Request      

PUT api/students/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the student. Example: 1

Body Parameters

name   string   

Must not be greater than 255 characters. Example: yzyjlwyencaqmmwgrgev

email   string   

Must be a valid email address. Example: winnifred17@example.com

phone   string   

Must be 10 digits. Example: 1480526168

language   string   

Example: French

Must be one of:
  • English
  • Spanish
  • French
  • German

Update the specified student in storage.

Update a specific student

Example request:
curl --request PATCH \
    "/api/students/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"oliduhandhbv\",
    \"email\": \"mandy.wunsch@example.com\",
    \"phone\": \"9339812573\",
    \"language\": \"German\"
}"
const url = new URL(
    "/api/students/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "oliduhandhbv",
    "email": "mandy.wunsch@example.com",
    "phone": "9339812573",
    "language": "German"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Estudiante actualizado",
    "student": {
        "id": 1,
        "name": "Juan",
        "email": " [email protected]",
        "phone": "1234567890",
        "language": "English",
        "created_at": "2021-08-26T00:00:00.000000Z",
        "updated_at": "2021-08-26T00:00:00.000000Z"
    },
    "status": 200
}
 

Example response (400):


{
    "message": "Error en la validación de los datos",
    "errors": {},
    "status": 400
}
 

Example response (404):


{
    "message": "Estudiante no encontrado",
    "status": 404
}
 

Request      

PATCH api/students/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the student. Example: 1

Body Parameters

name   string  optional  

Must not be greater than 255 characters. Example: oliduhandhbv

email   string  optional  

Must be a valid email address. Example: mandy.wunsch@example.com

phone   string  optional  

Must be 10 digits. Example: 9339812573

language   string  optional  

Example: German

Must be one of:
  • English
  • Spanish
  • French
  • German

Remove the specified student from storage.

Delete a specific student

Example request:
curl --request DELETE \
    "/api/students/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/students/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Estudiante eliminado",
    "status": 200
}
 

Example response (404):


{
    "message": "Estudiante no encontrado",
    "status": 404
}
 

Request      

DELETE api/students/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the student. Example: 1