/lovable-integrations

Lovable and Acuity Scheduling integration: Step-by-Step Guide 2025

Learn how to seamlessly integrate Lovable with Acuity Scheduling using our step-by-step guide to streamline appointments and boost workflow efficiency.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to integrate Lovable with Acuity Scheduling?

 

Step 1: Setting Up Acuity API Configuration

 
  • Create a new file in your Lovable project’s src folder and name it config.ts.
  • Copy and paste the following code into config.ts. Replace the placeholder text with your actual Acuity Scheduling API credentials.

export const ACUITYAPIUSERID = "YOURACUITYAPIUSER_ID";
export const ACUITYAPIKEY = "YOURACUITYAPI_KEY";
export const ACUITYAPIURL = "https://acuityscheduling.com/api/v1";

 

Step 2: Creating the Acuity Service File

 
  • Create a new folder named services inside your src folder if it does not already exist.
  • Create a new file in src/services named acuityService.ts.
  • Copy and paste the following code into acuityService.ts. This TypeScript class uses Acuity’s API to fetch and create appointments.

import { ACUITYAPIUSERID, ACUITYAPIKEY, ACUITYAPI_URL } from "../config";

interface Appointment {
  id: number;
  datetime: string;
  firstName: string;
  lastName: string;
  email: string;
}

export class AcuityService {
  private headers: HeadersInit;

  constructor() {
    const auth = Buffer.from(${ACUITY_API_USER_ID}:${ACUITY_API_KEY}).toString('base64');
    this.headers = {
      "Authorization": Basic ${auth},
      "Content-Type": "application/json"
    };
  }

  async getAppointments(): Promise {
    const response = await fetch(${ACUITY_API_URL}/appointments, {
      method: 'GET',
      headers: this.headers
    });
    if (!response.ok) {
      throw new Error('Failed to fetch appointments');
    }
    return response.json();
  }

  async createAppointment(appointmentData: Partial): Promise {
    const response = await fetch(${ACUITY_API_URL}/appointments, {
      method: 'POST',
      headers: this.headers,
      body: JSON.stringify(appointmentData)
    });
    if (!response.ok) {
      throw new Error('Failed to create appointment');
    }
    return response.json();
  }
}
  • Note: Since Lovable does not have a terminal, this example uses the built-in fetch API. If fetch isn’t available in your project environment, you may need to include a polyfill by adding the polyfill’s code directly into your project.

 

Step 3: Integrating Acuity Service into the Lovable Application

 
  • Open the file where you want to use Acuity Scheduling functions (for example, src/app.ts).
  • Import the AcuityService class and instantiate it. Then call its methods as needed in your application.
  • Copy and paste the following code snippet into your application file to test the integration.

import { AcuityService } from "./services/acuityService";

const acuityService = new AcuityService();

// Example function to fetch and log appointments
async function showAcuityAppointments() {
  try {
    const appointments = await acuityService.getAppointments();
    console.log("Acuity Appointments:", appointments);
  } catch (error) {
    console.error("Error fetching appointments:", error);
  }
}

showAcuityAppointments();

 

Step 4: Testing the Integration

 
  • Ensure that your config.ts file contains your valid Acuity Scheduling credentials.
  • Save all changes and run your Lovable project in your usual way.
  • Trigger the code that calls the AcuityService (for example, by refreshing your web application) and check the browser’s console for the appointment data or error messages.

 

Step 5: Additional Customizations

 
  • You can expand the AcuityService class by adding more methods for other Acuity Scheduling endpoints, following the same pattern as in getAppointments and createAppointment.
  • Customize error handling and logging according to your project’s requirements.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022