Registers a new patient user.
{
"status": "success",
"message": "User created successfully"
}
Registers a new psychologist.
{
"status": "success",
"message": "Psychologist created successfully"
}
Fetches the authenticated user's profile data.
{
"status": "success",
"message": "User details",
"data": {
"user_id": "user-id",
"profile_picture": "url_to_profile_picture",
"firstname": "John",
"lastname": "Doe",
"email": "johndoe@example.com",
"phone_number": "123456789",
"role": "psychologist",
// Other profile fields depending on role
}
}
Authenticates a user and returns an access token.
{
"status": "success",
"message": "Login successful",
"data": {
"user_id": "user-id",
"access_token": "token",
"token_type": "Bearer",
"role": "patient"
}
}
Logs out the authenticated user and deletes the access token.
{
"status": "success",
"message": "Logout successful"
}
Returns statistics for the admin dashboard.
{
"status": "success",
"message": "Admin dashboard data",
"data": {
"psychologists": 10,
"total_patient": 100,
"ongoing_appointments": 5,
"completed_appointments": 50
}
}
Fetches the list of verified psychologists.
{
"status": "success",
"message": "List of verified psychologists",
"data": [
{
"id": 1,
"user_id": 2,
"profile_picture": "url_to_profile_picture",
"firstname": "John",
"lastname": "Doe",
"gender": "male",
"profesional_identification_number": "12345",
"degree": "PhD",
"specialization": "Clinical Psychology",
"work_experience": 10,
"is_verified": true,
"detail_url": "api/psychologists/1/detail"
}
]
}
Fetches the list of unverified psychologists.
{
"status": "success",
"message": "List of unverified psychologists",
"data": [
{
"id": 1,
"user_id": 2,
"profile_picture": "url_to_profile_picture",
"firstname": "Jane",
"lastname": "Smith",
"profesional_identification_number": "67890",
"degree": "MSc",
"specialization": "Counseling",
"work_experience": 5,
"is_verified": false,
"is_rejected": false,
"approve_url": "/api/psychologists/2/approve",
"reject_url": "/api/psychologists/2/reject",
"detail_url": "/api/psychologists/2/detail"
}
]
}
Approves a psychologist by ID.
{
"status": "success",
"message": "Psychologist approved successfully",
"data": {
"id": 1,
"is_verified": true
}
}
{
"status": "error",
"message": "Psychologist not found"
}
Rejects a psychologist by ID.
{
"status": "success",
"message": "Psychologist rejected successfully",
"data": {
"id": 1,
"is_verified": false,
"is_rejected": true
}
}
{
"status": "error",
"message": "Psychologist not found"
}
Fetches details of a psychologist by ID.
{
"status": "success",
"message": "Psychologist details",
"data": {
"id": 1,
"user_id": 2,
"profile_picture": "url_to_profile_picture",
"firstname": "John",
"lastname": "Doe",
"gender": "male",
"profesional_identification_number": "12345",
"degree": "PhD",
"specialization": "Clinical Psychology",
"work_experience": 10,
"is_verified": true,
"approve_url": "/api/psychologists/2/approve",
"reject_url": "/api/psychologists/2/reject"
}
}
{
"status": "error",
"message": "Psychologist not found"
}
Fetches a list of appointments for the authenticated patient.
{
"status": "success",
"data": {
"upcoming_appointments": [
{
"id": 7,
"channel_id": "channel_id_example",
"date": "2024-11-10",
"start_time": "14:00",
"end_time": "15:00",
"status": "waiting",
"psychologist": {
"id": 3,
"user_id": "0ee04692-6935-4df4-9414-ac943203da51",
"firstname": "John",
"lastname": "Doe",
"email": "johndoe@example.com",
"phone_number": "1234567890"
},
"detail_url": "http://example.com/api/patients/appointments/7/detail"
}
],
"history": [
{
"id": 8,
"channel_id": "channel_id_example",
"date": "2024-10-10",
"start_time": "14:00",
"end_time": "15:00",
"status": "completed",
"psychologist": {
"id": 3,
"user_id": "0ee04692-6935-4df4-9414-ac943203da51",
"firstname": "John",
"lastname": "Doe",
"email": "johndoe@example.com",
"phone_number": "1234567890"
},
"detail_url": "http://example.com/api/patients/appointments/8/detail"
}
]
}
}
Fetches the details of a specific appointment for the patient.
{
"status": "success",
"message": "Appointment details",
"data": {
"id": 7,
"channel_id": "channel_id_example",
"date": "2024-11-10",
"start_time": "14:00",
"end_time": "15:00",
"duration": "60 minutes",
"status": "waiting",
"note": "Make sure you have a stable internet connection and are in a quiet place during the consultation session.",
"psychologist": {
"user_id": "0ee04692-6935-4df4-9414-ac943203da51",
"firstname": "John",
"lastname": "Doe",
"gender": "male",
"email": "johndoe@example.com",
"specialization": "Clinical Psychology",
"work_experience": 5
}
}
}
Fetches a list of available psychologists for patients to view.
{
"status": "success",
"message": "List of Psychologists",
"data": [
{
"id": 1,
"user_id": "0ee04692-6935-4df4-9414-ac943203da51",
"profile_picture": "url_to_profile_picture",
"firstname": "John",
"lastname": "Doe",
"gender": "male",
"specialization": "Clinical Psychology",
"work_experience": 5,
"is_verified": true,
"detail_url": "http://example.com/api/patients/psychologists/1"
}
]
}
Fetches detailed information for a specific psychologist by ID.
{
"status": "success",
"message": "Psychologist details",
"data": {
"id": 1,
"user_id": "0ee04692-6935-4df4-9414-ac943203da51",
"profile_picture": "url_to_profile_picture",
"firstname": "John",
"lastname": "Doe",
"gender": "male",
"specialization": "Clinical Psychology",
"work_experience": 5,
"is_verified": true,
"upcoming_appointments": [
{
"date": "2024-11-10",
"times": [
{ "start_time": "09:00", "end_time": "10:00" },
{ "start_time": "11:00", "end_time": "12:00" }
]
}
]
}
}
Books an appointment with a psychologist for the patient.
{
"status": "success",
"message": "Appointment booked successfully",
"data": {
"id": 7,
"patient_id": 2,
"psychologist_id": 1,
"channel_id": "channel_id_example",
"date": "2024-11-10",
"start_time": "14:00",
"end_time": "15:00",
"status": "waiting"
}
}
Fetches AI analysis results for the authenticated patient.
{
"status": "success",
"data": [
{
"id": 1,
"complaint": "Feeling stressed at work",
"stress": 0.8,
"anxiety": 0.6,
"depression": 0.3,
"created_at": "2024-11-01T10:00:00Z",
"updated_at": "2024-11-01T10:00:00Z",
"patient_id": 1
}
]
}