MyAfya Profile Developer docs
Developer docs

MyAfya API

Build on MyAfya Profile with our REST API. Book appointments, manage pharmacy orders, access health records, and power mobile experiences — all over HTTPS with JSON.

Version
v1.0.0
Operations
235+
Base URL
https://myafyaprofile.com/api/v1

Authentication

Most patient and account routes require a Laravel Sanctum token. Send it on every request:

// Header
Authorization: Bearer {token}
Accept: application/json

Obtain a token via POST /login or POST /register. Public catalog routes (doctors, medicines, health tips) work without auth.

Request & response

  • JSON request bodies for POST, PUT, PATCH
  • JSON responses with standard HTTP status codes
  • Paginated lists use Laravel pagination (data, meta, links)
  • Validation errors return 422 with field messages
POST https://myafyaprofile.com/api/v1/login
{
  "email": "patient@example.com",
  "password": "••••••••"
}

Mobile app

The MyAfya mobile app uses the same API. Point your client at the base URL above and use Bearer auth after login.

Environment example

EXPO_PUBLIC_API_URL=https://myafyaprofile.com/api/v1
Mobile quick reference

Common patient & app endpoints

High-traffic routes used by the mobile app. Explore every operation in the interactive reference.

Method Path Auth Description
POST /api/v1/login Public Sign in and receive a Bearer token
POST /api/v1/register Public Create a patient account
GET /api/v1/user Bearer Current authenticated user profile
GET /api/v1/doctors Public Browse doctors (paginated)
GET /api/v1/doctors/{id}/schedule Public Weekly availability for a doctor
POST /api/v1/appointments-search-availability Bearer Find open slots on a given date
POST /api/v1/appointments-register-appointment Bearer Book a video or in-person visit
GET /api/v1/medicines Public Pharmacy catalog
GET /api/v1/cart Bearer View cart and totals
POST /api/v1/patient/pharmacy/orders Bearer Place a pharmacy order
GET /api/v1/patient/records/summary Bearer Health records overview
GET /api/v1/patient/video-call/{appointmentId} Bearer Video consultation session details
POST /api/v1/ai/symptom-triage Bearer AI symptom guidance (not a diagnosis)
By category

API surface area

Grouped by OpenAPI tags from the live specification. Admin, clinical, and pharmacy staff routes are included.

User

18

User

Doctor

17

Doctor

Patient

15

Patient

Appointments

10

Booking, availability search, and appointment management

Articles

9

Articles

Notifications

8

Notifications

Department

7

Department

Operation Reports

7

Operation Reports

Order

7

Order

Bed Allotments

6

Bed Allotments

Birth Reports

6

Birth Reports

Blood Bank

6

Blood Bank

Blood Donors

6

Blood Donors

Death Reports

6

Death Reports

Medicines

6

Medicines

Nurse

6

Nurse

Offer

6

Offer

Pharmacist

6

Pharmacist

Service

6

Service

Testimonials

6

Testimonials

Vaccines

6

Vaccines

AI Assistant

5

AI-powered triage, summaries, and clinical drafting (informational only — not a substitute for licensed care)

Appointments Reservasion

5

Appointments Reservasion

Banners

5

Banners

Cart

5

Authenticated shopping cart for pharmacy checkout

FAQs

5

FAQs

Health Tips

5

Health Tips

Laboratorist

5

Laboratorist

Mobile Pharmacy

5

Medicine catalog, pharmacies, and featured listings

App Settings

4

App Settings

Authentication

4

Login, register, password reset, and session tokens

Mobile Doctors

4

Public doctor directory and schedules for the mobile app

Patient Records

4

Patient health records summary, visits, labs, and prescriptions

Patient Video

3

Video consultation join, start, and end

Checkout

2

Checkout

Admin

1

Admin

Auth

1

Auth

Offers

1

Offers

Password

1

Password

Try endpoints live

Use the Swagger UI explorer to send requests, inspect schemas, and authorize with your Bearer token — the same workflow as Stripe, Twilio, or any modern API platform.

Launch interactive reference