Skip to main content
POST

Authorizations

Authorization
string
header
required

JWT obtained from POST /client/auth/token.

Body

application/json
branchID
string
required

Branch identifier returned by GET /client/labs.

integratorID
string
required

Your own unique ID for this lead/booking. Required. It is stored on the entry, carried onto the bill when it converts, and echoed back in webhook payloads so you can correlate events with your records.

first_name
string
required
contact
string
required

Exactly 10 digits, no symbols or spaces.

age
number
required
age_type
enum<string>
required
Available options:
year,
month,
day
corporateUser
string

Corporate this entry belongs to. Party-scoped accounts must attach a party (any one of corporateUser, referredOrganization, referredHospitalOrganization).

referredOrganization
string

Referring doctor (organization) identifier. Party-scoped accounts must attach a party.

referredHospitalOrganization
string

Referring hospital (organization) identifier. Party-scoped accounts must attach a party.

phase
enum<string>
default:lead

lead enters the funnel and is auto-assigned. booking skips the funnel and creates a confirmed booking.

Available options:
lead,
booking
designation
string

Mr / Mrs / Dr / etc.

last_name
string
country_code
string
default:91
email
string<email>
gender
enum<string>
Available options:
male,
female,
other
weight
number

In kilograms.

height
number

In centimetres.

address
string
pincode
string
googleLocation
string

Free-form location string, e.g. "12.97,77.59" or a Google Maps URL.

aadhaar_number
string
insurance_number
string
uhid
string
passport_number
string
owner_name
string

Veterinary only — pet owner's name.

breed
string

Veterinary only — pet breed.

category
string

Veterinary only — animal category.

source
string

Channel that produced the lead, e.g. "facebook_ads", "website".

priority
enum<string>
default:medium
Available options:
urgent,
high,
medium,
low
tests
object[]
packages
object[]
unmappedTests
object[]

Tests that you couldn't match to a Flabs test ID. Sent as plain name + cost so they show up on the lead with an "unmapped" tag for the team to resolve later.

unmappedPackages
object[]

Packages that you couldn't match to a Flabs package ID. Sent as plain name + price so they show up on the lead with an "unmapped" tag for the team to resolve later.

discountAmount
number
default:0
totalAmount
number
default:0
bookingType
enum<string>

Used when phase is booking.

Available options:
Home Collection,
Lab Visit
scheduledAt
string<date-time>

ISO date-time when the booking is scheduled. Used when phase is booking.

specialInstructions
string

Notes for the phlebotomist or lab.

paymentStatus
enum<string>
default:Pending

Defaults to Pending for bookings.

Available options:
Pending,
Paid,
Pay Later
paymentMode
enum<string>
Available options:
Razorpay UPI,
Card,
Cash
customFields
object

Free-form key/value map. Keys must match custom fields configured in CRM settings. Example: { "utm_campaign": "summer_sale", "lead_score": 78 }.

Response

Lead or booking created

success
boolean
Example:

true

leadId
string

Identifier of the newly created CRM entry.

phase
enum<string>
Available options:
lead,
booking
message
string