Skip to main content
POST

Overview

Register your application to receive webhook notifications for specific events in the Flabs system. This endpoint allows you to subscribe to real-time notifications across the bill, report, and CRM booking lifecycle — from a bill being created or completed to a phlebotomist collecting and submitting a sample.

Authentication

This endpoint requires a valid Bearer token obtained from the authentication API.

Request Parameters

All parameters are sent in the request body as JSON:
Catch-all accounts (default): do not send a party. Party-scoped accounts: you must send corporateUser or organization (not both); the webhook then receives only that party’s events. See integration modes.

Supported Events

Bill & report events
  • bill.created - New bill created
  • bill.completed - Entire bill completed (all reports finished)
  • bill.deleted - Bill deleted from system
  • report.completed - Individual report completed
CRM events
  • lead.created - New CRM lead created
  • booking.created - New CRM booking created (or a lead converted to a booking)
  • booking.phlebotomist_assigned - A phlebotomist was assigned to the booking
  • booking.phlebotomist_arrived - The phlebotomist reached the patient’s location
  • booking.phlebotomist_sample_collected - The phlebotomist collected the sample
  • booking.phlebotomist_sample_submitted - The sample was submitted back to the lab (auto-creates the bill)
  • booking.rescheduled - The booking’s scheduled date or time was changed
  • booking.cancelled - The booking was cancelled

Authorizations

Authorization
string
header
required

JWT token obtained from the authentication endpoint

Body

application/json
labID
string
required

Flabs lab (branch) identifier. Fetch the list of labs via GET /client/labs.

events
enum<string>[]
required

List of events to subscribe to

Available options:
bill.created,
bill.deleted,
bill.completed,
report.completed,
lead.created,
booking.created,
booking.phlebotomist_assigned,
booking.phlebotomist_arrived,
booking.phlebotomist_sample_collected,
booking.phlebotomist_sample_submitted,
booking.rescheduled,
booking.cancelled
endpoint
string<uri>
required

Your webhook endpoint URL that will receive the event notifications (must accept POST requests)

protocol
enum<string>
required

Protocol for webhook delivery (only HTTPS is supported)

Available options:
https
corporateUser
string

Party-scoped accounts only. Deliver only this corporate's events to the webhook. Pass either corporateUser or organization, not both.

organization
string

Party-scoped accounts only. Deliver only this doctor/hospital's events to the webhook. Pass either corporateUser or organization, not both.

Response

Successful webhook

success
boolean
Example:

true

message
string
Example:

"Events subscribed successfully"