curl --request POST \
--url https://api.example.com/auth/register.php \
--header 'Accept: <accept>' \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"password": "<string>",
"address": "<string>",
"latitude": 123,
"longitude": 123,
"lat": 123,
"lng": 123,
"city": "<string>",
"state": "<string>",
"country": "<string>"
}
'{
"400": {},
"500": {},
"success": true,
"message": "<string>",
"user": {
"id": 123,
"uuid": "<string>",
"nombre": "<string>",
"apellido": "<string>",
"email": "<string>",
"telefono": "<string>",
"tipo_usuario": "<string>",
"creado_en": "<string>",
"actualizado_en": "<string>",
"location": {
"id": 123,
"usuario_id": 123,
"direccion": "<string>",
"latitud": 123,
"longitud": 123,
"ciudad": "<string>",
"departamento": "<string>",
"pais": "<string>",
"es_principal": true
}
}
}Create a new user account
curl --request POST \
--url https://api.example.com/auth/register.php \
--header 'Accept: <accept>' \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"password": "<string>",
"address": "<string>",
"latitude": 123,
"longitude": 123,
"lat": 123,
"lng": 123,
"city": "<string>",
"state": "<string>",
"country": "<string>"
}
'{
"400": {},
"500": {},
"success": true,
"message": "<string>",
"user": {
"id": 123,
"uuid": "<string>",
"nombre": "<string>",
"apellido": "<string>",
"email": "<string>",
"telefono": "<string>",
"tipo_usuario": "<string>",
"creado_en": "<string>",
"actualizado_en": "<string>",
"location": {
"id": 123,
"usuario_id": 123,
"direccion": "<string>",
"latitud": 123,
"longitud": 123,
"ciudad": "<string>",
"departamento": "<string>",
"pais": "<string>",
"es_principal": true
}
}
}POST /auth/register.php
application/jsonapplication/jsonShow user object
pasajero, conductor, admin, or empresacurl -X POST https://76.13.114.194/auth/register.php \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Carlos",
"lastName": "Rodríguez",
"email": "[email protected]",
"phone": "+573001234567",
"password": "SecurePass123!",
"address": "Carrera 15 #85-30",
"latitude": 4.6814,
"longitude": -74.0479,
"city": "Bogotá",
"state": "Cundinamarca",
"country": "Colombia"
}'
{
"success": true,
"message": "Usuario registrado exitosamente",
"user": {
"id": 456,
"uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"nombre": "Carlos",
"apellido": "Rodríguez",
"email": "[email protected]",
"telefono": "+573001234567",
"tipo_usuario": "pasajero",
"creado_en": "2024-03-15T14:30:00.000Z",
"actualizado_en": null,
"calificacion": null,
"location": {
"id": 89,
"usuario_id": 456,
"direccion": "Carrera 15 #85-30",
"latitud": 4.6814,
"longitud": -74.0479,
"ciudad": "Bogotá",
"departamento": "Cundinamarca",
"pais": "Colombia",
"es_principal": true,
"creado_en": "2024-03-15T14:30:00.000Z"
}
}
}
/auth/login.php endpoint.