Skip to main content
POST
Create pre-booking

Overview

Create a pre-booking in the Flabs system to initiate the laboratory workflow. This endpoint accepts patient details and test/package information to start the billing process.

Authentication

Requires a valid Bearer token from the authentication API.

Request Parameters

Required Fields

Test/Package Requirements

At least one of the following is required:

Optional Fields

Important Notes

  • Patient details are mandatory with all required fields - At least one test or package array must be provided - Barcodes must be unique across the system
  • Contact Flabs team for available lead sources - Contact Flabs team for doctor / hospital IDs and valid rate_list_type values
  • Use flabs_id or id for mapped tests - Only id is available for mapped packages (no flabs_id) - The preBookingID in the response is used to track the booking through the workflow

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.

patient_details
object
required
integrator_id
string
required

Your unique identifier for this booking

lead_source
string
required

Source of the lead (contact Flabs team for available sources)

unmapped_tests
string[]

Tests not mapped between your system and Flabs

mapped_tests
object[]

Tests mapped with Flabs system

mapped_packages
object[]

Packages mapped with Flabs system

unmapped_packages
string[]

Packages not mapped between your system and Flabs

unmapped_packages_with_tests
object[]

Packages with associated tests not mapped between your system and Flabs

barCode
string

Optional barcode (must be unique)

Response

Pre-booking created successfully

success
boolean
Example:

true

message
string
Example:

"Booking created successfully"

integrator_id
string

Your unique integrator ID

preBookingID
string

Flabs pre-booking identifier