{
  "base_url_example": "https://your-domain.com/nobese-api/doctor",
  "notes": [
    "Use patient_id going forward (user_id accepted in some endpoints for backward compatibility).",
    "Use status going forward (appointment_status accepted in some endpoints for backward compatibility)."
  ],
  "apis": [
    {
      "name": "Appointment Request (Requested Status)",
      "endpoint": "/app_request.php",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "hospital_id": "H-01",
        "patient_id": 345,
        "doctor_id": 12,
        "request_note": "Need consultation for diet plan",
        "timezone": "Asia/Karachi"
      }
    },
    {
      "name": "Create Appointment",
      "endpoint": "/doctor_appointment.php",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "doctor_id": 12,
        "patient_id": 345,
        "availability_id": 889,
        "hospital_id": "H-01",
        "reason": "Follow-up consultation",
        "status": "scheduled"
      }
    },
    {
      "name": "Get Patient Appointments",
      "endpoint": "/appointment_get.php?patient_id=345&timezone=Asia/Karachi&status=scheduled",
      "method": "GET"
    },
    {
      "name": "Get Patient Appointments (legacy param)",
      "endpoint": "/appointment_get.php?user_id=345&timezone=Asia/Karachi",
      "method": "GET"
    },
    {
      "name": "Update Appointment Status (simple)",
      "endpoint": "/update_status.php",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "appointment_id": 101,
        "status": "confirmed"
      }
    },
    {
      "name": "Update Appointment Status + Notify Doctor",
      "endpoint": "/update_appointment.php",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "appointment_id": 101,
        "status": "waiting"
      }
    },
    {
      "name": "Generate Agora Link/Token",
      "endpoint": "/genrate_link.php",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "appointment_id": 101
      }
    },
    {
      "name": "Doctor Availability",
      "endpoint": "/doctor_availability.php?doctor_id=12&date=2026-05-12&timezone=Asia/Karachi",
      "method": "GET"
    },
    {
      "name": "Get Doctor (for patient mapping)",
      "endpoint": "/get_doctor.php?user_id=345&timezone=Asia/Karachi",
      "method": "GET"
    },
    {
      "name": "Get Doctor + User Detail",
      "endpoint": "/get_docter_details.php?user_id=345",
      "method": "GET"
    },
    {
      "name": "Validate/Apply Referral Code",
      "endpoint": "/referral_code.php",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "user_id": 345,
        "referral_code": "REF1234"
      }
    },
    {
      "name": "Appointment Payment Entry",
      "endpoint": "/appoint_pay.php",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "availability_id": 889,
        "doctor_id": 12,
        "user_id": 345,
        "ammount": 3000,
        "invoice": "INV-778899",
        "method": "card"
      }
    }
  ]
}
