/Documentation

Ligax AI Documentation

Everything you need to set up and get the most out of Ligax AI.

1. Introduction

LigaX is an AI-powered SaaS booking platform built for hair salons and stylists of all specialties. It combines online booking with an AI receptionist, hairstyle recognition, and flexible third-party integrations — all configurable per salon.

Online Booking

Custom booking URLs, service catalog, client management, and payment collection.

AI Receptionist

24/7 AI chat assistant that answers questions, recommends styles, and books appointments through natural conversation.

Hairstyle Recognition

LigaX Vision AI identifies hairstyle type and attributes from a photo and auto-matches the result to the salon's service catalog.

Developer API & Embeds

REST API, webhooks, chat widget embed, and automation integrations for building on top of the platform. (In development)

2. Getting Started

For salon owners setting up LigaX for the first time:

  1. 1

    Create your account

    Go to /login and sign up with your email. Choose "Salon Owner" as your role.

  2. 2

    Complete the onboarding wizard

    6 steps: Basic Info → Localization (country, currency, language) → Service Category → Service Catalog (add your services with prices) → AI Configuration → Test & Launch.

  3. 3

    Set your booking page URL

    In Dashboard → Integrations → Booking Page, choose a unique slug. Your booking page will be live at ligaxai.com/book/{your-slug}.

  4. 4

    Configure AI

    In Dashboard → AI Config, enable the chat assistant, adjust personality, and add custom instructions. The AI is automatically trained on your salon data.

  5. 5

    Share or embed

    Copy your booking link and share it directly with clients, or embed your booking page on your existing website using the iFrame embed — all from Dashboard → Integrations.

3. Booking System

Public Booking Page

Every salon gets a fully branded public booking page at /book/{slug}. Customers can browse services, pick a date and time, enter their details, and complete a deposit payment — all without logging in.

Booking Sources

Bookings can originate from multiple sources: the public booking page, the AI chat widget, Zapier automations, the WordPress plugin, or directly via the REST API. Each booking stores its source for analytics tracking.

Status Flow

pendingconfirmedcompletedcancelled

Cancelled is reachable from any state. Confirmed → Completed is the normal flow.

Reminders

Automated email and SMS reminders are sent at 24 hours and 2 hours before each confirmed appointment. This is handled by the background notification scheduler running every 15 minutes.

Deposits

Salons can require a deposit (configurable % of service price) paid via Stripe at the time of booking. Deposits are captured, tracked, and visible in the dashboard.

4. Service & Staff Management

Services

Each service has: name, description, base price, duration, currency (GBP / USD / EUR / NGN and more), add-ons (each with their own price/duration), and an active/inactive toggle. Services are what customers book and what the AI uses to understand the salon's offering.

Portfolio

Each service can have a gallery of reference images (photos of the actual hairstyle). These are used by the AI for recommendations and displayed to customers on the booking page.

Staff (Stylists)

Add stylists with their bio, specialties, and photo. Future versions will support per-stylist availability and booking assignment.

Business Hours

Configure open/close times per day of the week. Availability checking respects these hours — customers cannot book outside them.

Localization

Each salon independently sets country, language, timezone, and currency. All prices display in the salon's configured currency across the public booking page, AI chat, and API responses.

5. AI Features

5a. Hairstyle Recognition (Computer Vision)

Customers upload a reference photo of the hairstyle they want. The LigaX computer vision model identifies the hairstyle type and attributes, then automatically matches the result to the salon's service catalog and shows the price. This eliminates the "what style is this?" back-and-forth that stylists deal with daily.

Powered by LigaX Vision AI — a proprietary two-stage pipeline that identifies hairstyle type and attributes from an image, resolves style aliases and synonyms, then matches the result to the salon's service catalog. See for the full reference.

The system covers 50+ named styles across all hair types — braids, locs, twists, natural styles, cuts, colour, and men's styles (fades, lineups, tapers, and more). Style aliases are resolved automatically, so "Ghana braids" and "Fulani braids" both match the same service.

curl — classify an image
curl -X POST "https://api.ligaxai.com/api/classify/" \
  -F "file=@hairstyle.jpg" \
  -F "salon_id=YOUR_SALON_ID"

# Response
{
  "primary_label": "box_braids",
  "primary_confidence": 0.91,
  "labels": [
    { "label": "box_braids", "confidence": 0.91 },
    { "label": "knotless",   "confidence": 0.74 }
  ],
  "matched_service": {
    "id": "svc_abc123",
    "name": "Knotless Box Braids",
    "price": 180,
    "currency": "GBP"
  }
}

5b. AI Chat Assistant

A 24/7 virtual receptionist embedded on the salon's booking page and website. It is trained at runtime on the salon's own data — services, prices, policies, business hours, and portfolio — so every salon's assistant knows only their own information.

Capabilities:

  • Answer questions about services, pricing, availability, and policies
  • Recommend hairstyles based on face shape, hair type, or lifestyle preferences
  • Book appointments through natural language ("I want box braids next Saturday afternoon")
  • Explain aftercare, maintenance, and treatment processes
  • Handle FAQ without human intervention
Stylist Briefing: Before each appointment, the AI automatically generates a pre-appointment summary document with the customer's preferences, concerns, and requested add-ons — so stylists know exactly what to expect.

5c. AI Configuration

All AI settings are per-salon and configurable in Dashboard → AI Config:

SettingDescription
AI Chat EnabledToggle the chat widget on/off for your salon
Hairstyle ClassificationAllow customers to upload images for AI identification
Natural Language BookingLet AI handle appointment booking through conversation
Personality ToneProfessional, Friendly, or Luxury — affects response style
LanguagePrimary language for AI responses (follows salon localization)
Custom InstructionsExtra context injected into the AI — promotions, policies, FAQs

6. Analytics & Insights

Available in Dashboard → Insights. All metrics are scoped to the salon's own data.

Booking Trends

Daily, weekly, and monthly booking volume. Peak hours heatmap to identify busy periods.

Revenue

Earnings by service, stylist, or time period. Currency-aware — displays in the salon's configured currency.

AI Performance

Chat session counts and conversion rate from chat interaction to confirmed booking.

Customer Insights

New vs. returning customers, retention rate, and top services by customer segment.

Booking Funnel

Chat starts → bookings → completions. Identifies where customers drop off in the booking flow.

Stylist Performance

Bookings and completion rate per stylist (when multiple stylists are configured).

7. Developer API

In Development — The public Developer API is currently being built. The endpoints, authentication, and examples below reflect the planned API contract. Sign up to be notified when developer access launches.

The LigaX REST API lets you build custom integrations, pull booking data into your own systems, or create a fully white-labelled booking flow. All endpoints return JSON.

7a. Authentication

All API requests must include your API key in the X-API-Key header. Generate your key in Dashboard → Integrations → Developer API.

Request header
X-API-Key: hb_your_api_key_here
Your API key is shown only once on generation. Store it securely. Regenerating immediately invalidates the previous key.

Base URL: https://api.ligaxai.com/api/v1

7b. Endpoints

Salon

GET

/salon

Get salon information including services, business hours, AI config, and booking page settings.

Services

GET

/services

List all active services. Returns id, name, price, currency, duration, and add-ons.

GET

/services/{service_id}

Get a single service by ID.

Availability

GET

/availability/{date}

Get available time slots for a date (format: YYYY-MM-DD). Respects business hours and existing bookings.

Bookings

GET

/bookings

List bookings. Optional query params: status, date_from (YYYY-MM-DD), date_to (YYYY-MM-DD), limit (default 50), offset.

POST

/bookings

Create a new booking. Required body fields: service_id, date, time, customer_name, customer_email, customer_phone.

PATCH

/bookings/{id}

Update a booking. Patchable fields: status, date, time, notes.

DELETE

/bookings/{id}

Cancel a booking (sets status to cancelled).

AI Chat

POST

/chat

Send a message to the salon's AI assistant. Body: { message: string, session_id?: string }. Returns AI reply + updated session_id.

7c. Error Codes

StatusMeaning
400Bad request — missing or malformed fields
401Unauthorized — missing or invalid API key
403Forbidden — action not permitted for this key
404Not found — resource does not exist
422Validation error — request body failed schema validation
429Rate limit exceeded — slow down requests
500Internal server error — contact support if recurring

7d. Rate Limits

The API allows 1,000 requests per hour per API key. Rate limit information is returned in response headers:

Response headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1710345600

7e. Code Examples

Check availability

curl
curl -X GET "https://api.ligaxai.com/api/v1/availability/2026-04-15" \
  -H "X-API-Key: hb_your_key_here"

Create a booking

curl
curl -X POST "https://api.ligaxai.com/api/v1/bookings" \
  -H "X-API-Key: hb_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": "svc_abc123",
    "date": "2026-04-15",
    "time": "14:00",
    "customer_name": "Jane Doe",
    "customer_email": "jane@example.com",
    "customer_phone": "+44 7700 900000"
  }'

Python example

python
import requests

API_KEY = "hb_your_key_here"
BASE_URL = "https://api.ligaxai.com/api/v1"
HEADERS = {"X-API-Key": API_KEY}

# List services
services = requests.get(f"{BASE_URL}/services", headers=HEADERS).json()

# Create booking
booking = requests.post(f"{BASE_URL}/bookings", headers=HEADERS, json={
    "service_id": services["data"][0]["id"],
    "date": "2026-04-15",
    "time": "14:00",
    "customer_name": "Jane Doe",
    "customer_email": "jane@example.com",
    "customer_phone": "+44 7700 900000"
}).json()

print(booking["booking_id"])

JavaScript / Node.js

javascript
const API_KEY = 'hb_your_key_here';
const BASE_URL = 'https://api.ligaxai.com/api/v1';

const headers = { 'X-API-Key': API_KEY, 'Content-Type': 'application/json' };

// Check availability
const avail = await fetch(`${BASE_URL}/availability/2026-04-15`, { headers });
const slots = await avail.json();

// Create a booking
const res = await fetch(`${BASE_URL}/bookings`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    service_id: 'svc_abc123',
    date: '2026-04-15',
    time: slots.data[0].time,
    customer_name: 'Jane Doe',
    customer_email: 'jane@example.com',
    customer_phone: '+44 7700 900000'
  })
});
const booking = await res.json();
console.log(booking.booking_id);

8. Embedding on Your Website

8a. Floating Chat Widget In Development

Add a single script tag to any page. The AI chat widget loads automatically in the bottom-right corner — customers can browse services, upload hairstyle photos, and book appointments without leaving your site.

html
<!-- LigaX AI Chat Widget -->
<script src="https://api.ligaxai.com/api/embed/YOUR_SALON_ID/widget.js" defer></script>
Replace YOUR_SALON_ID with your salon's ID (visible in your dashboard URL). Paste this before the closing </body> tag on every page.

8b. iFrame Embed

Embed the full booking page inline. Ideal for a dedicated "Book Now" page on your website.

html
<iframe
  src="https://ligaxai.com/book/YOUR_SLUG?embed=true"
  width="100%"
  height="640"
  frameborder="0"
  style="border-radius: 12px; border: 1px solid #e5e7eb;"
></iframe>

8c. Book Now Button

Add a styled button anywhere that links directly to your booking page.

html
<a href="https://ligaxai.com/book/YOUR_SLUG" target="_blank"
   style="display:inline-block;background:#9333EA;color:#fff;
          padding:12px 24px;border-radius:8px;text-decoration:none;
          font-family:sans-serif;font-weight:600;font-size:14px;">
  Book Now
</a>

8d. WordPress In Development

  1. 1Install the LigaX Booking plugin from the WordPress plugin directory.
  2. 2Go to Settings → LigaX and enter your API key (generated in Dashboard → Integrations → Developer API).
  3. 3Add the shortcode [ligax_booking] to any page or post to embed the booking widget.

9. Webhooks & Automation

In Development — Webhook events and automation integrations are currently being built. The events, payload format, and verification examples below reflect the planned contract.

LigaX fires webhook events automatically when things happen in your salon. Point your webhook URL at Zapier, Make.com, or your own server to trigger workflows in response. Configure in Dashboard → Integrations → Automations.

9a. Available Events

EventWhen it fires
booking.createdNew booking submitted (any source)
booking.confirmedBooking status changed to confirmed
booking.updatedBooking details (date, time, notes) modified
booking.cancelledBooking cancelled
booking.completedBooking marked as completed
customer.createdNew customer registered
payment.receivedPayment processed successfully

9b. Payload Format

json
{
  "event_type": "booking.created",
  "salon_id": "6abc...xyz",
  "timestamp": "2026-04-15T14:00:00Z",
  "data": {
    "booking_id": "bk_abc123",
    "customer_name": "Jane Doe",
    "customer_email": "jane@example.com",
    "customer_phone": "+44 7700 900000",
    "service_name": "Knotless Box Braids",
    "date": "2026-04-20",
    "time": "10:00",
    "status": "confirmed",
    "source": "public_page"
  }
}

9c. Signature Verification

When a webhook secret is configured, every request includes an X-Webhook-Signature header — an HMAC-SHA256 of the raw request body signed with your secret. Verify it on your server before processing the event.

python — verify signature
import hmac, hashlib

def verify_signature(payload_bytes: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(
        secret.encode(),
        payload_bytes,
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, signature)
javascript — verify signature
const crypto = require('crypto');

function verifySignature(rawBody, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(rawBody)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
}

9d. Zapier & Make.com

Use LigaX webhooks as triggers in no-code automation platforms:

  1. Zapier: Create a new Zap → Trigger: Webhooks by Zapier → "Catch Hook". Copy the provided URL → paste into Dashboard → Integrations → Automations → Webhook URL → Save.
  2. Make.com: Create a scenario → Add a Webhooks module → "Custom Webhook". Copy the URL and paste it the same way.
📊 Log bookings to Google Sheets
🔔 Notify team on Slack
💬 Send SMS via Twilio
📅 Sync to Google Calendar
📧 Add to Mailchimp / Klaviyo
💰 Create QuickBooks invoices

10. LigaX Vision AI

LigaX Vision AI is the proprietary image classification pipeline that powers hairstyle recognition across the platform. It is designed specifically for the diversity of real-world hair textures, styles, and cultural contexts — from tight coils and protective styles to tapers, fades, and colour work.

10a. How It Works

The pipeline runs in two stages on every image submission:

R

Recognition

The uploaded image is analysed to identify hairstyle type, style attributes, and hair characteristics (texture, length, colour presence). Classification is open-ended — the system is not restricted to a fixed list and can identify styles outside its primary training categories.

M

Matching

Detected styles are resolved through a synonym layer — common aliases and regional names (e.g. "Ghana braids" → Fulani Braids, "frohawk" → Mohawk, "loc extensions" → Faux Locs) are normalised before matching. The resolved style is then compared against the salon's active service catalog to return the closest service and price.

A single image returns multiple outputs — for example, box_braids as the primary style alongside knotless as a detected attribute — enabling precise service matching even when a style has multiple qualifying names.

10b. Style Coverage

50+ named styles across all hair types. All identifiers use snake_case in API responses.

CategoryStyles
Braidsbox_braids, knotless_braids, micro_braids, fulani_braids, goddess_braids, lemonade_braids, stitch_braids, butterfly_braids, pick_and_drop_braids, tree_braids, crisscross, braided_ponytail, cornrows, boho_braids
Locssoft_locs, butterfly_locs, faux_locs, goddess_locs, invisible_locs, microlocs, locs
Twistspassion_twists, marley_twists, two_strand_twists, flat_twist, rope_twists, island_twist, mini_twists
Natural stylesafro, puff, comb_coils, finger_coils, bantu_knots, space_buns, updo, ponytail, threaded_hairstyles
Cuts & coloursilk_press, blowout, balayage, highlights, ombre, colour, bob, pixie_cut, layers
Men's stylesdrop_fade, mid_fade, high_fade, low_fade, burst_fade, temple_fade, taper, edge_up, lineup, buzz_cut, crew_cut, caesar, flat_top, afro_cut, beard_shape
Synonym resolution — 70+ style aliases are resolved automatically before matching. Common regional names, spelling variants, and informal names all map to their canonical identifier. This means a client searching for "tribal braids", "feed-in braids", or "Ghana braids" will all correctly match fulani_braids.

10c. Performance & Limitations

High recall prioritised — the system is tuned to reliably identify the correct hairstyle type, even if it occasionally returns additional labels alongside the primary match. This is intentional: in a booking context, missing the correct style is worse than returning one extra label.

Known limitations:

  • Reduced accuracy on very dark, low-contrast, or heavily filtered images
  • Occasional confusion between visually similar style pairs (e.g. soft locs / butterfly locs, rope twists / two-strand twists)
  • Styles with limited visual distinction from similar styles may require the Phase 2 matching stage to disambiguate correctly
  • Best results with clear, well-lit photos where the hairstyle is the primary subject

10d. Inference Flow

Inference pipeline
Customer uploads image
    │
    ▼
POST /api/classify/  (multipart/form-data)
    │  salon_id + image file
    │
    ▼
Stage 1 — Recognition
    │  Identifies hairstyle type and style attributes
    │  Scores each detected style with a confidence value
    │  Primary label selected: specific style > base category > highest-confidence match
    │  Modifier labels (length, texture descriptors) never promoted to primary
    │
    ▼
Stage 2 — Synonym resolution + Service matching
    │  Style name normalised through 70+ alias mappings
    │  Resolved style matched against salon's active service catalog
    │  Closest service returned with name, price, and currency
    │
    ▼
Response: {
  primary_label, primary_confidence,
  labels[], matched_service, styling_notes
}

11. Multi-Tenant Architecture

LigaX is a multi-tenant SaaS platform. Every salon is an independent tenant with its own data, configuration, and AI context. No salon can access another's data.

Foundation Layer

Shared AI infrastructure — LigaX Vision AI for image classification and large language models for the chat assistant — used by all salons. Model improvements and updates roll out to all salons automatically.

Customization Layer

Each salon independently configures: services and prices, currency and language, AI personality, enabled features, business hours, and portfolio. These settings are injected at request-time to produce a fully personalized experience per salon.

Data Isolation

All MongoDB documents are salon-scoped via salon_id. API key authentication further constrains every API request to the key's owning salon — it is impossible to read or write data for a different salon.

Tenant Cache

On startup, the backend loads active salon configurations into an in-memory cache. This means AI chat responses don't require a database read on every message — the salon's services, pricing, and instructions are already in memory. Cache is invalidated when salon settings change.

AI Context Isolation

Each salon's AI assistant is constructed at runtime by injecting their specific data (services, prices, hours, FAQ, policies) into a structured system prompt. Two salons using the same LLM model will have completely different AI assistants that know only their own salon's information.

Ready to get started?

Set up your salon, configure your AI assistant, and go live in minutes.