# Nookal

> Manage Nookal patients and appointments, check availability, and read locations, practitioners, invoices and the waiting list.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/nookal

## Actions

### Cancel an appointment

Cancel a patient's appointment.

**Inputs**

- Appointment ID (`appointment_id`, number, required): The appointment to cancel.
- Patient ID (`patient_id`, number, required): The patient's ID.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "ID": "example",
        "patientID": "example"
      }
    },
    "status": "example"
  }
}
```

### Create a patient

Add a patient with their contact details.

**Inputs**

- First name (`first_name`, text, required): The patient's first name.
- Last name (`last_name`, text, required): The patient's last name.
- Date of birth (`date_of_birth`, date, required): The patient's date of birth.
- Email (`email`, text): The patient's email address.
- Mobile (`mobile`, text): The patient's mobile number.
- Home phone (`home_phone`, text): The patient's home phone number.
- Work phone (`work_phone`, text): The patient's work phone number.
- Address line 1 (`address_line_1`, text): First line of the patient's address.
- Address line 2 (`address_line_2`, text): Second line of the patient's address.
- City (`city`, text): The patient's city or suburb.
- State (`state`, text): The patient's state.
- Postcode (`postcode`, text): The patient's postcode.
- Country (`country`, text): The patient's country.
- Opt in sms (`opt_in_sms`, true/false): Send the patient SMS messages such as reminders.
- Opt in email (`opt_in_email`, true/false): Send the patient emails such as reminders.
- Opt in marketing sms (`opt_in_marketing_sms`, true/false): Send the patient marketing SMS messages.
- Opt in marketing email (`opt_in_marketing_email`, true/false): Send the patient marketing emails.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "patient_id": "example"
      }
    },
    "status": "example"
  }
}
```

### Create an appointment

Book an appointment for an existing patient.

**Inputs**

- Location (`location_id`, number, required): The clinic location.
- Start (`start`, date and time, required): When the appointment starts, in the clinic's local time.
- Patient ID (`patient_id`, number, required): The patient's ID.
- Practitioner (`practitioner_id`, number, required): The practitioner.
- Appointment type (`appointment_type_id`, number, required): The service (appointment type).
- Notes (`notes`, text): Notes for the appointment.
- Allow overlap (`allow_overlap`, true/false): Book even if it overlaps another appointment.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "appointment_id": "example"
      }
    },
    "status": "example"
  }
}
```

### Get appointment availability

See a practitioner's free appointment times over a range of days.

**Inputs**

- Location (`location_id`, number, required): The clinic location.
- Practitioner (`practitioner_id`, number, required): The practitioner.
- Date from (`date_from`, date, required): First day to check.
- Date to (`date_to`, date, required): Last day to check.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "availabilities": {},
        "date_from": "example",
        "date_to": "example",
        "location_id": "example",
        "practitioner_id": "example"
      }
    },
    "status": "example"
  }
}
```

### List a patient's invoices

List a patient's invoices and balances.

**Inputs**

- Patient ID (`patient_id`, number, required): The patient's ID.
- Include void (`include_void`, true/false): Include voided invoices.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "invoices": []
      }
    },
    "status": "example"
  }
}
```

### List appointment types

List the appointment types (services) patients can book.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "services": []
      }
    },
    "status": "example"
  }
}
```

### List appointments

List appointments by location, practitioner, patient, dates or status.

**Inputs**

- Location (`location_id`, number): The clinic location.
- Practitioner (`practitioner_id`, number): The practitioner.
- Patient ID (`patient_id`, number): Only this patient's appointments.
- Date from (`date_from`, date): Only appointments on or after this day.
- Date to (`date_to`, date): Only appointments on or before this day.
- Statuses (`statuses`, list): Only appointments with these statuses. DNA means did not arrive. One or more of: `Cancelled`, `DNA`, `Completed`, `Uninvoiced`.
- Appointment type (`appointment_type_id`, number): The service (appointment type).
- Modified within days (`modified_within_days`, number): Only appointments changed in this many past days. From 1 to 365.
- Created within days (`created_within_days`, number): Only appointments made in this many past days. From 1 to 365.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Page length (`page_length`, number): Records per page (100 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "appointments": []
      }
    },
    "details": {
      "currentItems": 1,
      "totalItems": 1
    },
    "settings": {
      "currentPage": 1,
      "nextPage": 1,
      "pageLength": 1
    },
    "status": "example"
  }
}
```

### List class types

List the class types the clinic runs.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "classes": []
      }
    },
    "status": "example"
  }
}
```

### List locations

List the clinic's locations.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "locations": []
      }
    },
    "status": "example"
  }
}
```

### List patients

List patients, a page at a time.

**Inputs**

- Modified within days (`modified_within_days`, number): Only patients changed in this many past days. From 1 to 365.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Page length (`page_length`, number): Records per page (100 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "patients": []
      }
    },
    "details": {
      "currentItems": 1,
      "totalItems": 1
    },
    "settings": {
      "currentPage": 1,
      "nextPage": 1,
      "pageLength": 1
    },
    "status": "example"
  }
}
```

### List practitioners

List the clinic's practitioners.

**Inputs**

- Include inactive (`include_inactive`, true/false): Include practitioners who are no longer active.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "practitioners": []
      }
    },
    "status": "example"
  }
}
```

### List the waiting list

List patients waiting for an appointment.

**Inputs**

- Modified within days (`modified_within_days`, number): Only entries changed in this many past days. From 1 to 365.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "waitingList": []
      }
    },
    "status": "example"
  }
}
```

### Rebook an appointment

Move an appointment to a new time, location or practitioner.

**Inputs**

- Appointment ID (`appointment_id`, number, required): The appointment to move.
- Patient ID (`patient_id`, number, required): The patient's ID.
- Location (`location_id`, number, required): The clinic location.
- Start (`start`, date and time, required): When the appointment starts, in the clinic's local time.
- Practitioner (`practitioner_id`, number, required): The practitioner.
- Cancel first (`cancel_first`, true/false): Cancel the appointment and book a new one, instead of moving it.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "ID": "example",
        "patientID": "example"
      }
    },
    "status": "example"
  }
}
```

### Search patients

Find patients by ID, name, email, date of birth or when they were added.

**Inputs**

- Patient ID (`patient_id`, number): The patient's ID.
- Last name (`last_name`, text): The patient's last name, or its start.
- First name (`first_name`, text): The patient's first name, or its start.
- Email (`email`, text): The patient's email address.
- Date of birth (`date_of_birth`, date): The patient's date of birth.
- Fuzzy search (`fuzzy_search`, true/false): Match names that start with what is typed, instead of exactly.
- Created within days (`created_within_days`, number): Only patients added in this many past days. From 1 to 365.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Page length (`page_length`, number): Records per page (100 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "patients": []
      }
    },
    "details": {
      "currentItems": 1,
      "totalItems": 1
    },
    "settings": {
      "currentPage": 1,
      "nextPage": 1,
      "pageLength": 1
    },
    "status": "example"
  }
}
```

### Update a patient

Change the fields filled in on a patient. Blank fields are left as they are.

**Inputs**

- Patient ID (`patient_id`, number, required): The patient's ID.
- First name (`first_name`, text): The patient's first name.
- Last name (`last_name`, text): The patient's last name.
- Nickname (`nickname`, text): The name the patient goes by.
- Date of birth (`date_of_birth`, date): The patient's date of birth.
- Email (`email`, text): The patient's email address.
- Mobile (`mobile`, text): The patient's mobile number.
- Home phone (`home_phone`, text): The patient's home phone number.
- Work phone (`work_phone`, text): The patient's work phone number.
- Address line 1 (`address_line_1`, text): First line of the patient's address.
- Address line 2 (`address_line_2`, text): Second line of the patient's address.
- City (`city`, text): The patient's city or suburb.
- State (`state`, text): The patient's state.
- Postcode (`postcode`, text): The patient's postcode.
- Country (`country`, text): The patient's country.
- Opt in sms (`opt_in_sms`, true/false): Send the patient SMS messages such as reminders.
- Opt in email (`opt_in_email`, true/false): Send the patient emails such as reminders.
- Opt in marketing sms (`opt_in_marketing_sms`, true/false): Send the patient marketing SMS messages.
- Opt in marketing email (`opt_in_marketing_email`, true/false): Send the patient marketing emails.
- Active (`active`, true/false): Whether the patient is active.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "patient_id": "example"
      }
    },
    "status": "example"
  }
}
```

### Update an appointment

Change an appointment's time, practitioner, type, status or notes.

**Inputs**

- Appointment ID (`appointment_id`, number, required): The appointment to change.
- Location (`location_id`, number): The clinic location.
- Start (`start`, date and time): When the appointment starts, in the clinic's local time.
- Practitioner (`practitioner_id`, number): The practitioner.
- Appointment type (`appointment_type_id`, number): The service (appointment type).
- Status (`status`, text): The appointment's new status. DNA means did not arrive. One of: `Completed`, `Pending`, `Cancelled`, `DNA`.
- Notes (`notes`, text): Notes for the appointment.
- Allow overlap (`allow_overlap`, true/false): Allow it to overlap another appointment.

**Outputs**

- `data` (object): The response from Nookal.

**Example output**

```json
{
  "data": {
    "data": {
      "results": {
        "appointment_id": "example"
      }
    },
    "status": "example"
  }
}
```
