Resources

Documentation

#
Bookly API Integration.

Overview

The Bookly API Integration Plugin allows you to securely access Bookly appointments and customer details using custom API endpoints. This plugin is designed to integrate with external services like Zapier and FluentCRM, while also enabling API key-based security.

Features

  • Retrieve Bookly appointments along with associated staff, service, and customer details.
  • Manage API keys directly from the WordPress admin dashboard.
  • Secure API endpoints with API key validation.
  • Integration compatibility with both Zapier and FluentCRM.

Steps

  1. Download the plugin file.
  2. Navigate to Plugins > Add New in your WordPress dashboard.
  3. Click on Upload Plugin, select the plugin file, and install it.
  4. Activate the plugin.

API Endpoints

1. Retrieve Appointments

Endpoint: /wp-json/bookly/v1/appointments

Method: GET

Authentication: Requires a valid API key passed as a parameter.

Parameters

ParameterTypeRequiredDescription
api_keyStringYesAPI key for authentication.

Example Request

GET https://example.com/wp-json/bookly/v1/appointents?api_kemy=YOUR_API_KEY

Example Response

[
    {
        "appointment_id": "1",
        "start_date": "2024-08-19 23:00:00",
        "end_date": "2024-08-20 00:00:00",
        "created_at": "2024-08-19 02:53:29",
        "staff_name": "John Doe",
        "service_name": "Consultation",
        "customer_name": "Jane Smith",
        "customer_email": "jane.smith@example.com",
        "customer_time_zone": "America/New_York"
    }
]


Managing API Keys

Add an API Key

  1. Navigate to Bookly API Keys in the WordPress admin menu.
  2. Enter a descriptive name in the Name field.
  3. Click Add API Key.
  4. The new API key will appear in the table below.

Delete an API Key

  1. In the Existing API Keys table, locate the key you wish to delete.
  2. Click the Delete button next to the key.

Integration with Zapier

Setup Steps

  1. In Zapier, choose Webhooks by Zapier as the trigger app.
  2. Select Retrieve Poll as the trigger event.
  3. Enter the API endpoint URL in the URL field:
   https://example.com/wp-json/bookly/v1/appointments?api_key=YOUR_API_KEY
  1. Add the API key to the Headers section:
  • Key: api_key
  • Value: YOUR_API_KEY
  1. Test the trigger to ensure the connection is successful.


Integration with FluentCRM

Webhook Setup

  1. In FluentCRM, create a new Webhook Automation.
  2. Configure the webhook URL:
   https://example.com/wp-json/bookly/v1/appointments?api_key=YOUR_API_KEY
  1. Map the data fields as required for your FluentCRM automation.


Security Measures

API Key Validation

  • Each request to the API requires a valid API key.
  • Unauthorized requests return a 403 Forbidden status with an error message.

API Key Management

  • API keys are stored securely in the WordPress database.
  • Only users with manage_options capability can manage API keys.


Changelog

Version 1.3

API URL Display: Automatically generate and display the API URL next to the API Key in the admin table.

  • URL Format: https://example.com/wp-json/bookly/v1/appointments?api_key=YOUR_API_KEY
  • URL is displayed in a readonly text input field for easy copying.

Version 1.2

  • Added API key management interface.
  • Enhanced security with API key validation.
  • Improved admin UI for managing keys.

Version 1.1

  • Initial release with basic API functionality.

Additional Notes & Resources

For further assistance, please visit Plugin Documentation.

Required Plugins

  • Bookly
  • Zapier

Quick Steps

  • Download and install the Bookly API Integration Plugin.
  • Activate the plugin from the WordPress dashboard.
  • Configure API keys via the WordPress admin interface:
    • Add a new key with a descriptive name.
    • Use the key for authentication in API requests.

Zapier

    • For Zapier, set up Webhooks and include the API key in headers.
    • Trigger Event: Retrieve Poll
    • URL: https://example.com/wp-json/bookly/v1/appointments?api_key=YOUR_API_KEY

FluentCRM

  • For FluentCRM, configure Webhooks to link Bookly data.