Ehjzny APIs (1.0)

Developers Support: DOCS_TEAM_EMAIL

Prerequisites

Please enable API Access through Settings page first, Then Copy APP ID.

Localization

To get results in a specific langauge, please use lang attribute in header. currently, values: en, ar are supported.

Pagination

Many API endpoints that return lists of data support pagination to help manage large datasets efficiently. The pagination system uses the following parameters:

Query Parameters

  • limit (optional): Number of items to return per page (default: 10)
  • nextPageToken (optional): Token to retrieve the next page of results

Response Format

Paginated responses include a pagination object with the following structure:

{
  "result": [
    // ... array of items
  ],
  "pagination": {
    "nextPageToken": "eyJpZCI6IjYzZjA5...", // Token for next page (null if last page)
    "hasMore": true // Boolean indicating if more pages are available
  }
}

Usage Example

First request (get first page):

GET /management/resources?limit=5

Subsequent requests (get next pages):

GET /management/resources?limit=5&nextPageToken=eyJpZCI6IjYzZjA5...

Important Notes

  • If nextPageToken is null or hasMore is false, you've reached the last page
  • Always use the nextPageToken from the previous response to get the next page
  • The limit parameter has a maximum value that varies by endpoint
  • Pagination tokens have an expiration time, so don't store them for extended periods

Postman

You can find Postman's collection here.

Online Payments

Enable Payments through Online Methods (Apple Pay, Visa, MasterCard, Mada, STC Pay) easily through simple steps:

  • First, you activate Online Payments inside Dashboard.
  • At this point every booking scheduled with a Booking Type that has price on it, will become in a PENDING_PAYMENT status waiting for payment completion to finally become CONFIRMED.
  • Use the paymentLink's URL in payment object found inside scheduling response to prompt customer to pay (you can also use paymentWebViewLink URL to view a striped version of the payment page).
  • If customer has not completed the payment within the configured duration, booking will automatically be deleted.

Take a look at this Flutter's Dart implementation (using flutter_inappwebview package):

class PaymentWebview extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Payment'),
      ),
      body: Center(
        child: InAppWebView(
          initialUrlRequest: URLRequest(
            url: WebUri(
              appointment.payment.paymentWebViewLink,
            ),
          ),
          onWebViewCreated: (controller) async {
            if (defaultTargetPlatform != TargetPlatform.android ||
                await WebViewFeature.isFeatureSupported(
                    WebViewFeature.WEB_MESSAGE_LISTENER)) {
              controller.addJavaScriptHandler(
                handlerName: 'message',
                callback: (args) {
                  print('Message from webview $args');
                  // args[0] is either
                  // {
                  //   type: "paymentInitialized",
                  //   bookingId: "<Booking ID>"
                  // }
                  // or
                  // {
                  //   type: "paymentSuccess",
                  //   bookingId: "<Booking ID>"
                  // }
                  // or
                  // {
                  //   type: "paymentFailed",
                  //   bookingId: "<Booking ID>"
                  // }

                  if (args.isNotEmpty &&
                      args[0]?["type"] == "paymentInitialized") {
                    print('payment initialized');
                  }

                  if (args.isNotEmpty && args[0]?["type"] == "paymentSuccess") {
                    print('payment success');
                    //do actions
                    //e.g. navigate to confirmation screen
                  }

                  if (args.isNotEmpty && args[0]?["type"] == "paymentFailed") {
                    print('payment failed');
                    //do actions
                  }
                },
              );
            }
          },
          onLoadStop: (controller, url) async {
            await controller.evaluateJavascript(source: '''
                        window.addEventListener("message", (event) => {                
                          window.flutter_inappwebview.callHandler('message', event.data);
                        }, false);
                      ''');
          },
        ),
      ),
    );
  }
}

Instant Booking

In addition to Scheduled Booking feature, Users can instantly book a service with the first available provider who accepts. This feature is called Instant Booking. No date or time is required — only a service type.

Graph

How It Works

  1. Customer creates an instant booking — Call PUT /customer/scheduling/new with assign: false and the desired type ID in the request body. No date or time fields are needed.

    {
      "type": "<TYPE ID>",
      "assign": false
    }
    
  2. Booking status depends on payment configuration:

    • Free service or no payment method enabled: Booking is created with PENDING_ASSIGNMENT status immediately.
    • Paid service with a payment method enabled: Booking is created with PENDING_PAYMENT status. The customer must complete payment first (using the payment object in the response). After payment, the status transitions to PENDING_ASSIGNMENT.
  3. Response includes queue information:

    {
      "result": {
        "id": "<BOOKING ID>",
        "status": "PENDING_ASSIGNMENT",
        "typeId": "<TYPE ID>",
        "queuePosition": 1,
        "estimatedWaitMinutes": 30
      }
    }
    
  4. FCM broadcast to providers — Once the booking reaches PENDING_ASSIGNMENT status (immediately for free bookings, after payment for paid bookings), all matched resource providers receive an FCM notification:

    {
      "notification": { "title": "...", "body": "..." },
      "data": {
        "via": "scheduling-system",
        "type": "NEW_PENDING_UNASSIGNED_BOOKING",
        "bookingId": "<BOOKING ID>",
        "resourceId": "<RESOURCE ID>"
      }
    }
    

    Note: FCM notifications are NOT sent while the booking is in PENDING_PAYMENT status. The broadcast only fires after payment is completed.

  5. Provider accepts the booking — A provider calls POST /management/bookings/assign with bookingId and resourceId. The booking becomes CONFIRMED and is assigned to that resource.

    {
      "bookingId": "<BOOKING ID>",
      "resourceId": "<RESOURCE ID>"
    }
    
  6. Customer receives assignment notification — An FCM notification is sent to the customer:

    {
      "notification": { "title": "...", "body": "..." },
      "data": {
        "via": "scheduling-system",
        "type": "MY_BOOKING_ASSIGNED",
        "bookingStatus": "CONFIRMED",
        "bookingId": "<BOOKING ID>"
      }
    }
    
  7. Booking is now CONFIRMED — Queue fields (queuePosition, estimatedWaitMinutes) are removed from the booking after assignment.

Assignment Timeout

Instant bookings expire if not assigned within a configured timeout. You can control this with the optional assignmentTimeout parameter (in minutes) when creating the booking:

{
  "type": "<TYPE ID>",
  "assign": false,
  "assignmentTimeout": 30
}
  • Minimum: 5 minutes (values below are clamped to 5)
  • Maximum: 180 minutes (values above are clamped to 180)
  • Default: If not provided, a system default is used.

When the timeout expires:

  • The booking status changes to REJECTED.
  • The customer receives an FCM notification:
    {
      "data": {
        "via": "scheduling-system",
        "type": "MY_BOOKING_EXPIRED",
        "bookingId": "<BOOKING ID>",
        "bookingStatus": "REJECTED"
      }
    }
    
  • Any subsequent assignment attempt returns error code BKS-110 (booking expired).

Race Condition Handling

When multiple providers try to accept the same booking simultaneously:

  • Exactly one provider succeeds (200 response with CONFIRMED status).
  • All other providers receive a 400 response with error code SCH-ALREADY_ASSIGNED.
  • The customer receives exactly one MY_BOOKING_ASSIGNED FCM notification.
  • The booking cannot be re-assigned to a different resource once assigned.

Cancel / Leave Queue

A customer can cancel an instant booking at any point:

  • Before payment: POST /customer/bookings/cancel with bookingId.
  • Before assignment (leave queue): Same endpoint. The booking is removed from the queue and remaining customers' positions are updated.
  • After assignment: Same endpoint. The confirmed booking is canceled.

End Booking

A provider can end a confirmed instant booking early using POST /management/bookings/end with bookingId. This shortens the booking duration to the actual time served. After ending, if there are other pending unassigned bookings, a new FCM broadcast is sent to available providers.

Payment Integration

Scenario Booking Status Payment Required
Free service type (no price) PENDING_ASSIGNMENT No
Paid service, no payment method enabled PENDING_ASSIGNMENT No
Paid service with payment method enabled PENDING_PAYMENTPENDING_ASSIGNMENT (after payment) Yes
Paid service with deposit PENDING_PAYMENTPENDING_ASSIGNMENT (after deposit payment) Yes (deposit amount)

The payment object in the response contains invoiceId, invoiceNumber, paymentLink, paymentWebViewLink, and amount details (subTotal, total, balance, discount).

Queue Booking

Building on the Instant Booking feature, a Queue Booking system lets customers join a virtual queue and wait for the next available provider — without selecting a specific date or time. This is ideal for walk-in clinics, service counters, or any scenario where customers wait in line remotely.

Instant Booking and Queue Booking use the same API endpoint and mechanism (assign: false). The queue features (position tracking, estimated wait, pending count) are automatically included.

Graph

How It Works

  1. Customer checks queue length — Call POST /availability/types to see available service types. Each type includes a pendingCount field showing how many customers are currently waiting in the queue.

  2. Customer joins the queue — Call PUT /customer/scheduling/new with assign: false in the request body. No date or time is required. A booking is created with PENDING_ASSIGNMENT status (or PENDING_PAYMENT if payment is required). The response includes:

    • queuePosition — the customer's position in the queue (1 = next to be served)
    • estimatedWaitMinutes — estimated wait time based on position × service duration
  3. Providers get notified — All matched resource providers receive an FCM notification (after payment is completed, if applicable):

    {
      "notification": { "title": "...", "body": "..." },
      "data": {
        "via": "scheduling-system",
        "type": "NEW_PENDING_UNASSIGNED_BOOKING",
        "bookingId": "<BOOKING ID>",
        "resourceId": "<RESOURCE ID>"
      }
    }
    
  4. Queue position updates — When another customer is served, assigned, or leaves the queue, remaining customers receive an FCM notification with their updated position:

    {
      "data": {
        "via": "scheduling-system",
        "type": "QUEUE_POSITION_UPDATED",
        "bookingId": "<BOOKING ID>",
        "queuePosition": "2",
        "estimatedWaitMinutes": "60"
      }
    }
    

    Customers can also poll GET /customer/bookings?status=PENDING_ASSIGNMENT to see their current queuePosition and estimatedWaitMinutes.

  5. Provider accepts — A provider calls POST /management/bookings/assign with bookingId and resourceId. The booking becomes CONFIRMED. The customer receives:

    {
      "data": {
        "via": "scheduling-system",
        "type": "MY_BOOKING_ASSIGNED",
        "bookingStatus": "CONFIRMED",
        "bookingId": "<BOOKING ID>"
      }
    }
    

    Remaining customers in the queue automatically receive QUEUE_POSITION_UPDATED with their new positions.

  6. Customer leaves the queue (optional) — A customer can leave the queue at any time by calling POST /customer/bookings/cancel with their bookingId. Remaining customers in the queue automatically receive updated positions via QUEUE_POSITION_UPDATED FCM notifications.

  7. Booking expiration — If a booking is not assigned within the timeout period, it expires. The customer receives a MY_BOOKING_EXPIRED FCM notification with bookingStatus: "REJECTED", and remaining customers' queue positions are updated automatically.

Resource-Scoped Queues

Queues are independent per resource. If resources A and B serve different service types, bookings for type A and type B maintain separate queue positions. This means:

  • A booking for type A gets queuePosition: 1 even if there are 5 pending bookings for type B.
  • pendingCount in /availability/types reflects the count per type across all matching resources.

Provider: View Unassigned Bookings

Providers can view their pending queue using GET /management/bookings/unassigned?resourceId=<RESOURCE ID>. This returns:

  • Only bookings whose type is compatible with the specified resource.
  • Bookings ordered by createdAt ascending (oldest first / FIFO).
  • An empty list if no unassigned bookings match.

The resourceId query parameter is required.

Example: Clinic Queue App

  1. Patient opens the app and sees available clinics and service types with pendingCount (e.g., "General Consultation — 3 people waiting").
  2. Patient taps "Join Queue" → PUT /customer/scheduling/new with assign: false.
  3. Patient sees "You are #4 in line, estimated wait: 40 minutes".
  4. As patients ahead are served, the app receives QUEUE_POSITION_UPDATED FCM notifications and updates the display.
  5. When it's the patient's turn, a doctor accepts via POST /management/bookings/assign.
  6. Patient receives MY_BOOKING_ASSIGNED notification — "A doctor has accepted your request".

FCM Notification Summary

Event Notification Type Recipient Payload
Booking reaches PENDING_ASSIGNMENT NEW_PENDING_UNASSIGNED_BOOKING All matched providers bookingId, resourceId
Provider assigns booking MY_BOOKING_ASSIGNED Customer bookingId, bookingStatus: "CONFIRMED"
Queue position changes (cancel/assign/expire) QUEUE_POSITION_UPDATED Remaining customers in queue bookingId, queuePosition, estimatedWaitMinutes
Booking expires (timeout) MY_BOOKING_EXPIRED Customer bookingId, bookingStatus: "REJECTED"

All FCM payloads include via: "scheduling-system" in the data field.

Use Cases

Doctors Appointments App

Use Customers APIs for the Patient's App and Management APIs for Doctor's App. Booking flow varies from App to App, in our use case:

  1. Patient select the clinic. using /availability/resourceCategories to fetch list of clinics.
  2. Patient fill out an optional doctors filters and hit "search" button. using /customFields/resourceFilters to fetch filters fields types and options.
  3. Patient gets a list of Doctors. using /availability/resources to fetch doctors.
  4. Patient clicks on "Book now" next to Doctor's details then select a appointment type. using /availability/types to fetch doctor's appointment types.
  5. Patient pick a date & time. using /availability/times to fetch days and times.
  6. Patient fill out appointment type's custom fields and optionaly fill pateint's uncompleted profile and finally schedule the appointment. using /customFields/bookingInfo to fetch appoitnment type's information fields and /customFields/customer for customer's information fields and /customer/scheduling/new to create an appointment.

Graph

As for Doctor App, each Doctor is registered as an Organization User with limited permissions to allow only control of a single Booking Resource. Graph

Intro

Display beautiful widgets for use on the web!

Do not forget to white list domain names in order for the widget to work through Settings page

Demo

Data Attributes

Attribute Required Description
data-app-id Yes Your application/page ID
data-type No Scheduling type ID to pre-select
data-lang No Language code (ar, en)
data-resource No Resource ID to pre-select
data-button-text No Custom button text - popup mode only (default: "Book Now")

Events

The widget dispatches custom events on the container element:

Event Description
scheduling:ready Widget is loaded and ready
scheduling:bookingComplete Booking completed successfully. If payment is required, this event is triggered after payment is completed.
scheduling:paymentFailed Payment failed

Event Data

All events include a detail property with event-specific data:

container.addEventListener('scheduling:bookingComplete', function(e) {
  console.log('Booking ID:', e.detail.bookingId);
});

Popup Booking

Use a button that opens the booking widget in a popup when clicked.

Quick Start

<div
  class="scheduling-button"
  data-app-id="<APP ID>"
  data-type="<TYPE ID>"
>
</div>

<script
  async
  src="https://FRONTEND_DOMAIN/scheduling-sdk.js"
  charset="utf-8"
></script>

Full Example

<div
  class="scheduling-button"
  data-app-id="h66w3DSEcsKlu8ReaclX"
  data-type="guvmAoJ4tH1tkOTj7VEx"
  data-lang="ar"
  data-button-text="احجز الآن"
>
</div>

<script
  async
  src="https://FRONTEND_DOMAIN/scheduling-sdk.js"
  charset="utf-8"
></script>

Custom Button

You can use your own button inside the container:

<div
  class="scheduling-button"
  data-app-id="h66w3DSEcsKlu8ReaclX"
  data-type="guvmAoJ4tH1tkOTj7VEx"
>
  <button class="my-custom-button">
    Book Appointment
  </button>
</div>

JavaScript API

Create a popup button programmatically:

SchedulingSDK.createButton({
  container: '#my-button',
  appId: 'h66w3DSEcsKlu8ReaclX',
  typeId: 'guvmAoJ4tH1tkOTj7VEx',
  lang: 'ar',
  buttonText: 'احجز الآن',
  onReady: function() {
    console.log('Widget ready');
  },
  onBookingComplete: function(data) {
    console.log('Booking completed:', data);
  },
  onPaymentFailed: function(data) {
    console.log('Payment failed:', data);
  }
});

Or open the popup directly without a button:

SchedulingSDK.open({
  appId: 'h66w3DSEcsKlu8ReaclX',
  typeId: 'guvmAoJ4tH1tkOTj7VEx',
  lang: 'ar',
  onReady: function() {
    console.log('Widget ready');
  },
  onBookingComplete: function(data) {
    console.log('Booking completed:', data);
  },
  onPaymentFailed: function(data) {
    console.log('Payment failed:', data);
  }
});

Events

See the Events section in the Introduction page for the full list of events dispatched by the widget.

const container = document.querySelector('.scheduling-button');

container.addEventListener('scheduling:bookingComplete', function(e) {
  console.log('Booking completed:', e.detail);
});

Native Widget

Embed the booking widget directly into your page as a native element.

Quick Start

<div
  class="scheduling-native"
  data-app-id="<APP ID>"
  data-type="<TYPE ID>"
>
</div>

<script
  async
  src="https://FRONTEND_DOMAIN/scheduling-sdk.js"
  charset="utf-8"
></script>

Full Example

<div
  class="scheduling-native"
  data-app-id="h66w3DSEcsKlu8ReaclX"
  data-type="guvmAoJ4tH1tkOTj7VEx"
  data-lang="ar"
>
</div>

<script
  async
  src="https://FRONTEND_DOMAIN/scheduling-sdk.js"
  charset="utf-8"
></script>

JavaScript API

You can also create widgets programmatically using the JavaScript API:

// Create a widget programmatically
SchedulingSDK.create({
  container: '#booking-widget',
  appId: 'h66w3DSEcsKlu8ReaclX',
  typeId: 'guvmAoJ4tH1tkOTj7VEx',
  lang: 'ar',
  onReady: function() {
    console.log('Widget ready');
  },
  onBookingComplete: function(data) {
    console.log('Booking completed:', data);
  },
  onPaymentFailed: function(data) {
    console.log('Payment failed:', data);
  }
});

Available Methods

Method Description
SchedulingSDK.create(options) Create a widget programmatically
SchedulingSDK.init(element) Initialize a specific container
SchedulingSDK.initAll() Initialize all containers on the page

Create Options

{
  container: '#my-widget',      // Required: selector or element
  appId: 'your-app-id',         // Required: application ID
  typeId: 'type-id',            // Optional: scheduling type ID
  lang: 'ar',                   // Optional: language code
  onReady: fn,                  // Optional: callback when widget is ready
  onBookingComplete: fn,        // Optional: callback on success
  onPaymentFailed: fn           // Optional: callback on failure
}

Events

See the Events section in the Introduction page for the full list of events dispatched by the widget.

const container = document.querySelector('.scheduling-native');

container.addEventListener('scheduling:bookingComplete', function(e) {
  console.log('Booking completed:', e.detail);
});

Intro

Embed dashboard functionality into your external systems using Admin Widgets.

Note: Admin Widgets are different from Web Widgets. Web Widgets allow your customers to book appointments on your website. Admin Widgets allow you (the tenant) to embed dashboard pages in your internal systems.

Use Cases

  • External CRM Integration: Embed appointment scheduling directly in your CRM system
  • Custom Dashboards: Add scheduling capabilities to your internal tools
  • Third-party Platforms: Integrate with other business software

How It Works

Admin Widgets use iframes to embed authenticated dashboard pages:

┌─────────────────────────────────────┐
│       Your External System          │
│  ┌───────────────────────────────┐  │
│  │    Admin Widget (iframe)      │  │
│  │                               │  │
│  │  ┌─────────────────────────┐  │  │
│  │  │   Scheduling Flow /     │  │  │
│  │  │   Availability Settings │  │  │
│  │  └─────────────────────────┘  │  │
│  └───────────────────────────────┘  │
└─────────────────────────────────────┘

Authentication

Admin Widgets require authentication via postMessage API. Your parent window must:

  1. Listen for the webview-ready message
  2. Send refresh token via postMessage
window.addEventListener('message', function(event) {
  if (event.data.type === 'webview-ready') {
    // Widget is ready, send refresh token
    event.source.postMessage({
      refreshToken: 'your-refresh-token'
    }, '*');
  }
});

Note: You can also send accessToken instead of refreshToken, but refresh tokens are recommended as they handle expiration automatically.

Security

  • Always validate the event.origin before handling messages
  • Use your organization's domain in the origin check
  • Tokens are handled securely within the iframe context
window.addEventListener('message', function(event) {
  // Validate origin
  if (event.origin !== 'https://FRONTEND_DOMAIN') {
    return;
  }
  
  // Handle messages...
});

Available Admin Widgets

Widget Description Page
Add Appointment Create new appointments Scheduling Flow
Time Rules Configure working hours and schedules Work Schedule
Off Rules Configure vacations and time off Vacations

Events

Admin Widgets dispatch events via postMessage:

Event Type Description
webview-ready Widget loaded and awaiting authentication
booking-created Appointment successfully created (Add Appointment widget)
booking-error Error occurred during booking (Add Appointment widget)

Event Data Structure

{
  type: 'booking-created',
  booking: {
    // ... booking object data
  }
}

Add Appointment

Embed the appointment scheduling flow in your external system. Supports both creating new appointments and rescheduling existing ones.

Quick Start

New Appointment

<iframe
  id="add-appointment-widget"
  src="https://FRONTEND_DOMAIN/webviews/add-appointment?orgId=YOUR_ORG_ID&lang=en"
  style="width: 100%; height: 600px; border: none;"
></iframe>

<script>
window.addEventListener('message', function(event) {
  const iframe = document.getElementById('add-appointment-widget');
  
  if (event.data.type === 'webview-ready') {
    // Send refresh token to the widget
    iframe.contentWindow.postMessage({
      refreshToken: 'your-refresh-token'
    }, '*');
  }
  
  if (event.data.type === 'booking-created') {
    console.log('Booking created:', event.data.booking);
  }
});
</script>

Reschedule Appointment

<iframe
  id="reschedule-widget"
  src="https://FRONTEND_DOMAIN/webviews/add-appointment?orgId=YOUR_ORG_ID&lang=en&rescheduleBookingId=BOOKING_ID"
  style="width: 100%; height: 600px; border: none;"
></iframe>

<script>
window.addEventListener('message', function(event) {
  const iframe = document.getElementById('reschedule-widget');
  
  if (event.data.type === 'webview-ready') {
    iframe.contentWindow.postMessage({
      refreshToken: 'your-refresh-token'
    }, '*');
  }
  
  if (event.data.type === 'booking-rescheduled') {
    console.log('Booking rescheduled:', event.data.booking);
  }
});
</script>

URL Parameters

Parameter Required Description
orgId Yes Your organization ID
lang No Language code (ar, en). Defaults to ar.
rescheduleBookingId No Booking ID to reschedule. When provided, the widget enters reschedule mode.
schedulingTypeId No Pre-selects a specific service/type by ID, skipping the type selection step. Only works when the website is configured with "select type first" or the booking policy doesn't require resource specification.

Full Example

<!DOCTYPE html>
<html>
<head>
  <title>Book Appointment</title>
  <style>
    .widget-container {
      max-width: 800px;
      margin: 0 auto;
      padding: 20px;
    }
    .widget-iframe {
      width: 100%;
      height: 700px;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
    }
    .status {
      padding: 10px;
      margin-bottom: 10px;
      border-radius: 4px;
    }
    .status.success { background: #d4edda; color: #155724; }
    .status.error { background: #f8d7da; color: #721c24; }
    .status.loading { background: #fff3cd; color: #856404; }
  </style>
</head>
<body>
  <div class="widget-container">
    <h1>Book an Appointment</h1>
    
    <div id="status" class="status loading">Loading widget...</div>
    
    <!-- New appointment -->
    <iframe
      id="add-appointment-widget"
      class="widget-iframe"
      src="https://FRONTEND_DOMAIN/webviews/add-appointment?orgId=abc123&lang=en"
    ></iframe>

    <!-- Or reschedule an existing appointment -->
    <!--
    <iframe
      id="add-appointment-widget"
      class="widget-iframe"
      src="https://FRONTEND_DOMAIN/webviews/add-appointment?orgId=abc123&lang=en&rescheduleBookingId=booking456"
    ></iframe>
    -->
  </div>

  <script>
    const iframe = document.getElementById('add-appointment-widget');
    const status = document.getElementById('status');
    
    // Your refresh token (get from your auth system)
    const refreshToken = 'YOUR_REFRESH_TOKEN';
    
    window.addEventListener('message', function(event) {
      // Handle widget events
      switch (event.data.type) {
        case 'webview-ready':
          status.textContent = 'Widget ready';
          status.className = 'status';
          
          // Send refresh token
          iframe.contentWindow.postMessage({
            refreshToken: refreshToken
          }, '*');
          break;
          
        case 'booking-created':
          status.textContent = 'Appointment booked successfully!';
          status.className = 'status success';
          console.log('Booking details:', event.data.booking);
          break;
          
        case 'booking-rescheduled':
          status.textContent = 'Appointment rescheduled successfully!';
          status.className = 'status success';
          console.log('Rescheduled booking:', event.data.booking);
          break;
      }
    });
  </script>
</body>
</html>

Events

Event Type Description Data
webview-ready Widget loaded and ready {}
booking-created New appointment created successfully { booking }
booking-rescheduled Appointment rescheduled successfully { booking }

Styling

The widget respects your organization's theme settings. To customize the iframe appearance:

/* Container styling */
.widget-iframe {
  width: 100%;
  min-height: 600px;
  max-height: 80vh;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .widget-iframe {
    height: 100vh;
    border-radius: 0;
  }
}

Time Rules & Vacations

Embed time rules and vacation configuration in your external system.

Overview

Availability configuration is split into two widgets:

Widget Description Use Case
Time Rules Configure working hours and schedules Set when resources are available for bookings
Off Rules Configure vacations and time off Set when resources are unavailable

Time Rules Widget

Configure resource working hours, breaks, and recurring schedules.

Quick Start

<iframe
  id="time-rules-widget"
  src="https://FRONTEND_DOMAIN/settings/timeRules?webview=true&id=RESOURCE_ID&orgId=YOUR_ORG_ID&lang=en"
  style="width: 100%; height: 700px; border: none;"
></iframe>

<script>
window.addEventListener('message', function(event) {
  const iframe = document.getElementById('time-rules-widget');
  
  if (event.data.type === 'webview-ready') {
    iframe.contentWindow.postMessage({
      refreshToken: 'your-refresh-token'
    }, '*');
  }
});
</script>

URL Parameters

Parameter Required Description
webview Yes Must be true to enable webview mode
id Yes Resource ID to configure
orgId Yes Your organization ID
lang No Language code (ar, en)

Features

  • Week Day Configuration: Set working hours for each day of the week
  • Multiple Time Slots: Configure multiple work periods per day (e.g., morning and afternoon shifts)
  • Date Range Rules: Set different schedules for specific date ranges
  • Advanced Rules: Configure complex recurring patterns (requires subscription)

Off Rules Widget

Configure vacations, holidays, and time off periods.

Quick Start

<iframe
  id="off-rules-widget"
  src="https://FRONTEND_DOMAIN/settings/offRules?webview=true&id=RESOURCE_ID&orgId=YOUR_ORG_ID&lang=en"
  style="width: 100%; height: 600px; border: none;"
></iframe>

<script>
window.addEventListener('message', function(event) {
  const iframe = document.getElementById('off-rules-widget');
  
  if (event.data.type === 'webview-ready') {
    iframe.contentWindow.postMessage({
      refreshToken: 'your-refresh-token'
    }, '*');
  }
});
</script>

URL Parameters

Parameter Required Description
webview Yes Must be true to enable webview mode
id Yes Resource ID to configure
orgId Yes Your organization ID
lang No Language code (ar, en)

Features

  • Date Range Selection: Set vacation periods with start and end dates
  • Recurring Off Days: Configure recurring time off (e.g., every Friday)
  • Holiday Management: Add specific holiday dates
  • Advanced Patterns: Complex off-time rules (requires subscription)

Full Integration Example

<!DOCTYPE html>
<html>
<head>
  <title>Resource Availability Configuration</title>
  <style>
    .tabs { display: flex; gap: 10px; margin-bottom: 20px; }
    .tab { padding: 10px 20px; cursor: pointer; border: 1px solid #ddd; border-radius: 4px; }
    .tab.active { background: #007bff; color: white; border-color: #007bff; }
    .widget-iframe { width: 100%; height: 600px; border: 1px solid #e0e0e0; border-radius: 8px; }
    .hidden { display: none; }
  </style>
</head>
<body>
  <h1>Configure Availability</h1>
  
  <div class="tabs">
    <button class="tab active" onclick="showWidget('time-rules')">Working Hours</button>
    <button class="tab" onclick="showWidget('off-rules')">Vacations</button>
  </div>
  
  <iframe
    id="time-rules-widget"
    class="widget-iframe"
    src="https://FRONTEND_DOMAIN/settings/timeRules?webview=true&id=res456&orgId=abc123&lang=en"
  ></iframe>
  
  <iframe
    id="off-rules-widget"
    class="widget-iframe hidden"
    src="https://FRONTEND_DOMAIN/settings/offRules?webview=true&id=res456&orgId=abc123&lang=en"
  ></iframe>

  <script>
    const refreshToken = 'YOUR_REFRESH_TOKEN';
    
    function showWidget(type) {
      document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
      document.querySelectorAll('.widget-iframe').forEach(w => w.classList.add('hidden'));
      
      event.target.classList.add('active');
      document.getElementById(type + '-widget').classList.remove('hidden');
    }
    
    window.addEventListener('message', function(event) {
      if (event.data.type === 'webview-ready') {
        event.source.postMessage({ refreshToken: refreshToken }, '*');
      }
    });
  </script>
</body>
</html>

Authentication

Everything about your Authentication

Request Otp

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
method
required
string

sms, whatsapp, email

phoneNumber
string
email
string
isOrgMember
boolean
Default: false

for org member/admins value is true in order to use Management APIs. for customers it must be false

turnstileToken
string

Cloudflare Turnstile verification token. Required only when the server has Cloudflare Turnstile configured.

recaptchaToken
string

Google reCAPTCHA v3 verification token. Required only when the server has Google reCAPTCHA configured.

Responses

Request samples

Content type
application/json
{
  • "method": "string",
  • "phoneNumber": "string",
  • "email": "string",
  • "isOrgMember": false,
  • "turnstileToken": "string",
  • "recaptchaToken": "string"
}

Verify Otp

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
method
required
string

sms, whatsapp, email

phoneNumber
string
email
string
isOrgMember
boolean
Default: false

for org member/admins value is true in order to use Management APIs. for customers it must be false

turnstileToken
string

Cloudflare Turnstile verification token. Required only when the server has Cloudflare Turnstile configured.

recaptchaToken
string

Google reCAPTCHA v3 verification token. Required only when the server has Google reCAPTCHA configured.

code
string

Response samples

Content type
application/json
{
  • "method": "string",
  • "phoneNumber": "string",
  • "email": "string",
  • "isOrgMember": false,
  • "turnstileToken": "string",
  • "recaptchaToken": "string",
  • "code": "string"
}

Get Access Token

Authorizations:
bearerAuthapiKey
query Parameters
refreshToken
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
refreshToken
string
accessToken
string
accessTokenExpiresAt
string
user
object

Response samples

Content type
application/json
{
  • "refreshToken": "string",
  • "accessToken": "string",
  • "accessTokenExpiresAt": "string",
  • "user": { }
}

Availability

Everything about your Availability

List Available Resources

Get a list of available resources with optional filtering

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
object

Key-value pairs where the key is the field ID and the value filters which resources are available. Fetch available fields from GET /customFields/resourceFilters?type={typeId}.

These fields have info.filterResources: true and are used to match against resource custom data.

Value format depends on the field type:

Field Type Value Format Example
text string "some filter value"
options string or array of strings (for multi-value filtering) "general" or ["general", "pediatrics"]
showAll
boolean
Default: false

Whether to show all resources including those not available for web booking

object
type
string

Booking type ID to filter by

limit
number

Number of items to return per page

nextPageToken
string

Token for pagination

sortBy
string

Field to sort by

sortByDirection
string
Enum: "asc" "desc"

Sort direction

Responses

Response Schema: application/json
Array of objects (ResourceBase)
object (Pagination)

Pagination information for list responses

Request samples

Content type
application/json
{
  • "resourceFiltersCustomFields": {
    },
  • "showAll": false,
  • "resourceFilters": {
    },
  • "type": "string",
  • "limit": 10,
  • "nextPageToken": "string",
  • "sortBy": "createdAt",
  • "sortByDirection": "desc"
}

Response samples

Content type
application/json
{}

Get Resource Details

Get detailed information about a specific resource

path Parameters
resourceId
required
string

Resource ID

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (ResourceBase)

Base properties for a booking resource

Response samples

Content type
application/json
{}

List Available Resource Categories

Get a list of resource categories with their associated resources

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
object

Key-value pairs where the key is the field ID and the value filters which resources are available. Fetch available fields from GET /customFields/resourceFilters?type={typeId}.

These fields have info.filterResources: true and are used to match against resource custom data.

Value format depends on the field type:

Field Type Value Format Example
text string "some filter value"
options string or array of strings (for multi-value filtering) "general" or ["general", "pediatrics"]
showAll
boolean
Default: false

Whether to show all resources including those not available for web booking

limit
number

Number of items to return per page

nextPageToken
string

Token for pagination

Responses

Response Schema: application/json
Array of objects
object (Pagination)

Pagination information for list responses

Request samples

Content type
application/json
{
  • "resourceFiltersCustomFields": {
    },
  • "showAll": false,
  • "limit": 10,
  • "nextPageToken": "string"
}

Response samples

Content type
application/json
{}

List Available Booking Types

Get a list of booking types with optional filtering

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
object

Key-value pairs where the key is the field ID and the value filters which resources are available. Fetch available fields from GET /customFields/resourceFilters?type={typeId}.

These fields have info.filterResources: true and are used to match against resource custom data.

Value format depends on the field type:

Field Type Value Format Example
text string "some filter value"
options string or array of strings (for multi-value filtering) "general" or ["general", "pediatrics"]
showAll
boolean
Default: false

Whether to show all resources including those not available for web booking

object
type
string

Booking type ID to filter by

limit
number

Number of items to return per page

nextPageToken
string

Token for pagination

Responses

Response Schema: application/json
Array of objects (BookingTypeBase)
object (Pagination)

Pagination information for list responses

Request samples

Content type
application/json
{
  • "resourceFiltersCustomFields": {
    },
  • "showAll": false,
  • "resourceFilters": {
    },
  • "type": "string",
  • "limit": 10,
  • "nextPageToken": "string"
}

Response samples

Content type
application/json
{}

List Available Times

Get available booking time slots for a specific type

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
type
required
string

ID of the booking type

from
string <date-time>

Start date for availability search. The time component is ignored; the search starts from the beginning of the specified day (midnight).

to
string <date-time>

End date for availability search. Days up to and including this date are returned.

showAll
boolean
Default: false

Whether to show all times including those not available for web booking

limit
number

Limits the number of days returned

showInBetweenSlots
boolean

Whether to show slots that don't fall on standard time boundaries

showOclock
boolean
Default: true

Whether to show slots on the hour (e.g., 1:00, 2:00)

showHalfHour
boolean
Default: false

Whether to show slots on the half hour (e.g., 1:30, 2:30)

showThirdHour
boolean
Default: false

Whether to show slots on the third hour (e.g., 1:20, 1:40)

showQuarterHour
boolean
Default: false

Whether to show slots on the quarter hour (e.g., 1:15, 1:45)

showSixthHour
boolean
Default: false

Whether to show slots on the sixth hour (e.g., 1:10, 1:50)

showAfterMidnight
boolean
Default: true

Whether to show slots after midnight

showFixedTimes
string

Comma-separated list of fixed times in military format (e.g., 800,1200)

rescheduleBookingId
string

Optional booking ID to reschedule. When provided, the time slots occupied by this booking will appear as available in the results, allowing the user to see their current booking time alongside other open slots.

object
object

Key-value pairs where the key is the field ID and the value filters which resources are available. Fetch available fields from GET /customFields/resourceFilters?type={typeId}.

These fields have info.filterResources: true and are used to match against resource custom data.

Value format depends on the field type:

Field Type Value Format Example
text string "some filter value"
options string or array of strings (for multi-value filtering) "general" or ["general", "pediatrics"]
object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Fetch available fields from GET /customFields/timeAdjusters?type={typeId}.

These fields affect the booking's duration and/or price:

  • number fields with minutes/price: each unit adds the specified minutes/price
  • options fields where options have minutes/price: the selected option's minutes/price are added

Value format depends on the field type:

Field Type Value Format Example
number number 3
options string (the selected option's value) "deep_cleaning"

Responses

Response Schema: application/json
Array of objects
object

Request samples

Content type
application/json
{
  • "type": "string",
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "showAll": false,
  • "limit": 0,
  • "showInBetweenSlots": true,
  • "showOclock": true,
  • "showHalfHour": false,
  • "showThirdHour": false,
  • "showQuarterHour": false,
  • "showSixthHour": false,
  • "showAfterMidnight": true,
  • "showFixedTimes": "string",
  • "rescheduleBookingId": "string",
  • "resourceFilters": {
    },
  • "resourceFiltersCustomFields": {
    },
  • "timeAdjustersCustomFields": {
    }
}

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "pagination": {
    }
}

Custom Fields

Public endpoints for retrieving custom field definitions.

Custom fields are categorized into:

  • Resource Filters: Fields that filter available resources
  • Time Adjusters: Fields that affect booking duration
  • Booking Info: Fields for additional appointment information
  • Customer Info: Fields for customer profile information

List Resource Filters Custom Fields

Get custom fields that are used to filter available resources.

These fields have info.filterResources: true and allow customers to narrow down resource selection based on their preferences (e.g., selecting a doctor specialty, choosing a specific skill level, etc.).

When to use: Call this endpoint before showing the resource/time selection to collect filter criteria from the customer. Pass the collected values in resourceFiltersCustomFields when querying availability.

Example Flow:

  1. Fetch resource filter fields
  2. Display filter options to customer
  3. Customer selects "Pediatrics" specialty
  4. Pass { "specialty": "pediatrics" } to availability endpoint
  5. Only resources matching that specialty are shown
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (FormField)

Response samples

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

List Time Adjusters Custom Fields

Get custom fields that affect booking duration based on selected values.

These are fields that have:

  • minutes property (for number fields: adds time per unit)
  • Options with minutes property (for select fields: adds time based on selection)

When to use: Call this endpoint to get fields that should be collected BEFORE showing available time slots, as they affect the booking duration and therefore which time slots are available.

Example Flow:

  1. Customer selects a booking type (e.g., "Hair Styling")
  2. Fetch time adjuster fields for that type
  3. Customer selects "Deep Conditioning" (+30 min) and "2 guests" (×15 min each)
  4. Total additional time = 30 + (2 × 15) = 60 minutes
  5. Pass values to availability endpoint to get correct time slots

Note: The endpoint requires a type parameter to filter fields relevant to the selected booking type.

query Parameters
type
required
string

The booking type ID to get time adjuster fields for

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (FormField)

Response samples

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

List Booking Information Custom Fields

Get custom fields for collecting additional appointment information.

These are fields that do NOT filter resources or adjust time, but collect supplementary information about the booking (e.g., reason for visit, special requests, notes).

When to use: Call this endpoint AFTER the customer has selected their time slot, to collect any remaining information before completing the booking.

Example Flow:

  1. Customer selects time slot
  2. Fetch booking info fields for the selected type
  3. Display form with fields like "Reason for Visit", "Special Requests"
  4. Customer fills in the information
  5. Pass values in bookingInfoCustomFields when creating the booking

Note: The endpoint requires a type parameter to filter fields relevant to the selected booking type.

query Parameters
type
required
string

The booking type ID to get booking info fields for

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (FormField)

Response samples

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

List Customer Custom Fields

Get custom fields for collecting customer profile information.

These fields collect information about the customer themselves, not about a specific booking. Includes core fields like phone number, email, and name, plus any custom fields added by the organization.

Core Fields:

  • phoneNumber: Customer's phone number (required for authentication)
  • firstName: Customer's first name
  • lastName: Customer's last name
  • email: Customer's email address

When to use: Call this endpoint when collecting customer information during checkout or registration.

Note: At least one of phone number or email must be required and enabled to ensure customer identification.

query Parameters
type
string

Optional booking type ID (not commonly used for customer fields)

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (FormField)

Response samples

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

Customer Scheduling

Everything about your Customer's Scheduling

Create Confirmed/Unconfirmed Booking

Schedule New Confirmed Booking or Unconfirmed Booking Request depending on the policy Organization's admins have set.

for example if admins have activated 'auto confirm' on the specified booking type, it will be CONFIRMED. another example is when specified booking type has a price and a payment gateway is linked, it will return PENDING_PAYMENT status. if either case is not true then it will be on PENDING_APPROVAL status

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
date
string

Day's Date e.g. 2023-01-11

time
number

in military time format e.g. 0 means 12:00 am and 1820 means 6:20 pm

type
string

Scheduling Type ID

object
object

Key-value pairs where the key is the field ID and the value filters which resources are available. Fetch available fields from GET /customFields/resourceFilters?type={typeId}.

These fields have info.filterResources: true and are used to match against resource custom data.

Value format depends on the field type:

Field Type Value Format Example
text string "some filter value"
options string or array of strings (for multi-value filtering) "general" or ["general", "pediatrics"]
showAll
boolean
Default: false

Whether to show all resources including those not available for web booking

object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Fetch available fields from GET /customFields/bookingInfo?type={typeId}.

Value format depends on the field type:

Field Type Value Format Example
text string "John Doe"
paragraph string "Multi-line text..."
number number 5
options string (the selected option's value) "premium"
location object with position and address See below
photo object with data (base64) and fileName See below
photos array of photo objects See below
file object with data (base64) and fileName See below
files array of file objects See below

Location value:

{
  "position": { "latitude": 24.7136, "longitude": 46.6753 },
  "address": "Riyadh, Saudi Arabia"
}

Photo value (photo type — single object, photos type — array of objects):

{
  "id": 4829371,
  "fileName": "image.jpg",
  "data": "data:image/jpeg;base64,/9j/4AAQ..."
}

File value (file type — single object, files type — array of objects):

{
  "id": 5928471,
  "fileName": "document.pdf",
  "data": "data:application/pdf;base64,JVBERi..."
}

Note: For photo/photos/file/files types, the data property must be a base64 data URL in the format data:{mimeType};base64,{base64Content}. The server will upload the file and replace data with permanent URLs.

object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Fetch available fields from GET /customFields/timeAdjusters?type={typeId}.

These fields affect the booking's duration and/or price:

  • number fields with minutes/price: each unit adds the specified minutes/price
  • options fields where options have minutes/price: the selected option's minutes/price are added

Value format depends on the field type:

Field Type Value Format Example
number number 3
options string (the selected option's value) "deep_cleaning"

Responses

Response Schema: application/json
object (Booking)

Request samples

Content type
application/json
{
  • "date": "string",
  • "time": 0,
  • "type": "string",
  • "resourceFilters": {
    },
  • "resourceFiltersCustomFields": {
    },
  • "showAll": false,
  • "bookingInfoCustomFields": {
    },
  • "timeAdjustersCustomFields": {
    }
}

Response samples

Content type
application/json
{}

My Bookings

Everything about your Customer's Bookings

Get My Bookings

Authorizations:
bearerAuthapiKey
query Parameters
from
string <date-time>
to
string <date-time>
resource
string
status
string

statuses separated by comma: CONFIRMED,CANCELED,PENDING_APPROVAL

includes
string

Include related data, separated by comma: customer,type,resource,invoice

dateType
string
Default: "dateTime"
Enum: "createdAt" "dateTime"

Type of date to filter by

orderDirection
string
Default: "desc"
Enum: "asc" "desc"

Sorting direction for results

limit
integer
Default: 10

Number of records to return

nextPageToken
string

Token for pagination

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (Booking)
object (Pagination)

Pagination information for list responses

Response samples

Content type
application/json
{}

Get My Booking By ID

Authorizations:
bearerAuthapiKey
path Parameters
bookingId
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response samples

Content type
application/json
{}

Cancel My Booking

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
bookingId
string
reason
string

Request samples

Content type
application/json
{
  • "bookingId": "string",
  • "reason": "string"
}

My Profile

Everything about your Customer's Profile

Get My Profile

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object

Response samples

Content type
application/json
{
  • "result": {
    }
}

Update My Profile

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
phone
string
email
string
firstName
string
lastName
string
note
string
object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Only include this property when updating custom fields.

Responses

Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "phone": "string",
  • "email": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "note": "string",
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

My Invoices

Everything about your Customer's Invoices

Get My Invoices

Authorizations:
bearerAuthapiKey
query Parameters
nextPageToken
string

for pagination

limit
string

limit for returned results

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (Invoice)
object (Pagination)

Pagination information for list responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "pagination": {
    }
}

Get My Invoice By ID

Authorizations:
bearerAuthapiKey
path Parameters
invoiceId
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

Manage Resources

Everything about your Resources

List Resources

Get all resources for the current page with pagination

Authorizations:
bearerAuthapiKey
query Parameters
limit
integer
Default: 10

Number of resources to return

nextPageToken
string

Token for pagination

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (ResourceForManagement)
object (Pagination)

Pagination information for list responses

Response samples

Content type
application/json
{}

Create New Resource

Create a new resource for the current page

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
id
string

Unique identifier for the resource

name
string

Name of the resource (localized based on the requested language)

object (Translation)

Multilingual translations for the resource name

on
boolean

Whether the resource is currently active and available for booking

description
string

Description of the resource (localized based on the requested language)

object (Translation)

Multilingual translations for the resource description

category
string

Category the resource belongs to

object (Photo)

Primary photo for the resource

Array of objects (Photo)

Collection of photos associated with the resource

bookFromWebsite
boolean

Whether this resource can be booked from the website

activated
boolean

Whether the resource is activated in the system

meta
object

Additional metadata for the resource

types
Array of strings

Set List of booking types' ids available for this resource

providerEmail
string

Provider email address (Only for setting provider using POST & PUT, not returned in GET)

providerPhone
string

Provider phone number (Only for setting provider using POST & PUT, not returned in GET)

Responses

Response Schema: application/json
object (ResourceForManagement)

Base properties for a booking resource

Request samples

Content type
application/json
{
  • "id": "res_12345abcde",
  • "name": "Dr. Sarah Johnson",
  • "name_translations": {
    },
  • "on": true,
  • "description": "Specialist in pediatric dentistry with 10 years of experience",
  • "description_translations": {
    },
  • "category": "doctors",
  • "photo": {
    },
  • "photos": [
    ],
  • "bookFromWebsite": true,
  • "activated": true,
  • "meta": { },
  • "types": [
    ],
  • "providerEmail": "string",
  • "providerPhone": "string"
}

Response samples

Content type
application/json
{}

Get My Resources

Get all resources where the authenticated user is the provider

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (ResourceForManagement)

Response samples

Content type
application/json
{}

Get Resources With Confirmed Appointment Viewing Permission

Get all active resources that the authenticated user has permission to view confirmed appointments for

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (ResourceForManagement)

Response samples

Content type
application/json
{}

Get Resources With Request Viewing Permission

Get all active resources that the authenticated user has permission to view booking requests for

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (ResourceForManagement)

Response samples

Content type
application/json
{}

Get Resource Details

Get detailed information about a specific resource

Authorizations:
bearerAuthapiKey
path Parameters
resourceId
required
string

Resource ID

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (ResourceForManagement)

Base properties for a booking resource

Response samples

Content type
application/json
{}

Update Resource

Update an existing resource

Authorizations:
bearerAuthapiKey
path Parameters
resourceId
required
string

Resource ID

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
id
string

Unique identifier for the resource

name
string

Name of the resource (localized based on the requested language)

object (Translation)

Multilingual translations for the resource name

on
boolean

Whether the resource is currently active and available for booking

description
string

Description of the resource (localized based on the requested language)

object (Translation)

Multilingual translations for the resource description

category
string

Category the resource belongs to

object (Photo)

Primary photo for the resource

Array of objects (Photo)

Collection of photos associated with the resource

bookFromWebsite
boolean

Whether this resource can be booked from the website

activated
boolean

Whether the resource is activated in the system

meta
object

Additional metadata for the resource

types
Array of strings

Set List of booking types' ids available for this resource

providerEmail
string

Provider email address (Only for setting provider using POST & PUT, not returned in GET)

providerPhone
string

Provider phone number (Only for setting provider using POST & PUT, not returned in GET)

Responses

Response Schema: application/json
object (ResourceForManagement)

Base properties for a booking resource

Request samples

Content type
application/json
{
  • "id": "res_12345abcde",
  • "name": "Dr. Sarah Johnson",
  • "name_translations": {
    },
  • "on": true,
  • "description": "Specialist in pediatric dentistry with 10 years of experience",
  • "description_translations": {
    },
  • "category": "doctors",
  • "photo": {
    },
  • "photos": [
    ],
  • "bookFromWebsite": true,
  • "activated": true,
  • "meta": { },
  • "types": [
    ],
  • "providerEmail": "string",
  • "providerPhone": "string"
}

Response samples

Content type
application/json
{}

Delete Resource

Delete a resource and its associated managed types

Authorizations:
bearerAuthapiKey
path Parameters
resourceId
required
string

Resource ID

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
message
string

Response samples

Content type
application/json
{
  • "message": "string"
}

Manage Types

Everything about your Booking Types

List Booking Types

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (BookingTypeForManagement)
object (Pagination)

Pagination information for list responses

Response samples

Content type
application/json
{}

Create New Booking Type

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
name
string

Name of the booking type

object (Translation)

Multilingual translations

description
string

Description of the booking type

object (Translation)

Multilingual translations

minutes
number

Duration in minutes

leaveMinutesBefore
number

Buffer time before booking

leaveMinutesAfter
number

Buffer time after booking

category
string

Category the booking type belongs to

color
string

Color code for displaying the booking type

on
boolean

Whether the booking type is active

price
string

Price with format d+.d{2}

oldPrice
string

Old price with format d+.d{2}

priceIncrease
string

Price increase percentage

priceIncreaseDays
number

Days for price increase

depositAmount
string

Deposit amount with format d+.d{2}

depositPercentage
string

Deposit percentage with format d+.d{2}

schedule
object

Availability schedule

object (MechanismTimeOptions)

Configuration options for time slot display and selection

Array of objects (Photo)

Photos associated with the booking type

autoConfirm
boolean

Whether bookings are auto-confirmed

paymentMethods
Array of strings
Items Enum: "manual" "creditCard" "tabby" "tamara"

Available payment methods

bookFromWebsite
boolean

Whether the type can be booked from website

Responses

Response Schema: application/json
object (BookingTypeForManagement)

Properties for creating or updating a booking type

Request samples

Content type
application/json
{
  • "name": "string",
  • "name_translations": {
    },
  • "description": "string",
  • "description_translations": {
    },
  • "minutes": 0,
  • "leaveMinutesBefore": 0,
  • "leaveMinutesAfter": 0,
  • "category": "string",
  • "color": "string",
  • "on": true,
  • "price": "string",
  • "oldPrice": "string",
  • "priceIncrease": "string",
  • "priceIncreaseDays": 0,
  • "depositAmount": "string",
  • "depositPercentage": "string",
  • "schedule": { },
  • "timeOptions": {
    },
  • "photos": [
    ],
  • "autoConfirm": true,
  • "paymentMethods": [
    ],
  • "bookFromWebsite": true
}

Response samples

Content type
application/json
{}

Get Booking Type Details

Authorizations:
bearerAuthapiKey
path Parameters
id
required
string

Booking type ID

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (BookingTypeForManagement)

Properties for creating or updating a booking type

Response samples

Content type
application/json
{}

Update Booking Type

Authorizations:
bearerAuthapiKey
path Parameters
id
required
string

Booking type ID

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
name
string

Name of the booking type

object (Translation)

Multilingual translations

description
string

Description of the booking type

object (Translation)

Multilingual translations

minutes
number

Duration in minutes

leaveMinutesBefore
number

Buffer time before booking

leaveMinutesAfter
number

Buffer time after booking

category
string

Category the booking type belongs to

color
string

Color code for displaying the booking type

on
boolean

Whether the booking type is active

price
string

Price with format d+.d{2}

oldPrice
string

Old price with format d+.d{2}

priceIncrease
string

Price increase percentage

priceIncreaseDays
number

Days for price increase

depositAmount
string

Deposit amount with format d+.d{2}

depositPercentage
string

Deposit percentage with format d+.d{2}

schedule
object

Availability schedule

object (MechanismTimeOptions)

Configuration options for time slot display and selection

Array of objects (Photo)

Photos associated with the booking type

autoConfirm
boolean

Whether bookings are auto-confirmed

paymentMethods
Array of strings
Items Enum: "manual" "creditCard" "tabby" "tamara"

Available payment methods

bookFromWebsite
boolean

Whether the type can be booked from website

Responses

Response Schema: application/json
object (BookingTypeForManagement)

Properties for creating or updating a booking type

Request samples

Content type
application/json
{
  • "name": "string",
  • "name_translations": {
    },
  • "description": "string",
  • "description_translations": {
    },
  • "minutes": 0,
  • "leaveMinutesBefore": 0,
  • "leaveMinutesAfter": 0,
  • "category": "string",
  • "color": "string",
  • "on": true,
  • "price": "string",
  • "oldPrice": "string",
  • "priceIncrease": "string",
  • "priceIncreaseDays": 0,
  • "depositAmount": "string",
  • "depositPercentage": "string",
  • "schedule": { },
  • "timeOptions": {
    },
  • "photos": [
    ],
  • "autoConfirm": true,
  • "paymentMethods": [
    ],
  • "bookFromWebsite": true
}

Response samples

Content type
application/json
{}

Delete Booking Type

Authorizations:
bearerAuthapiKey
path Parameters
id
required
string

Booking type ID

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
message
string

Response samples

Content type
application/json
{
  • "message": "string"
}

Manage Customers

Everything about your Customers

List Customers

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (CustomerBase)
object (Pagination)

Pagination information for list responses

Response samples

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

Get Customer

Authorizations:
bearerAuthapiKey
path Parameters
customerId
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (CustomerBase)

Response samples

Content type
application/json
{
  • "result": {
    }
}

Update Customer

Authorizations:
bearerAuthapiKey
path Parameters
customerId
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
phone
string
email
string
firstName
string
lastName
string
note
string
object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Only include this property when updating custom fields.

Responses

Request samples

Content type
application/json
{
  • "phone": "string",
  • "email": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "note": "string",
  • "data": {
    }
}

Manage Bookings

Everything about your Bookings

List Bookings

Authorizations:
bearerAuthapiKey
query Parameters
from
string
to
string
resources
string
status
string
customerId
string
nextPageToken
string
includes
string

Include related data, separated by comma

dateType
string
Default: "dateTime"
Enum: "createdAt" "dateTime"

Type of date to filter by

orderDirection
string
Default: "desc"
Enum: "asc" "desc"

Sorting direction for results

limit
integer
Default: 100

Number of records to return

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (Booking)
object (Pagination)

Pagination information for list responses

Response samples

Content type
application/json
{}

Get Booking

Authorizations:
bearerAuthapiKey
path Parameters
bookingId
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (Booking)

Response samples

Content type
application/json
{}

Cancel Booking

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
bookingId
string
reason
string

Request samples

Content type
application/json
{
  • "bookingId": "string",
  • "reason": "string"
}

Assign A resource to Booking

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
bookingId
string
resourceId
string

Request samples

Content type
application/json
{
  • "bookingId": "string",
  • "resourceId": "string"
}

Manage Scheduling

Everything about your Scheduling

Create Confirmed Booking

Schedule New Confirmed Booking or Unconfirmed Booking Request

Rescheduling: To reschedule an existing booking, include the rescheduleBookingId parameter with the ID of the booking you want to reschedule. The existing booking will be cancelled and a new booking will be created with the new date/time specified.

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
date
string

Day's Date e.g. 2023-01-11

time
number

in military time format e.g. 0 means 12:00 am and 1820 means 6:20 pm

type
string

Scheduling Type ID

object
object

Key-value pairs where the key is the field ID and the value filters which resources are available. Fetch available fields from GET /customFields/resourceFilters?type={typeId}.

These fields have info.filterResources: true and are used to match against resource custom data.

Value format depends on the field type:

Field Type Value Format Example
text string "some filter value"
options string or array of strings (for multi-value filtering) "general" or ["general", "pediatrics"]
showAll
boolean
Default: false

Whether to show all resources including those not available for web booking

object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Fetch available fields from GET /customFields/bookingInfo?type={typeId}.

Value format depends on the field type:

Field Type Value Format Example
text string "John Doe"
paragraph string "Multi-line text..."
number number 5
options string (the selected option's value) "premium"
location object with position and address See below
photo object with data (base64) and fileName See below
photos array of photo objects See below
file object with data (base64) and fileName See below
files array of file objects See below

Location value:

{
  "position": { "latitude": 24.7136, "longitude": 46.6753 },
  "address": "Riyadh, Saudi Arabia"
}

Photo value (photo type — single object, photos type — array of objects):

{
  "id": 4829371,
  "fileName": "image.jpg",
  "data": "data:image/jpeg;base64,/9j/4AAQ..."
}

File value (file type — single object, files type — array of objects):

{
  "id": 5928471,
  "fileName": "document.pdf",
  "data": "data:application/pdf;base64,JVBERi..."
}

Note: For photo/photos/file/files types, the data property must be a base64 data URL in the format data:{mimeType};base64,{base64Content}. The server will upload the file and replace data with permanent URLs.

object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Fetch available fields from GET /customFields/timeAdjusters?type={typeId}.

These fields affect the booking's duration and/or price:

  • number fields with minutes/price: each unit adds the specified minutes/price
  • options fields where options have minutes/price: the selected option's minutes/price are added

Value format depends on the field type:

Field Type Value Format Example
number number 3
options string (the selected option's value) "deep_cleaning"
note
string

Optional note for the booking

rescheduleBookingId
string

Optional. Provide an existing booking ID to reschedule that booking to the new date/time specified. When provided, the existing booking will be cancelled and a new booking will be created with the new schedule.

object

Need to provide either customer's phone or email or ID

assign
boolean
Default: true

When value is true a resource will be assigned immediately. it should always be true unless you want to use instant booking feature. Refer to Instant Booking section in the docs.

Responses

Response Schema: application/json
object (Booking)

Request samples

Content type
application/json
Example
{
  • "date": "2023-01-11",
  • "time": 1800,
  • "type": "l68eESvkweJ4fkmn2Bbm",
  • "customerIdentifier": {
    },
  • "resourceFilters": {
    },
  • "note": "Regular appointment"
}

Response samples

Content type
application/json
{
  • "id": "djeWd83ncD3989RtebfiR",
  • "status": "CONFIRMED",
  • "display": {
    },
  • "startTime": 1800,
  • "startDate": "2023-01-11",
  • "startDateTime": "2023-01-11T18:00:00.000Z",
  • "endDateTime": "2023-01-11T18:30:00.000Z",
  • "duration": 30,
  • "info": { },
  • "typeId": "l68eESvkweJ4fkmn2Bbm",
  • "type": {
    },
  • "resourceId": "CEIz0piQ3BMWSS2ggcK2",
  • "resource": {
    }
}

Create Temporary Booking

create a Temporary Booking with a specific duration. The booking will be reserved for the specified number of minutes. If the booking is not confirmed within that time, it will be automatically deleted.

Rescheduling: To reschedule an existing booking, include the rescheduleBookingId parameter with the ID of the booking you want to reschedule. The existing booking will be cancelled and a new temporary booking will be created with the new date/time specified.

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
date
string

Day's Date e.g. 2023-01-11

time
number

in military time format e.g. 0 means 12:00 am and 1820 means 6:20 pm

type
string

Scheduling Type ID

object
object

Key-value pairs where the key is the field ID and the value filters which resources are available. Fetch available fields from GET /customFields/resourceFilters?type={typeId}.

These fields have info.filterResources: true and are used to match against resource custom data.

Value format depends on the field type:

Field Type Value Format Example
text string "some filter value"
options string or array of strings (for multi-value filtering) "general" or ["general", "pediatrics"]
showAll
boolean
Default: false

Whether to show all resources including those not available for web booking

object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Fetch available fields from GET /customFields/bookingInfo?type={typeId}.

Value format depends on the field type:

Field Type Value Format Example
text string "John Doe"
paragraph string "Multi-line text..."
number number 5
options string (the selected option's value) "premium"
location object with position and address See below
photo object with data (base64) and fileName See below
photos array of photo objects See below
file object with data (base64) and fileName See below
files array of file objects See below

Location value:

{
  "position": { "latitude": 24.7136, "longitude": 46.6753 },
  "address": "Riyadh, Saudi Arabia"
}

Photo value (photo type — single object, photos type — array of objects):

{
  "id": 4829371,
  "fileName": "image.jpg",
  "data": "data:image/jpeg;base64,/9j/4AAQ..."
}

File value (file type — single object, files type — array of objects):

{
  "id": 5928471,
  "fileName": "document.pdf",
  "data": "data:application/pdf;base64,JVBERi..."
}

Note: For photo/photos/file/files types, the data property must be a base64 data URL in the format data:{mimeType};base64,{base64Content}. The server will upload the file and replace data with permanent URLs.

object

Key-value pairs where the key is the custom field's ID and the value is the field's input. Fetch available fields from GET /customFields/timeAdjusters?type={typeId}.

These fields affect the booking's duration and/or price:

  • number fields with minutes/price: each unit adds the specified minutes/price
  • options fields where options have minutes/price: the selected option's minutes/price are added

Value format depends on the field type:

Field Type Value Format Example
number number 3
options string (the selected option's value) "deep_cleaning"
note
string

Optional note for the booking

rescheduleBookingId
string

Optional. Provide an existing booking ID to reschedule that booking to the new date/time specified. When provided, the existing booking will be cancelled and a new booking will be created with the new schedule.

object

Need to provide either customer's phone or email or ID

assign
boolean
Default: true

When value is true a resource will be assigned immediately. it should always be true unless you want to use instant booking feature. Refer to Instant Booking section in the docs.

reservedForMinutes
number

Responses

Response Schema: application/json
object (Booking)

Request samples

Content type
application/json
Example
{
  • "date": "2023-01-11",
  • "time": 1800,
  • "type": "l68eESvkweJ4fkmn2Bbm",
  • "reservedForMinutes": 15,
  • "customerIdentifier": {
    },
  • "resourceFilters": {
    },
  • "note": "Temporary reservation"
}

Response samples

Content type
application/json
{
  • "id": "djeWd83ncD3989RtebfiR",
  • "status": "CONFIRMED",
  • "display": {
    },
  • "startTime": 1800,
  • "startDate": "2023-01-11",
  • "startDateTime": "2023-01-11T18:00:00.000Z",
  • "endDateTime": "2023-01-11T18:30:00.000Z",
  • "duration": 30,
  • "info": { },
  • "typeId": "l68eESvkweJ4fkmn2Bbm",
  • "type": {
    },
  • "resourceId": "CEIz0piQ3BMWSS2ggcK2",
  • "resource": {
    }
}

Convert Temporary Booking into Confirmed Booking

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
bookingId
string

Responses

Response Schema: application/json
object (Booking)

Request samples

Content type
application/json
{
  • "bookingId": "string"
}

Response samples

Content type
application/json
{}

Manage Time Rules

Everything about your Time Rules

Get Resource's Time Rules

Authorizations:
bearerAuthapiKey
path Parameters
resourceId
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (TimeRules)

Response samples

Content type
application/json
{
  • "result": {
    }
}

Update Resource's Time Rules

Authorizations:
bearerAuthapiKey
path Parameters
resourceId
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
depthOfDays
number
Array of objects
scheduleAfterHoursFromNow
number

When to start accepting new scheduling requests:

  • (-1) means start from tomorrow.
  • (0) means instantly.
  • (1) means start after 1 hour from now.
  • (2) means start from after 2 hour from now.
  • (n) means start from after n hours from now.

Responses

Response Schema: application/json
object (TimeRules)

Request samples

Content type
application/json
{
  • "depthOfDays": 0,
  • "rules": [
    ],
  • "scheduleAfterHoursFromNow": 0
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Manage Custom Fields

Management endpoints for configuring custom fields.

Custom fields allow you to collect additional information during:

  • Customer registration (name, phone, email, custom fields)
  • Booking process (appointment details, preferences, special requests)

Some fields can affect resource filtering or booking duration.

Get Customer Custom Fields

Retrieve the list of custom fields configured for customer registration/profile.

These fields collect information about the customer themselves (phone, email, name, etc.).

Core fields like phoneNumber, firstName, lastName, and email are always present but can be enabled/disabled or made optional.

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (FormField)

Response samples

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

Update Customer Custom Fields

Update the list of custom fields for customer registration/profile.

Important Rules:

  • Phone number and email fields cannot both be disabled at the same time
  • Phone number and email fields cannot both be optional at the same time
  • If email is disabled, phone number cannot be optional
  • If phone number is disabled, email cannot be optional

Subscription Required: This endpoint requires the customFields feature in your subscription plan.

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
required
Array
id
required
string

Unique identifier for the field

name
required
string

Display name of the field

type
required
string
Enum: "text" "paragraph" "number" "options" "location" "photo" "photos" "file" "files" "paragraph-readonly"

The type of field input:

  • text: Single line text input
  • paragraph: Multi-line text input (long answer)
  • number: Numeric input
  • options: Single/multiple select
  • location: Location/map picker
  • photo: Single photo upload
  • photos: Multiple photos upload
  • file: Single file upload
  • files: Multiple files upload
  • paragraph-readonly: Display-only text block (not a user input)
textType
string
Enum: "phone" "email"

Subtype for text fields:

  • phone: Phone number input with country code
  • email: Email address input
optional
boolean
Default: false

Whether the field is optional (true) or required (false)

enabled
boolean
Default: true

Whether the field is currently active and shown to users

visibility
string
Default: "providerOnly"
Enum: "public" "providerOnly"

Who can see this field:

  • public: Visible to both customers and providers
  • providerOnly: Only visible to organization staff
Array of objects

Available options for options field type

types
Array of strings

List of booking type IDs this field applies to. If empty or undefined, applies to all types.

minutes
integer

For number fields, additional minutes per unit

price
string

For number fields, additional price per unit

object

Additional field configuration

object

Conditional display rules for this field

phoneAuthMethods
Array of strings
Items Enum: "sms" "whatsapp"

For phone fields, allowed authentication methods

smsSender
string
Default: "app"
Enum: "app" "custom"

For phone fields, SMS sender configuration

defaultCountry
string

For phone fields, default country code

allowedCountries
string
Default: "all"
Enum: "all" "specific" "forbidden"

For phone fields, allowed countries setting

allowedCountriesList
Array of strings

For phone fields with allowedCountries="specific", list of allowed country codes

forbiddenCountriesList
Array of strings

For phone fields with allowedCountries="forbidden", list of forbidden country codes

Responses

Response Schema: application/json
Array of objects (FormField)

Request samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Response samples

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

Get Booking Custom Fields

Retrieve all custom fields configured for booking forms.

Booking custom fields serve multiple purposes:

  1. Resource Filters (info.filterResources: true): Fields that filter which resources are available based on customer selection (e.g., selecting a doctor specialty filters to only show doctors with that specialty)

  2. Time Adjusters (fields with minutes or options with minutes): Fields that affect the booking duration based on selected values (e.g., selecting "deep cleaning" adds 30 minutes to the appointment)

  3. Booking Info: All other fields that collect additional information about the appointment (e.g., reason for visit, special requests)

Fields can be restricted to specific booking types using the types array.

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (FormField)

Response samples

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

Update Booking Custom Fields

Update the list of custom fields for booking forms.

Field Types and Their Uses:

Type Purpose Special Properties
text Single line text textType: "phone" or "email" for validation
paragraph Multi-line text For longer notes
number Numeric input minutes, price for per-unit adjustments
options Single/multiple select Each option can have minutes, price
location Map/location picker For address collection
photo Single photo upload Photo file
photos Multiple photos upload Multiple photo files
file Single file upload Single file
files Multiple files upload Multiple files
paragraph-readonly Display-only text block Not a user input, content display only

Resource Filtering: Set info.filterResources: true to make a field filter available resources. The field's value will be matched against resource custom data.

Time Adjustment:

  • For number fields: Set minutes to add time per unit
  • For options fields: Set minutes on each option

Type Restrictions: Use the types array to restrict a field to specific booking types.

Subscription Required: This endpoint requires the customFields feature in your subscription plan.

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
required
Array
id
required
string

Unique identifier for the field

name
required
string

Display name of the field

type
required
string
Enum: "text" "paragraph" "number" "options" "location" "photo" "photos" "file" "files" "paragraph-readonly"

The type of field input:

  • text: Single line text input
  • paragraph: Multi-line text input (long answer)
  • number: Numeric input
  • options: Single/multiple select
  • location: Location/map picker
  • photo: Single photo upload
  • photos: Multiple photos upload
  • file: Single file upload
  • files: Multiple files upload
  • paragraph-readonly: Display-only text block (not a user input)
textType
string
Enum: "phone" "email"

Subtype for text fields:

  • phone: Phone number input with country code
  • email: Email address input
optional
boolean
Default: false

Whether the field is optional (true) or required (false)

enabled
boolean
Default: true

Whether the field is currently active and shown to users

visibility
string
Default: "providerOnly"
Enum: "public" "providerOnly"

Who can see this field:

  • public: Visible to both customers and providers
  • providerOnly: Only visible to organization staff
Array of objects

Available options for options field type

types
Array of strings

List of booking type IDs this field applies to. If empty or undefined, applies to all types.

minutes
integer

For number fields, additional minutes per unit

price
string

For number fields, additional price per unit

object

Additional field configuration

object

Conditional display rules for this field

phoneAuthMethods
Array of strings
Items Enum: "sms" "whatsapp"

For phone fields, allowed authentication methods

smsSender
string
Default: "app"
Enum: "app" "custom"

For phone fields, SMS sender configuration

defaultCountry
string

For phone fields, default country code

allowedCountries
string
Default: "all"
Enum: "all" "specific" "forbidden"

For phone fields, allowed countries setting

allowedCountriesList
Array of strings

For phone fields with allowedCountries="specific", list of allowed country codes

forbiddenCountriesList
Array of strings

For phone fields with allowedCountries="forbidden", list of forbidden country codes

Responses

Response Schema: application/json
Array of objects (FormField)

Request samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

Response samples

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

Manage Organizations

Everything about your Organizations

Get organizations the user is a member of

Authorizations:
bearerAuthapiKey
query Parameters
limit
integer
Default: 10

Number of organizations to return per page.

nextPageToken
string

Token for pagination to fetch the next set of results.

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (Organization)
object

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "pagination": {
    }
}

Get a single organization by ID

Authorizations:
bearerAuthapiKey
path Parameters
id
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (Organization)

Response samples

Content type
application/json
{
  • "result": {
    }
}

Update an existing organization

Authorizations:
bearerAuthapiKey
path Parameters
id
required
string
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
businessTypeId
string

Business type identifier.

businessCustomConfig
object

Custom business configuration (optional).

name
required
string

Organization display name.

timezone
required
string

Timezone of the organization (IANA format, e.g. 'Asia/Riyadh').

Responses

Response Schema: application/json
object (Organization)

Request samples

Content type
application/json
{
  • "businessTypeId": "string",
  • "businessCustomConfig": { },
  • "name": "string",
  • "timezone": "string"
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Delete an organization (soft delete by default)

Soft deletes an organization by default (marks as deleted). The organization will be hidden from all APIs and authentication will be rejected.

Hard delete (permanent deletion with cascade) is only allowed in development environment by passing hardDelete=true query parameter.

Soft Delete (default):

  • Marks organization as deleted (isDeleted=true)
  • Organization is hidden from all list and get endpoints
  • Authentication with this organization is rejected
  • Data is preserved for potential recovery

Hard Delete (development only):

  • Permanently deletes organization and ALL related data:
    • Resources, types, customers, bookings
    • Coupons, bundles, page users
    • Tenant (if exists)
  • Cannot be undone
  • Only available when appConfig.environment === "development"
Authorizations:
bearerAuthapiKey
path Parameters
id
required
string

The ID of the organization to delete

query Parameters
hardDelete
boolean
Default: false

If true, performs hard delete (only in development environment)

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object

Response samples

Content type
application/json
{
  • "result": {
    }
}

Create a new organization

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
businessTypeId
string

Business type identifier.

businessCustomConfig
object

Custom business configuration (optional).

name
required
string

Organization display name.

timezone
required
string

Timezone of the organization (IANA format, e.g. 'Asia/Riyadh').

Responses

Response Schema: application/json
object (Organization)

Request samples

Content type
application/json
{
  • "businessTypeId": "string",
  • "businessCustomConfig": { },
  • "name": "string",
  • "timezone": "string"
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Manage Organization API Keys

Organization-scoped API keys for managing resources within a specific organization only

Get organization API keys

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (OrganizationApiKey)

Response samples

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

Create a new organization API key

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
required
name
required
string

Human-readable name for the API key.

Responses

Response Schema: application/json
object (OrganizationApiKey)

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Delete an organization API key

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
required
name
required
string

Name of the API key to delete.

Responses

Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Manage Account API Keys

Account-wide API keys with full access to create organizations and manage every organization linked to the account (acts as account impersonation)

Get account API keys

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (AccountApiKey)

Response samples

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

Create a new account API key

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
required
name
required
string

Human-readable name for the API key.

Responses

Response Schema: application/json
object (AccountApiKey)

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Delete an account API key

Authorizations:
bearerAuthapiKey
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
required
name
required
string

Name of the API key to delete.

Responses

Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Manage Invoices

Everything about your Invoices

List Invoices

Authorizations:
bearerAuthapiKey
query Parameters
nextPageToken
string
limit
number
header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
Array of objects (Invoice)
object (Pagination)

Pagination information for list responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "pagination": {
    }
}

Manage Webhooks

Everything about your Webhooks

Triggered when a new booking request needs approval Webhook

This webhook fires when a customer submits a new booking that requires provider approval. This event only occurs when the system is configured to require manual approval. The booking remains in a pending state until the provider takes action. Skip this state if auto-approval is enabled or payment confirms the booking immediately. The triggerID for this webhook will be "newBooking".

Request Body schema: application/json

Information about a new booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when a booking is confirmed and becomes active Webhook

This webhook fires when a booking becomes officially confirmed, either through provider approval, automatic confirmation (if enabled), or immediate confirmation after payment. This represents the transition of a booking to an active/confirmed state. For manually approved bookings, this follows the newBooking event. For auto-approved bookings, this may be the initial event. The triggerID for this webhook will be "newAppointment".

Request Body schema: application/json

Information about a new Appointment in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when a confirmed appointment is rescheduled Webhook

This webhook fires when an existing confirmed appointment is rescheduled to a new date or time. The rescheduling is typically initiated by the service provider or admin. The payload includes the updated booking details with the new schedule. The triggerID for this webhook will be "appointmentRescheduled".

Request Body schema: application/json

Information about a rescheduled booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when a pending booking request is rejected Webhook

This webhook fires only when a service provider rejects a pending booking request. This event can only occur after a newBooking event and before any confirmation. Note that this event will never trigger in cases where the system is configured for auto-confirmation, as booking requests are automatically confirmed without going through the pending state. The triggerID for this webhook will be "bookingRejected".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when a customer cancels their booking Webhook

This webhook fires when a customer initiates a cancellation of their existing booking or appointment. It includes details about the canceled booking and the cancellation timestamp. The triggerID for this webhook will be "customerCanceled".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when a service provider cancels an appointment Webhook

This webhook fires when a service provider needs to cancel an already confirmed appointment. This might happen due to emergencies, unexpected provider unavailability, or other service-related issues. The triggerID for this webhook will be "providerCanceled".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when a booking is advertised to available providers Webhook

This webhook fires when a new booking is created without a specific resource assignment and is advertised to all available providers. This occurs when the booking policy allows the system to find an available provider rather than requiring the customer to select one. The triggerID for this webhook will be "bookingUnassigned".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when a provider is assigned to a booking Webhook

This webhook fires when a resource or provider is assigned to a previously unassigned booking. This typically follows a bookingUnassigned event when a provider accepts or is manually assigned to the booking. The triggerID for this webhook will be "bookingAssigned".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when an unassigned booking expires Webhook

This webhook fires when an unassigned booking times out without being accepted by any provider. The booking is automatically canceled by the system. This can only occur after a bookingUnassigned event. The triggerID for this webhook will be "bookingExpired".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered when a booking's queue position changes Webhook

This webhook fires when the queue position of a waiting booking is updated. This can happen when other bookings ahead in the queue are completed, canceled, or rescheduled, causing the position to shift. The triggerID for this webhook will be "queuePositionUpdated".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered one day before an appointment starts Webhook

This webhook fires automatically 24 hours before the scheduled start time of an appointment. It can be used for sending day-before reminders to both customers and service providers. The triggerID for this webhook will be "oneDayBeforeAppointment".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered one hour before an appointment starts Webhook

This webhook fires automatically 60 minutes before the scheduled start time of an appointment. It's typically used for sending reminders to both customers and service providers. The triggerID for this webhook will be "oneHourBeforeAppointment".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered ten minutes before an appointment starts Webhook

This webhook fires automatically 10 minutes before the scheduled start time of an appointment. It can be used for last-minute reminders or preparation notifications. The triggerID for this webhook will be "tenMinutesBeforeAppointment".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered at appointment start time Webhook

This webhook fires exactly when an appointment is scheduled to begin. It can be used to notify both parties that the service should now be starting, mark the appointment as in-progress, or initiate any start-of-service workflows. The triggerID for this webhook will be "beforeAppointment".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered after an appointment's scheduled end time Webhook

This webhook fires after an appointment's scheduled end time has passed. It can be used for sending feedback requests, thank you messages, or initiating post-service follow-ups. The triggerID for this webhook will be "afterAppointment".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

Triggered one day after an appointment ends Webhook

This webhook fires automatically 24 hours after the scheduled end time of an appointment. It can be used for follow-up messages, feedback requests, or post-service workflows. The triggerID for this webhook will be "oneDayAfterAppointment".

Request Body schema: application/json

Information about a booking in the system

id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Responses

Request samples

Content type
application/json
{
  • "id": "booking-123456",
  • "trigger": "newBooking",
  • "customer": {
    },
  • "provider": {
    },
  • "resource": {
    },
  • "page": {
    },
  • "type": {
    },
  • "dateTime": "\"2023-11-15T14:30:00.000Z\"",
  • "info": {
    },
  • "data": { }
}

List webhooks

Retrieves all webhook configurations for the current page

Authorizations:
bearerAuthapiKey

Responses

Response Schema: application/json
Array of objects

Response samples

Content type
application/json
{}

Add a webhook

Creates or updates a webhook configuration for the current page

Authorizations:
bearerAuthapiKey
Request Body schema: application/json
required
trigger
required
string

The event trigger ID for the webhook

url
required
string

The URL to which webhook data will be sent

reference
string

Optional reference identifier for this webhook

Responses

Response Schema: application/json
result
string

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "result": "success"
}

Delete a webhook

Removes a webhook configuration from the current page

Authorizations:
bearerAuthapiKey
Request Body schema: application/json
required
trigger
required
string

The event trigger ID for the webhook

url
required
string

The webhook URL to delete

reference
string

Reference identifier for the webhook to delete

Responses

Response Schema: application/json
result
string

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "result": "success"
}

Generate sample webhook payload

Creates a sample webhook payload for testing based on the requested trigger

Authorizations:
bearerAuthapiKey
Request Body schema: application/json
required
trigger
required
string

The event trigger ID to generate a sample for

Responses

Response Schema: application/json
Array
id
string

Unique identifier for the booking

trigger
string

Unique identifier for the webhook event type

object

Information about the customer who made the booking

object

Information about the service provider

object

The resource being booked (e.g., room, equipment)

object

Information about the booking page

object

Details about the booking type/service

dateTime
string

JSON string containing datetime information for the booking

object

Additional booking information

data
object

Additional custom data provided in the webhook request

Request samples

Content type
application/json
{
  • "trigger": "newBooking"
}

Response samples

Content type
application/json
[
  • {
    }
]

Manage Website

Everything about your Website

Get Website Details

Authorizations:
bearerAuthapiKey
query Parameters
version
string
Default: "default"

Website version (default or draft)

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (Website)

Response samples

Content type
application/json
{}

Update Website

Authorizations:
bearerAuthapiKey
query Parameters
version
string
Default: "default"

Website version (default or draft)

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Request Body schema: application/json
name
string

Business name

timezone
string

Website timezone

on
boolean

Whether the website is enabled

object (Photo)

Business logo image

object (Photo)

Favicon image for the website

displayName
string

Display name for the business

description
string

Business description

terms
string

Terms and conditions

bookingSuccessMessage
string

Message displayed after successful booking

bookingPolicy
string
Enum: "specify" "leastFirst" "specifyAndLeastFirst"

Booking policy configuration. "specify" allows users to choose booking resource first, "leastFirst" automatically selects the least busy type. "specifyAndLeastFirst" allows both options.

bookingTimePolicy
string
Enum: "displayAll" "suggest" "first"

Time slot display policy

suggestedTimes
integer

Number of suggested time slots

bookingTimeSplitting
string
Enum: "optimize" "oclock" "oclockAndHalf" "20" "15" "10" "fixed"

Time slot interval configuration

fixedTimes
Array of integers

Custom fixed time slots (in minutes from midnight)

bookingTimeSplittingOptimize
boolean

Whether to optimize time slot intervals

bookingTimeShowMidnight
boolean

Whether to show midnight slots

selectTypeFirst
boolean

Whether to select booking type before resource

selectResourceCategory
boolean

Whether to show resource categories

hideResource
boolean

Whether to hide resource selection

object
callSupport
string

Support phone number

whatsapp
string

WhatsApp contact number

emailSupport
string <email>

Support email address

twitter
string

Twitter handle

instagram
string

Instagram handle

facebook
string

Facebook page name

tiktok
string

TikTok handle

snapchat
string

Snapchat username

map
object

Map location configuration

maroof
string

Maroof registration number

saudiBusinessCenter
string

Saudi business center certification number

Responses

Response Schema: application/json
object (Website)

Request samples

Content type
application/json
{
  • "name": "string",
  • "timezone": "string",
  • "on": true,
  • "logo": {
    },
  • "logoFavIcon": {
    },
  • "displayName": "string",
  • "description": "string",
  • "terms": "string",
  • "bookingSuccessMessage": "string",
  • "bookingPolicy": "specify",
  • "bookingTimePolicy": "displayAll",
  • "suggestedTimes": 0,
  • "bookingTimeSplitting": "optimize",
  • "fixedTimes": [
    ],
  • "bookingTimeSplittingOptimize": true,
  • "bookingTimeShowMidnight": true,
  • "selectTypeFirst": true,
  • "selectResourceCategory": true,
  • "hideResource": true,
  • "theme": {
    },
  • "callSupport": "string",
  • "whatsapp": "string",
  • "emailSupport": "user@example.com",
  • "twitter": "string",
  • "instagram": "string",
  • "facebook": "string",
  • "tiktok": "string",
  • "snapchat": "string",
  • "map": { },
  • "maroof": "string",
  • "saudiBusinessCenter": "string"
}

Response samples

Content type
application/json
{}

Website

Everything about your Website

Find Website by URL

Authorizations:
bearerAuthapiKey
query Parameters
url
required
string <uri>

URL of the website to look up

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (Website)

Response samples

Content type
application/json
{}

Get Current Website

Get details for the website associated with the app ID

Authorizations:
bearerAuthapiKey
query Parameters
version
string
Default: "default"

Website version (default or draft)

header Parameters
X-APP-ID
required
string

App ID

lang
string

Display fields language (en,ar)

Responses

Response Schema: application/json
object (Website)

Response samples

Content type
application/json
{}