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
- Download the plugin file.
- Navigate to
Plugins > Add Newin your WordPress dashboard. - Click on
Upload Plugin, select the plugin file, and install it. - 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
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | String | Yes | API 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
- Navigate to
Bookly API Keysin the WordPress admin menu. - Enter a descriptive name in the
Namefield. - Click
Add API Key. - The new API key will appear in the table below.
Delete an API Key
- In the
Existing API Keystable, locate the key you wish to delete. - Click the
Deletebutton next to the key.
Integration with Zapier
Setup Steps
- In Zapier, choose Webhooks by Zapier as the trigger app.
- Select
Retrieve Pollas the trigger event. - Enter the API endpoint URL in the
URLfield:
https://example.com/wp-json/bookly/v1/appointments?api_key=YOUR_API_KEY
- Add the API key to the
Headerssection:
- Key:
api_key - Value:
YOUR_API_KEY
- Test the trigger to ensure the connection is successful.
Integration with FluentCRM
Webhook Setup
- In FluentCRM, create a new Webhook Automation.
- Configure the webhook URL:
https://example.com/wp-json/bookly/v1/appointments?api_key=YOUR_API_KEY
- 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 Forbiddenstatus with an error message.
API Key Management
- API keys are stored securely in the WordPress database.
- Only users with
manage_optionscapability 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.