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
Create your account
Go to /login and sign up with your email. Choose "Salon Owner" as your role.
- 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
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
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
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
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.
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 -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
5c. AI Configuration
All AI settings are per-salon and configurable in Dashboard → AI Config:
| Setting | Description |
|---|---|
| AI Chat Enabled | Toggle the chat widget on/off for your salon |
| Hairstyle Classification | Allow customers to upload images for AI identification |
| Natural Language Booking | Let AI handle appointment booking through conversation |
| Personality Tone | Professional, Friendly, or Luxury — affects response style |
| Language | Primary language for AI responses (follows salon localization) |
| Custom Instructions | Extra 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
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.
X-API-Key: hb_your_api_key_hereBase URL: https://api.ligaxai.com/api/v1
7b. Endpoints
Salon
/salon
Get salon information including services, business hours, AI config, and booking page settings.
Services
/services
List all active services. Returns id, name, price, currency, duration, and add-ons.
/services/{service_id}
Get a single service by ID.
Availability
/availability/{date}
Get available time slots for a date (format: YYYY-MM-DD). Respects business hours and existing bookings.
Bookings
/bookings
List bookings. Optional query params: status, date_from (YYYY-MM-DD), date_to (YYYY-MM-DD), limit (default 50), offset.
/bookings
Create a new booking. Required body fields: service_id, date, time, customer_name, customer_email, customer_phone.
/bookings/{id}
Update a booking. Patchable fields: status, date, time, notes.
/bookings/{id}
Cancel a booking (sets status to cancelled).
AI Chat
/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
| Status | Meaning |
|---|---|
| 400 | Bad request — missing or malformed fields |
| 401 | Unauthorized — missing or invalid API key |
| 403 | Forbidden — action not permitted for this key |
| 404 | Not found — resource does not exist |
| 422 | Validation error — request body failed schema validation |
| 429 | Rate limit exceeded — slow down requests |
| 500 | Internal 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:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 17103456007e. Code Examples
Check availability
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 -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
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
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.
<!-- LigaX AI Chat Widget -->
<script src="https://api.ligaxai.com/api/embed/YOUR_SALON_ID/widget.js" defer></script>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.
<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.
<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
- 1Install the LigaX Booking plugin from the WordPress plugin directory.
- 2Go to Settings → LigaX and enter your API key (generated in Dashboard → Integrations → Developer API).
- 3Add the shortcode
[ligax_booking]to any page or post to embed the booking widget.
9. Webhooks & Automation
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
| Event | When it fires |
|---|---|
| booking.created | New booking submitted (any source) |
| booking.confirmed | Booking status changed to confirmed |
| booking.updated | Booking details (date, time, notes) modified |
| booking.cancelled | Booking cancelled |
| booking.completed | Booking marked as completed |
| customer.created | New customer registered |
| payment.received | Payment processed successfully |
9b. Payload Format
{
"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.
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)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:
- Zapier: Create a new Zap → Trigger: Webhooks by Zapier → "Catch Hook". Copy the provided URL → paste into Dashboard → Integrations → Automations → Webhook URL → Save.
- Make.com: Create a scenario → Add a Webhooks module → "Custom Webhook". Copy the URL and paste it the same way.
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:
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.
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.
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.
| Category | Styles |
|---|---|
| Braids | box_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 |
| Locs | soft_locs, butterfly_locs, faux_locs, goddess_locs, invisible_locs, microlocs, locs |
| Twists | passion_twists, marley_twists, two_strand_twists, flat_twist, rope_twists, island_twist, mini_twists |
| Natural styles | afro, puff, comb_coils, finger_coils, bantu_knots, space_buns, updo, ponytail, threaded_hairstyles |
| Cuts & colour | silk_press, blowout, balayage, highlights, ombre, colour, bob, pixie_cut, layers |
| Men's styles | drop_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 |
fulani_braids.10c. Performance & Limitations
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
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.