Huli API (2.0.0)

Download OpenAPI specification:Download

Public API for the Huli healthcare platform providing endpoints for practice management, EHR (Electronic Health Records), patient management, and healthcare integrations.

API Version

This documentation covers v2 endpoints. All new integrations should use v2 endpoints exclusively.

Getting Started

Begin with the authentication endpoints below to obtain access credentials and learn about required headers.

Authentication

API authentication and token management

Obtain JWT token

Exchange your API key for a JWT token required for all authenticated requests.

API Key Access: API keys must be requested through support channels by the organization owner. The organization ID (id_organization) will be provided alongside the API key.

Usage:

  1. Include the returned JWT token in the Authorization header: Bearer {token}
  2. Include the organization ID in the id_organization header for request scoping

Most endpoints require the id_organization header to validate the request scope.

Authorizations:
bearerAuth
Request Body schema: application/json
api_key
required
string

Your organization's API key

Responses

Request samples

Content type
application/json
{
  • "api_key": "your_api_key_here"
}

Response samples

Content type
application/json
{
  • "response": "OK",
  • "data": {
    }
}

Organizations

Organization and clinic management

Get organization information

Retrieve organization information including healthcare professionals.

Authorization Details: Use the expand=AUTHORIZATION query parameter to retrieve detailed authorization information, including the idGrantor fields which contain the doctor user IDs associated with the organization. This provides access to healthcare professional identifiers for further API operations.

Authorizations:
bearerAuth
query Parameters
expand
string
Value: "AUTHORIZATION"
Example: expand=AUTHORIZATION

Include additional details in the response

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idOrganization": "1001",
  • "idOwner": "2001",
  • "name": "Healthcare Organization",
  • "idUserModifiedBy": "1",
  • "status": "ACTIVE",
  • "authorization": [
    ]
}

Patient Management

Patient and patient file management operations

Create patient file

Create a new patient file in the Master Patient Index (MPI). This endpoint creates a comprehensive patient record including personal data, contact information, insurance details, and emergency contacts.

The patient file serves as the central record for all patient-related information across the Huli platform.

Authorizations:
bearerAuth
header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Request Body schema: application/json
required
object
object
object
object

Responses

Request samples

Content type
application/json
{
  • "personalData": {
    },
  • "contact": {
    },
  • "insurance": {
    },
  • "emergencyContact": {
    }
}

Response samples

Content type
application/json
{
  • "id": "130818",
  • "status": "ACTIVE",
  • "idUserModifiedBy": "56576",
  • "idUser": "3001",
  • "idPatient": "2617",
  • "patient": {
    },
  • "personalData": {
    },
  • "contact": {
    },
  • "insurance": {
    },
  • "emergencyContact": {
    },
  • "isFromCitizenRegister": false,
  • "isDemoPatient": false
}

List patient files

List all patient files accessible to the user within their organization

Authorizations:
bearerAuth
query Parameters
query
string

Search filter - can be a phone number, patient name, or identification number

limit
integer [ 1 .. 100 ]
Default: 20

Maximum number of results to return

offset
integer >= 0
Default: 0

Number of results to skip for pagination

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "patientFiles": [
    ],
  • "total": 1836,
  • "size": 10
}

Get patient file

Retrieve a specific patient file by ID

Authorizations:
bearerAuth
path Parameters
patientFileID
required
string

Patient file ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "id": "130818",
  • "status": "ACTIVE",
  • "idUserModifiedBy": "56576",
  • "idUser": "3001",
  • "idPatient": "2617",
  • "patient": {
    },
  • "personalData": {
    },
  • "contact": {
    },
  • "insurance": {
    },
  • "emergencyContact": {
    },
  • "isFromCitizenRegister": false,
  • "isDemoPatient": false
}

EHR - Documents

Document upload and management

Upload document to patient

Upload a document to a specific patient file

Authorizations:
bearerAuth
path Parameters
patientFileID
required
string

Patient file ID

ownerID
required
string

Owner/Doctor ID

Request Body schema: application/json
file
required
string <byte>

Base64 encoded PDF file

filename
required
string

Name of the file

Responses

Request samples

Content type
application/json
{
  • "file": "string",
  • "filename": "medical-report.pdf"
}

Response samples

Content type
application/json
{ }

EHR - Medical Records

Medical record retrieval

Get medical record

Retrieve a patient's complete medical record.

Note: This endpoint uses v1 format. The response format follows v1 conventions rather than the standardized v2 format used by other endpoints.

Authorizations:
bearerAuth
path Parameters
patientID
required
string

Patient ID

ownerID
required
string

Organization owner ID (user ID of the organization owner)

Responses

Response samples

Content type
application/json
{
  • "response": "OK",
  • "data": {
    }
}

EHR - Checkups

Checkup data retrieval (v2 only)

Get checkup

Retrieve complete checkup information

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idEvent": "7",
  • "idUser": "3001",
  • "idPatientFile": "1001",
  • "consultationType": "INITIAL",
  • "isComplete": 0,
  • "modifiedOn": "2024-01-15T10:30:00Z",
  • "startedOn": "2024-01-15T09:00:00Z",
  • "idUserModifiedBy": "1"
}

Get prescription

Retrieve prescription details from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "prescriptions": [
    ]
}

Get vital signs

Retrieve vital signs recorded during a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientVitalSigns": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "createdOn": "2024-01-15T09:15:00Z",
  • "modifiedOn": "2024-01-15T09:15:00Z",
  • "temperature": 9.9,
  • "pulse": 8.8,
  • "respiration": 7.7,
  • "systolicPressure": 6,
  • "diastolicPressure": 5,
  • "saturation": 4.4,
  • "glucose": 100
}

Get diagnosis

Retrieve diagnosis information from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "id": "1",
  • "idUserModifiedBy": "3001",
  • "additionalObservations": "Aditional observations",
  • "evolutionNote": "Evolution notes",
  • "diagnostics": [
    ],
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get lab procedure request

Retrieve lab procedure requests from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "labProcedureRequests": [
    ]
}

Get suffering/symptoms

Retrieve patient suffering or symptoms from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientSuffering": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "suffering": "Patient suffering",
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get reason of visit

Retrieve reason for visit from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientReasonOfVisit": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "reason": "Patient reason of visit",
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get physical examination notes

Retrieve physical examination notes from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientPhysicalNote": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "physical": "Patient physical note",
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get systematic examination

Retrieve systematic examination details from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientSystematicExamination": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "values": [
    ],
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get review of systems

Retrieve review of systems from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientReviewOfSystems": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "values": [
    ],
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get sleep pattern

Retrieve sleep pattern information from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientSleepPattern": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "notes": "Sleep pattern notes",
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get anthropometric data

Retrieve anthropometric measurements from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientAnthropometricData": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "createdOn": "2024-01-15T09:30:00Z",
  • "modifiedOn": "2024-01-15T09:30:00Z",
  • "height": 160,
  • "heightUnit": "CENTIMETER",
  • "weight": 50,
  • "weightUnit": "KILOGRAM"
}

Get last menstrual cycle

Retrieve last menstrual cycle information from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientLastMenstrualCycle": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z",
  • "lastMenstrualCycle": "2024-01-01T00:00:00Z"
}

Get checkup notes

Retrieve general notes from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientCheckupNote": "1",
  • "idUserModifiedBy": "3001",
  • "status": "ACTIVE",
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z",
  • "comments": "Checkup note comments"
}

Get bowel habit

Retrieve bowel habit information from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientBowelHabit": "1",
  • "idUserModifiedBy": "3001",
  • "description": "Bowel habit description",
  • "status": "ACTIVE",
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get plan notes

Retrieve treatment plan notes from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idPatientPlanNote": "1",
  • "idUserModifiedBy": "3001",
  • "note": "Plan note",
  • "status": "ACTIVE",
  • "createdOn": "2024-01-15T10:30:00Z",
  • "modifiedOn": "2024-01-15T10:30:00Z"
}

Get custom questions

Retrieve custom questions and answers from a checkup

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Checkup ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "questions": [
    ]
}

Appointments

Appointment scheduling and management

Get doctor availability

Get available time slots for a doctor at a specific clinic

Authorizations:
bearerAuth
path Parameters
doctorID
required
string

Doctor ID

clinicID
required
string

Clinic ID

query Parameters
from
required
string <date-time>
Example: from=2025-07-01T13:32:00Z

Start date-time for availability range (ISO 8601 format)

to
required
string <date-time>
Example: to=2025-07-06T13:32:00Z

End date-time for availability range (ISO 8601 format)

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idCalendar": "1",
  • "idClinic": "2292",
  • "idDoctor": "1",
  • "slotDates": [
    ]
}

Create appointment

Schedule a new appointment between patients and doctors.

Required fields: id_doctor, id_clinic, start_date, time_from

Appointment Duration Options:

  • Provide source_event (availability slot ID) - system calculates end_date and time_to automatically
  • OR provide end_date and time_to manually
  • One of these approaches is required

Recommendation: Using source_event is recommended to ensure the appointment is created during an available time slot. Query availability endpoints first to get valid slot IDs.

Core Requirements:

  • Doctor must be associated with the specified clinic

Permission-Based Restrictions: Some users may have additional business rules enforced, such as:

  • Appointments must be scheduled at least 1 hour in advance
  • Patient cannot have multiple appointments with same doctor on same day
  • Maximum 3 appointments per patient per day (when patient file provided)

Important: Business rules and validation requirements vary significantly based on user-specific permissions. The above restrictions are examples that may or may not apply to your API key.

Authorizations:
bearerAuth
header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Request Body schema: application/json
id_doctor
required
integer

Doctor identifier

id_clinic
required
integer

Clinic identifier

id_patient_file
integer

Patient file identifier (enables additional validations)

source_event
integer

Availability event ID for the appointment slot

start_date
required
string[0-9]{4}-[0-9]{2}-[0-9]{2}

Appointment start date (YYYY-MM-DD), must be in the future

time_from
required
string[0-9]{2}:[0-9]{2}:[0-9]{2}

Appointment start time (HH:MM:SS), must be at least 1 hour in advance

end_date
string[0-9]{4}-[0-9]{2}-[0-9]{2}

Appointment end date (YYYY-MM-DD), auto-calculated if not provided

time_to
string[0-9]{2}:[0-9]{2}:[0-9]{2}

Appointment end time (HH:MM:SS), auto-calculated if not provided

notes
string <= 1000000 characters

Appointment notes

color
string^[0-9ABCDEF]{6}

Hexadecimal color for calendar display (6 characters)

id_treatment
integer

Treatment ID to be evaluated during the appointment

insurance_name
string <= 100 characters

Insurance provider name

insurance_number
string <= 100 characters

Insurance provider ID

is_first_time_patient
boolean

Flag indicating if this is patient's first visit to this doctor

id_tags
Array of integers

Tag IDs to assign to the appointment

Responses

Request samples

Content type
application/json
{
  • "id_doctor": 1,
  • "id_clinic": 2292,
  • "id_patient_file": 1001,
  • "source_event": 516015,
  • "start_date": "2025-07-10",
  • "time_from": "09:00:00",
  • "end_date": "2025-07-10",
  • "time_to": "09:30:00",
  • "notes": "Follow-up consultation",
  • "color": "FF5733",
  • "id_treatment": 601,
  • "insurance_name": "Health Insurance Co",
  • "insurance_number": "INS123456",
  • "is_first_time_patient": false,
  • "id_tags": [
    ]
}

Response samples

Content type
application/json
{
  • "idEvent": "743905",
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "idPatientFile": "1001",
  • "idCalendar": "1",
  • "idUserModifiedBy": "56576",
  • "idUserCreatedBy": "56576",
  • "isConfirmedByProvider": false,
  • "isConfirmedByPatient": false,
  • "isFirstTimePatient": false,
  • "isStatusModifiedByPatient": false,
  • "isDeletedForDoctor": false,
  • "statusAppointment": "BOOKED",
  • "statusAvailability": "BUSY",
  • "startDate": "2025-07-15",
  • "timeFrom": "11:00:00",
  • "endDate": "2025-07-15",
  • "timeTo": "11:30:00",
  • "createdOn": "2025-07-02T16:00:29Z",
  • "insuranceName": "Premium Health Insurance",
  • "insuranceNumber": "PREM789012"
}

Get appointment

Retrieve appointment details by event ID

Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Appointment ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idEvent": "743905",
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "idPatientFile": "1001",
  • "idCalendar": "1",
  • "idUserModifiedBy": "56576",
  • "idUserCreatedBy": "56576",
  • "isConfirmedByProvider": false,
  • "isConfirmedByPatient": false,
  • "isFirstTimePatient": false,
  • "isStatusModifiedByPatient": false,
  • "isDeletedForDoctor": false,
  • "statusAppointment": "BOOKED",
  • "statusAvailability": "BUSY",
  • "startDate": "2025-07-15",
  • "timeFrom": "11:00:00",
  • "endDate": "2025-07-15",
  • "timeTo": "11:30:00",
  • "createdOn": "2025-07-02T16:00:29Z",
  • "insuranceName": "Premium Health Insurance",
  • "insuranceNumber": "PREM789012"
}

Update appointment

Update appointment details.

Requirements:

  • Appointment must have status BOOKED
  • Field availability depends on user permissions
Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Appointment ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Request Body schema: application/json
notes
string <= 1000000 characters

Appointment notes (permission required)

color
string^[0-9ABCDEF]{6}

Hexadecimal color for calendar display (permission required)

id_treatment
integer

Treatment ID (permission required)

insurance_name
string <= 100 characters

Insurance provider name

insurance_number
string <= 100 characters

Insurance provider ID

is_first_time_patient
boolean

First-time patient flag (permission required)

is_deleted_for_doctor
boolean

Control visibility on doctor calendar

id_tags
Array of integers

Tag IDs to assign (replaces existing tags)

Responses

Request samples

Content type
application/json
{
  • "notes": "Follow-up consultation",
  • "color": "33FF57",
  • "id_treatment": 602,
  • "insurance_name": "Premium Health Insurance",
  • "insurance_number": "PREM789012",
  • "is_first_time_patient": false,
  • "is_deleted_for_doctor": false,
  • "id_tags": [
    ]
}

Response samples

Content type
application/json
{
  • "idEvent": "743905",
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "idPatientFile": "1001",
  • "idCalendar": "1",
  • "idUserModifiedBy": "56576",
  • "idUserCreatedBy": "56576",
  • "isConfirmedByProvider": false,
  • "isConfirmedByPatient": false,
  • "isFirstTimePatient": false,
  • "isStatusModifiedByPatient": false,
  • "isDeletedForDoctor": false,
  • "statusAppointment": "BOOKED",
  • "statusAvailability": "BUSY",
  • "startDate": "2025-07-15",
  • "timeFrom": "11:00:00",
  • "endDate": "2025-07-15",
  • "timeTo": "11:30:00",
  • "createdOn": "2025-07-02T16:00:29Z",
  • "insuranceName": "Premium Health Insurance",
  • "insuranceNumber": "PREM789012"
}

Cancel appointment

Cancel an appointment, changing its status to CANCELLED and availability to IGNORE.

Effects:

  • Status changes from BOOKED to CANCELLED
  • Availability changes from BUSY to IGNORE
  • Sets isStatusModifiedByPatient flag based on request
Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Appointment ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Request Body schema: application/json
is_status_modified_by_patient
required
boolean

Flag to indicate if the cancellation was requested by the patient

Responses

Request samples

Content type
application/json
{
  • "is_status_modified_by_patient": true
}

Response samples

Content type
application/json
{
  • "idEvent": "743905",
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "idPatientFile": "1001",
  • "idCalendar": "1",
  • "idUserModifiedBy": "56576",
  • "idUserCreatedBy": "56576",
  • "isConfirmedByProvider": false,
  • "isConfirmedByPatient": false,
  • "isFirstTimePatient": false,
  • "isStatusModifiedByPatient": false,
  • "isDeletedForDoctor": false,
  • "statusAppointment": "BOOKED",
  • "statusAvailability": "BUSY",
  • "startDate": "2025-07-15",
  • "timeFrom": "11:00:00",
  • "endDate": "2025-07-15",
  • "timeTo": "11:30:00",
  • "createdOn": "2025-07-02T16:00:29Z",
  • "insuranceName": "Premium Health Insurance",
  • "insuranceNumber": "PREM789012"
}

Confirm appointment

Mark an appointment as confirmed by patient.

Effects:

  • Sets isConfirmedByPatient to true
  • Appointment status remains BOOKED
Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Appointment ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idEvent": "743905",
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "idPatientFile": "1001",
  • "idCalendar": "1",
  • "idUserModifiedBy": "56576",
  • "idUserCreatedBy": "56576",
  • "isConfirmedByProvider": false,
  • "isConfirmedByPatient": false,
  • "isFirstTimePatient": false,
  • "isStatusModifiedByPatient": false,
  • "isDeletedForDoctor": false,
  • "statusAppointment": "BOOKED",
  • "statusAvailability": "BUSY",
  • "startDate": "2025-07-15",
  • "timeFrom": "11:00:00",
  • "endDate": "2025-07-15",
  • "timeTo": "11:30:00",
  • "createdOn": "2025-07-02T16:00:29Z",
  • "insuranceName": "Premium Health Insurance",
  • "insuranceNumber": "PREM789012"
}

Reschedule appointment

Reschedule an existing appointment to a new date and time.

Requirements:

  • Only appointments with status BOOKED can be rescheduled
  • Appointments with associated checkups cannot be rescheduled
  • Field availability depends on user permissions

Effects:

  • Creates new appointment with new date/time
  • Original appointment marked as RESCHEDULED
  • Sends notifications to patient and provider

Business Rules:

  • Maximum 3 appointments per patient per day
  • No overlapping appointments for same patient
  • Must be scheduled in the future with advance notice
Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Appointment ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Request Body schema: application/json
isStatusModifiedByPatient
required
boolean

Flag to indicate if the reschedule was requested by the patient

startDate
required
string[0-9]{4}-[0-9]{2}-[0-9]{2}

New start date for the appointment (YYYY-MM-DD)

timeFrom
required
string[0-9]{2}:[0-9]{2}:[0-9]{2}

New start time for the appointment (HH:MM:SS)

endDate
string[0-9]{4}-[0-9]{2}-[0-9]{2}

New end date for the appointment (YYYY-MM-DD)

timeTo
string[0-9]{2}:[0-9]{2}:[0-9]{2}

New end time for the appointment (HH:MM:SS)

sourceEvent
string

Availability event ID for the new appointment slot

Responses

Request samples

Content type
application/json
{
  • "isStatusModifiedByPatient": true,
  • "startDate": "2024-07-15",
  • "timeFrom": "14:30:00",
  • "endDate": "2024-07-15",
  • "timeTo": "15:00:00",
  • "sourceEvent": "12345"
}

Response samples

Content type
application/json
{
  • "idEvent": "743905",
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "idPatientFile": "1001",
  • "idCalendar": "1",
  • "idUserModifiedBy": "56576",
  • "idUserCreatedBy": "56576",
  • "isConfirmedByProvider": false,
  • "isConfirmedByPatient": false,
  • "isFirstTimePatient": false,
  • "isStatusModifiedByPatient": false,
  • "isDeletedForDoctor": false,
  • "statusAppointment": "BOOKED",
  • "statusAvailability": "BUSY",
  • "startDate": "2025-07-15",
  • "timeFrom": "11:00:00",
  • "endDate": "2025-07-15",
  • "timeTo": "11:30:00",
  • "createdOn": "2025-07-02T16:00:29Z",
  • "insuranceName": "Premium Health Insurance",
  • "insuranceNumber": "PREM789012"
}

Mark appointment as no-show

Mark an appointment as no-show when patient doesn't attend.

Requirements:

  • Appointment status must be BOOKED or COMPLETED
  • Appointment must be in the past (cannot mark future appointments)

Effects:

  • Creates new appointment record with status NOSHOW
  • Inactivates original appointment record
  • Sends notifications to patient and provider
Authorizations:
bearerAuth
path Parameters
eventID
required
string

Event/Appointment ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idEvent": "743905",
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "idPatientFile": "1001",
  • "idCalendar": "1",
  • "idUserModifiedBy": "56576",
  • "idUserCreatedBy": "56576",
  • "isConfirmedByProvider": false,
  • "isConfirmedByPatient": false,
  • "isFirstTimePatient": false,
  • "isStatusModifiedByPatient": false,
  • "isDeletedForDoctor": false,
  • "statusAppointment": "BOOKED",
  • "statusAvailability": "BUSY",
  • "startDate": "2025-07-15",
  • "timeFrom": "11:00:00",
  • "endDate": "2025-07-15",
  • "timeTo": "11:30:00",
  • "createdOn": "2025-07-02T16:00:29Z",
  • "insuranceName": "Premium Health Insurance",
  • "insuranceNumber": "PREM789012"
}

List doctor appointments

Get all appointments for a specific doctor with filtering and pagination support.

Required Parameters:

  • Date range (from and to) is mandatory for filtering appointments

Filtering:

  • Filter by appointment status, clinic, or pagination
  • All appointments within date range returned by default
Authorizations:
bearerAuth
path Parameters
doctorID
required
string

Doctor ID

query Parameters
from
required
string <date-time>
Example: from=2024-01-01T00:00:00Z

Start date filter (ISO 8601 format)

to
required
string <date-time>
Example: to=2024-12-31T23:59:59Z

End date filter (ISO 8601 format)

idClinic
string
Example: idClinic=2877

Filter by specific clinic ID

status_appointment
string
Enum: "BOOKED" "RESCHEDULED" "COMPLETED" "CANCELLED" "NOSHOW"
Example: status_appointment=COMPLETED

Filter by appointment status

limit
integer
Example: limit=20

Maximum number of results to return

offset
integer
Example: offset=0

Number of results to skip for pagination

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "appointments": [
    ],
  • "total": "1003",
  • "size": "20"
}

List patient appointments

Get all appointments for a specific patient with filtering and pagination support.

Authorizations:
bearerAuth
path Parameters
patientFileID
required
string

Patient file ID

query Parameters
from
string <date-time>
Example: from=2024-01-01T00:00:00Z

Start date filter (ISO 8601 format)

to
string <date-time>
Example: to=2024-12-31T23:59:59Z

End date filter (ISO 8601 format)

status_appointment
string
Enum: "BOOKED" "RESCHEDULED" "COMPLETED" "CANCELLED" "NOSHOW"
Example: status_appointment=COMPLETED

Filter by appointment status

limit
integer
Example: limit=20

Maximum number of results to return

offset
integer
Example: offset=0

Number of results to skip for pagination

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "appointments": [
    ],
  • "total": "7",
  • "size": "5"
}

List booking tags

Get all available booking tags for the organization with pagination support.

Tags can be used to categorize and filter appointments based on custom organizational criteria.

Authorizations:
bearerAuth
query Parameters
limit
integer
Example: limit=10

Maximum number of tags to return

offset
integer
Example: offset=0

Number of tags to skip for pagination

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "tags": [
    ],
  • "total": "16",
  • "size": "10"
}

Doctors

Doctor information

Get doctor by ID

Get doctor information by doctor ID from the doctor service.

This endpoint retrieves comprehensive doctor data including specialties, clinic associations, and user information.

Authorizations:
bearerAuth
path Parameters
IDDoctor
required
string
Example: 1001

Doctor ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "id": "1001",
  • "photo": "huli/doctor/photo/22032024/83606/a5992af667c91b8b054a48309001c97c.jpg",
  • "url": "dr-healthcare-professional",
  • "status": "ACTIVE",
  • "idUser": "2001",
  • "user": {
    },
  • "specialty": [
    ],
  • "doctorClinic": [
    ],
  • "professionalLicense": [
    ]
}

Get doctor by user ID

Get doctor information by user ID

Authorizations:
bearerAuth
path Parameters
IDUser
required
string
Example: 3001

User ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "id": "1001",
  • "photo": "huli/doctor/photo/22032024/83606/a5992af667c91b8b054a48309001c97c.jpg",
  • "url": "dr-healthcare-professional",
  • "status": "ACTIVE",
  • "idUser": "2001",
  • "user": {
    },
  • "specialty": [
    ],
  • "doctorClinic": [
    ],
  • "professionalLicense": [
    ]
}

Get doctor clinic info

Get doctor information at a specific clinic

Authorizations:
bearerAuth
path Parameters
doctorID
required
string
Example: 1001

Doctor ID

clinicID
required
string
Example: 2001

Clinic ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "id": "3001",
  • "building": "Medical Plaza",
  • "floor": "3rd Floor",
  • "office": "Suite 305",
  • "phone": [
    ],
  • "email": [
    ],
  • "idClinic": "4001",
  • "clinic": {
    },
  • "status": "ACTIVE",
  • "idPaymentMethods": [
    ],
  • "insurances": [
    ]
}

Get doctor clinic phone

Get doctor's phone number at a specific clinic

Authorizations:
bearerAuth
path Parameters
doctorID
required
string

Doctor ID

clinicID
required
string

Clinic ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "phone": [
    ]
}

Get doctor clinic address

Get doctor's address at a specific clinic

Authorizations:
bearerAuth
path Parameters
doctorID
required
string

Doctor ID

clinicID
required
string

Clinic ID

header Parameters
id_organization
required
integer
Example: 4001

Organization ID for scoping operations to a specific organization

Responses

Response samples

Content type
application/json
{
  • "idDoctor": "1",
  • "idClinic": "2292",
  • "address": "123 Medical Plaza, Building A, Floor 2, Office 15"
}

Webhooks

Webhook event notifications for external systems

Appointment Events Webhook

Webhook notifications sent when appointment-related events occur in the system.

Event Types:

  • APPOINTMENT_CREATED - Triggered when a new appointment is scheduled
  • APPOINTMENT_UPDATED - Triggered when appointment details are modified
  • APPOINTMENT_CANCELLED - Triggered when an appointment is cancelled
  • APPOINTMENT_RESCHEDULED - Triggered when an appointment is moved to a different time

Setup Required: Webhook subscriptions must be requested through Huli support. Contact support with your webhook endpoint URL, preferred authentication method, and which events you want to receive.

Authorizations:
webhookAuth
Request Body schema: application/json
id
required
integer

Unique identifier for this webhook delivery

event
required
string
Enum: "APPOINTMENT_CREATED" "APPOINTMENT_UPDATED" "APPOINTMENT_CANCELLED" "APPOINTMENT_RESCHEDULED"

Type of appointment event that triggered this webhook

timestamp
required
string <date-time>

ISO 8601 timestamp when the event occurred

required
object

Appointment-specific data payload

Responses

Request samples

Content type
application/json
Example
{
  • "id": 12345,
  • "event": "APPOINTMENT_CREATED",
  • "timestamp": "2023-12-01T10:00:00Z",
  • "data": {
    }
}

Checkup Events Webhook

Webhook notifications sent when checkup-related events occur in the system.

Event Types:

  • CHECKUP_CREATED - Triggered when a new checkup is completed
  • CHECKUP_UPDATED - Triggered when checkup data is modified

Using Webhook Data: The checkup data provided in the webhook payload can be used to retrieve detailed information using the checkup API endpoints in the "EHR - Checkups" section. Use the id_event field to fetch specific checkup data like vital signs, systematic examination, and other checkup details.

Setup Required: Webhook subscriptions must be requested through Huli support. Contact support with your webhook endpoint URL, preferred authentication method, and which events you want to receive.

Authorizations:
webhookAuth
Request Body schema: application/json
id
required
integer

Unique identifier for this webhook delivery

event
required
string
Enum: "CHECKUP_CREATED" "CHECKUP_UPDATED"

Type of checkup event that triggered this webhook

timestamp
required
string <date-time>

ISO 8601 timestamp when the event occurred

required
object

Checkup-specific data payload. Use the id_event field to retrieve detailed checkup information using the checkup API endpoints in the "EHR - Checkups" section.

Responses

Request samples

Content type
application/json
{
  • "id": 12347,
  • "event": "CHECKUP_CREATED",
  • "timestamp": "2023-12-01T15:30:00Z",
  • "data": {
    }
}