Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.flabslis.com/llms.txt

Use this file to discover all available pages before exploring further.

The CRM API has four endpoints. Use them in this order:

Integration modes

Your account runs in one of two modes. Most accounts use catch-all — this page covers it. If your business routes work per referring corporate, doctor, or hospital, use party-scoped.

Catch-all (default)

No party needed. Tests/packages return standard branch pricing, and one webhook receives every event for the lab. This page.

Party-scoped (B2B)

For a doctor’s CRM, a hospital portal, a wellness app, or a corporate health dashboard. Every lead, booking, and price is tied to a corporate / doctor / hospital, and each gets its own webhook. Enabled by Flabs — contact support.

Endpoints

List Branches

Fetch the branches under your account.

List Tests

Fetch every test offered by a branch.

List Packages

Fetch every package offered by a branch.

Create Lead or Booking

Create a CRM entry. Phase decides whether it’s a lead or a booking.

Lead vs Booking

Lead (default)Booking
phase"lead""booking"
Auto-assign✅ telecaller
NotificationNEW_LEADBOOKING_CONFIRMED
Required booking fieldsbookingType, scheduledAt
Defaults set by serverbookingStatus: Scheduled, paymentStatus: Pending, convertedAt: now

Rules to know

  • integratorID is required — every create call must include your own unique integratorID for the entry. It is stored on the lead/booking, carried onto the bill when it converts, and echoed back in webhooks so you can match events to your records.
  • Branch scope — every CRM call needs a branchID. Get it from GET /client/labs.
  • Duplicates — if a lead or booking with the same contact (or email) was already ingested today for your account, the API returns 409 Conflict.
  • Auto-assign — runs only when phase = "lead" and assignedTo is not set in the body. Honours the strategy you’ve configured in CRM settings.
  • Rate limit — 60 requests/minute per account on every CRM endpoint.
Fields not listed in the request schema are silently ignored. Send only what you need.