Esta documentación muestra cómo consumir los endpoints disponibles en el backend de MejoraApp usando JSON y métodos HTTP estándar. Puedes probar estos endpoints usando herramientas como Postman.
/authhttp://localhost/mejoraApp/auth{
"user": "123456789",
"password": "123456"
}
Respuesta:
{
"status": "ok",
"result": {
"token": "5d137e028ad1b86b631f9bd229df96b1",
"user": {
"id": "1",
"name": "Jhonatan Vela",
"email": "Jhonatan@gmail.com",
"user": "123456789",
"idClient": "1"
}
}
}
/usershttp://localhost/mejoraApp/users{
"name": "nuevo registro 2",
"email": "a@a.com",
"cc": "123456789",
"idClient": "1",
"password": "123456",
"profile": "ADM",
"token": "b6540c19b2985196597735f36de3e821"
}
Respuesta:
{
"status": "ok",
"result": {
"id": 9,
"name": "nuevo registro 2",
"email": "a@a.com",
"cc": "123456789",
"idClient": "1"
}
}
/usershttp://localhost/mejoraApp/users{
"userId": "9",
"name": "nuevo registro 6",
"email": "a@a.com",
"cc": "123456789",
"idClient": "1",
"password": "123456",
"profile": "ADM",
"token": "b6540c19b2985196597735f36de3e821"
}
Respuesta:
{
"status": "ok",
"result": {
"userId": "9"
}
}
/usershttp://localhost/mejoraApp/users{
"userId": "8",
"token": "b6540c19b2985196597735f36de3e821"
}
Respuesta:
{
"status": "ok",
"result": {
"userId": "8"
}
}