HexaHealth Public API · v1

สร้าง integration กับ HexaHealth API

REST API + FHIR R4 + Webhooks ครบในแพลตฟอร์มเดียว — เปิดให้ developer สร้าง app, dashboard, และ integration กับระบบของคุณ

17 service APIs · 200+ endpoints · OAuth 2.0 · Rate limit ตามแพ็กเกจ · Cloud-native

OAuth 2.0 · API KeyREST + FHIR R4Webhooks pubsubSDK 4 ภาษา
curl · POST /v1/visits
curl -X POST https://api.hexahealth.app/v1/visits \
  -H "Authorization: Bearer hh_live_••••" \
  -H "Content-Type: application/json" \
  -d '{
    "patientId": "pat_8f3a2",
    "chief_complaint": "ไข้ ปวดหัว",
    "doctorId": "doc_2k1"
  }'
200 OK · ตอบกลับใน ~120ms · returns visit object
API Services

17 services · 200+ endpoints

REST API ครบทุกฟีเจอร์ของ HexaHealth Platform — จาก Patient Management ไปจนถึง AI Clinical Assistant

Patients API

/v1/patients
Core

จัดการข้อมูลคนไข้ทั้งหมด — สร้าง อัปเดต ค้นหา รวมถึง demographic, allergies, history

  • GET/v1/patients
  • POST/v1/patients
  • GET/v1/patients/:id
  • PATCH/v1/patients/:id
อ่าน Reference

Appointments API

/v1/appointments
Core

นัดหมาย · เลื่อนนัด · ยกเลิก · ดูช่วงเวลาว่างของแพทย์ · multi-doctor scheduling

  • GET/v1/appointments
  • POST/v1/appointments
  • GET/v1/appointments/availability
  • DELETE/v1/appointments/:id
อ่าน Reference

OPD / EMR API

/v1/visits
Clinical

Visit · SOAP Note · Vital Signs · Diagnosis (ICD-10) · Order Entry สำหรับห้องตรวจ

  • POST/v1/visits
  • POST/v1/visits/:id/notes
  • POST/v1/visits/:id/vitals
  • GET/v1/visits/:id
อ่าน Reference

Pharmacy API

/v1/prescriptions
Clinical

ใบสั่งยา · Dispensing · Drug Interaction Check · Stock & Inventory

  • POST/v1/prescriptions
  • POST/v1/prescriptions/:id/dispense
  • GET/v1/drugs/search
  • GET/v1/drugs/interactions
อ่าน Reference

Lab & Imaging API

/v1/labs
Clinical

สั่ง Lab · บันทึกผล · เชื่อม LIS / PACS · Critical value alert · HL7 ingestion

  • POST/v1/labs/orders
  • POST/v1/labs/results
  • GET/v1/labs/results/:patientId
  • POST/v1/imaging/studies
อ่าน Reference

Billing API

/v1/invoices
Finance

ใบเสร็จ · ใบกำกับภาษี · e-Tax · QR PromptPay · รับ Webhook payment confirmation

  • POST/v1/invoices
  • POST/v1/invoices/:id/pay
  • POST/v1/invoices/:id/etax
  • GET/v1/invoices/:id/receipt
อ่าน Reference

Insurance Claims API

/v1/claims
Finance

ส่ง Pre-authorization · Claim · Reconciliation กับบริษัทประกัน 30+ แห่ง

  • POST/v1/claims/preauth
  • POST/v1/claims
  • GET/v1/claims/:id/status
  • POST/v1/claims/reconcile
อ่าน Reference

LINE OA API

/v1/line
Engagement

ส่งแจ้งเตือนผ่าน LINE OA ของคลินิก · Broadcast · Template · CRM

  • POST/v1/line/notify
  • POST/v1/line/broadcast
  • POST/v1/line/templates
  • GET/v1/line/contacts
อ่าน Reference

Telemedicine API

/v1/telemed
Engagement

Video consultation · สร้างห้อง · บันทึก session · Recording · Transcript

  • POST/v1/telemed/sessions
  • GET/v1/telemed/sessions/:id
  • POST/v1/telemed/sessions/:id/record
  • GET/v1/telemed/sessions/:id/transcript
อ่าน Reference

AI Clinical API

/v1/ai
AI

AI ช่วยเขียน SOAP · Differential Diagnosis · Drug Interaction · Lab interpretation

  • POST/v1/ai/soap
  • POST/v1/ai/diagnose
  • POST/v1/ai/lab-summary
  • POST/v1/ai/triage
อ่าน Reference

FHIR R4 API

/fhir/r4
Integration

เชื่อมระบบ HIS/LIS อื่นด้วยมาตรฐาน HL7 FHIR R4 — Patient, Encounter, Observation, etc.

  • GET/fhir/r4/Patient/:id
  • POST/fhir/r4/Encounter
  • GET/fhir/r4/Observation
  • POST/fhir/r4/MedicationRequest
อ่าน Reference

Webhooks API

/v1/webhooks
Integration

รับ Event แบบ Real-time — patient.created, appointment.confirmed, payment.completed

  • GET/v1/webhooks
  • POST/v1/webhooks
  • DELETE/v1/webhooks/:id
  • POST/v1/webhooks/:id/test
อ่าน Reference

Branches API

/v1/branches
Operations

จัดการสาขา · โอนสต๊อก · Multi-branch reporting · พนักงานข้ามสาขา

  • GET/v1/branches
  • POST/v1/branches/:id/transfer
  • GET/v1/branches/reports
อ่าน Reference

Staff & RBAC API

/v1/staff
Operations

เพิ่ม/ลบพนักงาน · Role · Permission · Audit log · 2FA enforcement

  • GET/v1/staff
  • POST/v1/staff/invites
  • POST/v1/staff/:id/roles
  • GET/v1/audit-logs
อ่าน Reference

Analytics API

/v1/analytics
Operations

Query metrics · Custom report · Export · ดึงข้อมูล Dashboard ออกไปรวมระบบอื่น

  • POST/v1/analytics/query
  • GET/v1/analytics/reports
  • POST/v1/analytics/export
อ่าน Reference

Courses & Packages API

/v1/courses
Engagement

ขายคอร์ส · ตัดครั้งใช้งาน · Voucher · Loyalty program · Gift card redemption

  • POST/v1/courses
  • POST/v1/courses/:id/redeem
  • POST/v1/vouchers/redeem
อ่าน Reference
Quick Start

เริ่มต้นใน 5 นาที

สมัครบัญชี → ขอ API Key ใน Dashboard → เลือกภาษาที่ถนัด → call API ครั้งแรก ได้ทันที

  1. 1

    สมัครและขอ API Key

    ใน Dashboard → Settings → API Keys คลิก 'Generate'

  2. 2

    เลือก SDK / language

    Node.js · Python · PHP · Go หรือใช้ raw cURL ก็ได้

  3. 3

    Call API แรก

    Sandbox จะมีข้อมูลทดสอบให้เล่นทันที ไม่ต้องสร้างเอง

  4. 4

    Subscribe Webhooks

    รับ event แบบ real-time มาที่ endpoint ของคุณ

POST /v1/patients
curl -X POST https://api.hexahealth.app/v1/patients \
  -H "Authorization: Bearer hh_live_•••••••••••••••" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "สมชาย",
    "lastName": "ใจดี",
    "nationalId": "1100400123456",
    "dateOfBirth": "1985-04-12",
    "gender": "male",
    "phone": "081-234-5678"
  }'
200 OK — returns Patient object with id, createdAt
Authentication

ปลอดภัย ตามมาตรฐาน

เลือกได้ระหว่าง API Key (server-to-server) และ OAuth 2.0 (third-party app) ทุก request เข้ารหัส TLS 1.3

API Key (Bearer)

Server-to-server integration · Long-lived secret · scope per environment

Authorization: Bearer hh_live_•••••••••••••

OAuth 2.0

Third-party apps · ผู้ใช้ authorize ผ่าน HexaHealth · refresh tokens

https://auth.hexahealth.app/oauth/authorize?client_id=...
TLS 1.3 ทุก request
Audit log ทุก call
Rate limit ตามแพ็กเกจ
DDoS Protection
Webhooks

รับ Event Real-time ทันที

Subscribe event ที่สนใจ — เราจะ POST ข้อมูลไป endpoint ของคุณทันทีเมื่อเกิดเหตุการณ์ พร้อม HMAC signature สำหรับ verify

12+ event types พร้อมใช้
HMAC-SHA256 signature verify
Auto retry 5 ครั้งในรูปแบบ exponential backoff
Test endpoint จาก Dashboard ได้

Event types

  • patient.created

    เมื่อมีคนไข้ใหม่ลงทะเบียน

  • patient.updated

    ข้อมูลคนไข้ถูกแก้ไข

  • appointment.created

    นัดหมายใหม่ถูกสร้าง

  • appointment.confirmed

    คนไข้ยืนยันนัดผ่าน LINE / Portal

  • appointment.cancelled

    นัดหมายถูกยกเลิก

  • visit.completed

    OPD visit เสร็จสิ้น

  • prescription.dispensed

    ห้องยา dispense ยาให้คนไข้

  • lab.result_ready

    ผล Lab พร้อมแล้ว

  • payment.completed

    ชำระเงินสำเร็จ

  • invoice.overdue

    ใบเสร็จเกินกำหนดชำระ

  • claim.approved

    บริษัทประกันอนุมัติเคลม

  • telemed.session_ended

    Telemedicine session จบ

Official SDKs · v0.1 Early Access

SDK 4 ภาษา พร้อมใช้

ทุก SDK type-safe · auto retry · pagination helpers · webhook signature verification ในตัว

Node.js / TypeScript

@hexahealth/sdk

npm install @hexahealth/sdk
GitHub Repo

PHP

hexahealth/sdk

composer require hexahealth/sdk
GitHub Repo

Go

github.com/hexahealth/go-sdk

go get github.com/hexahealth/go-sdk
GitHub Repo
Rate Limits & Pricing

แพ็กเกจ API

เริ่มฟรี · จ่ายตาม volume · upgrade-downgrade ได้ตลอดเวลา

Free

Sandbox & Development

0 บาท

Daily quota
1,000 req/วัน
Rate limit
60 req/นาที
Webhooks
5 endpoints
  • Sandbox environment
  • Test patients data
  • Public API docs
  • Community Slack
ขอ API Key ฟรี
⭐ แนะนำ

Developer

Side projects & startups

990 บาท/เดือน

Daily quota
100,000 req/วัน
Rate limit
300 req/นาที
Webhooks
20 endpoints
  • Production environment
  • Real patient access (consent required)
  • Email support
  • 1 webhook secret
เริ่มต้น Developer

Business

Production-grade integrations

4,990 บาท/เดือน

Daily quota
1M req/วัน
Rate limit
1,000 req/นาที
Webhooks
100 endpoints
  • Higher rate limits
  • Priority support (LINE)
  • SLA 99.9%
  • FHIR R4 access
เริ่มต้น Business

Enterprise

Custom + on-premise option

Custom

Daily quota
Unlimited
Rate limit
Custom
Webhooks
Unlimited
  • Dedicated infra
  • On-premise deployment
  • Custom SLA 99.95%
  • Solution Architect
ติดต่อทีมขาย
พร้อมเริ่มต้น?

ขอ API Key ฟรีวันนี้

Sandbox พร้อมใช้ทันที · ไม่ต้องใช้บัตรเครดิต · เริ่ม integrate ได้ใน 5 นาที

✓ Setup ในไม่กี่นาที · ✓ ใช้ฟีเจอร์ครบ · ✓ ยกเลิกได้ทุกเมื่อ