LabStack

Labs API

v1.3.57Sign in

Authentication

API key issued by LabStack. Pass this in every request header. Your store can hold two active keys at once, so you can move to a new key before the old one is revoked. A key may have an expiry date; a request made with an expired or revoked key is refused as unauthorized. Header: ls-api-key

API for integrating lab diagnostics — availability checks, package catalog, requests (enquiries), order management, report retrieval, and health camps. Every call must include a valid ls-api-key header.

Admin

Get wallet balance

Returns the store's LabStack wallet balance (currently a stub returning 0).

Responses

200

Wallet balance

{
statusstring
Enum:successfailure
walletBalanceinteger

The store wallet balance

}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "walletBalance": 0
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/admin/getBalance' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Service health check

Verifies database connectivity.

Responses

200

Service healthy

{
statusstring
Enum:successfailure
healthyboolean

Whether all systems are active and working as expected

}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
503

Service unhealthy

Sample response
{
  "status": "success",
  "healthy": true
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/admin/status' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Availability

Check serviceability

Finds store-network labs that service a location (home-sample and center-visit). Provide pincode OR latitude+longitude. Pass service to only return labs that offer that service at the location.

Query parameters

pincodestringOptional

Optional. The pincode to check for service availability. Required if no latitude/longitude given. 6 digits exactly.

latitudestringOptional

Optional. Latitude to check for service availability. Required if no pincode given. -90 <= latitude <= 90.

longitudestringOptional

Optional. Longitude to check for service availability. Required if no pincode given. -180 <= longitude <= 180.

unitFloorBuildingstringOptional

Optional. Ignored if latitude and longitude are present. Will not be used to fetch lat/long. Pincode must be present to be used.

addressstringOptional

Optional. Part of the patient address. Used with pincode to derive latitude/longitude when none is given, and improves the accuracy of the serviceability result.

localitystringOptional

Optional. Part of the patient address. Used with pincode to derive latitude/longitude when none is given, and improves the accuracy of the serviceability result.

citystringOptional

Optional. Part of the patient address. Used with pincode to derive latitude/longitude when none is given, and improves the accuracy of the serviceability result.

statestringOptional

Optional. Part of the patient address. Used with pincode to derive latitude/longitude when none is given, and improves the accuracy of the serviceability result.

servicestringOptional
Enum:HOME_SAMPLECENTER_VISIT

Optional. Only return labs that offer this service at the location. Each returned lab still lists every service it offers there in type, so type always contains the requested service and may contain others.

testIdsstringOptional

Optional. Only check serviceability for labs that offer the given tests. Comma-separated LS test ids.

packageIdsstringOptional

Optional. Only check serviceability for labs that offer the given packages. Comma-separated LS package ids.

Responses

200

Success

{
statusstring
Enum:successfailure
messagestring

Success detail (e.g. "8 labs found") or reason for failure

pincodestring | null

The pincode being serviced

latitudenumber

The latitude being serviced

longitudenumber

The longitude being serviced

labsarray<object>
{
typearray<string>
labNamestring
lsLabIdnumber
lsChainIdnumber | null

Null if the lab is not part of a chain

}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "message": "2 labs found",
  "pincode": "560035",
  "latitude": 13.045163,
  "longitude": 77.537758,
  "labs": [
    {
      "type": [
        "HOME_SAMPLE",
        "CENTER_VISIT"
      ],
      "labName": "Lab name 1",
      "lsLabId": 347484,
      "lsChainId": 1
    },
    {
      "type": [
        "CENTER_VISIT"
      ],
      "labName": "Lab name 2",
      "lsLabId": 46575,
      "lsChainId": null
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/availability/checkServiceability?pincode=560035&latitude=13.045163&longitude=77.537758&unitFloorBuilding=&address=&locality=&city=&state=&service=&testIds=LSL110001,LSL120031&packageIds=LSP11002,LSP11004' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Get lab slots

Returns available appointment slots per lab for a date. Provide pincode OR latitude+longitude.

Query parameters

datestringRequired

Date to fetch slots for, in YYYY-MM-DD format. Must not be before today in India Standard Time (IST).

pincodestringOptional

Optional. The pincode to check for availability. Required if no latitude/longitude given. 6 digits exactly.

latitudestringOptional

Optional. Required if no pincode given. -90 <= latitude <= 90.

longitudestringOptional

Optional. Required if no pincode given. -180 <= longitude <= 180.

servicestringOptional
Enum:HOME_SAMPLECENTER_VISIT

Optional. Filter for slots by labs of a particular order type.

rangestringOptional

Optional. Range in KM of labs to fetch center-visit slots for. Defaults to 10 Km (max 100 Km).

labIdstringOptional

Optional. Single lab id to fetch slots for.

labIdsstringOptional

Optional. Comma-separated list of lab ids to fetch slots for (only included if they meet the other filters).

testIdsstringOptional

Optional. For center-visit slots, the comma-separated LS test ids that will be selected.

packageIdsstringOptional

Optional. For center-visit slots, the comma-separated LS package ids that will be selected.

Responses

200

Success

{
statusstring
Enum:successfailure
messagestring

Number of labs and slots found

pincodestring | null

The pincode being serviced

latitudenumber

The latitude being serviced

longitudenumber

The longitude being serviced

datestring

Date being checked (YYYY-MM-DD)

slotsarray<object>
{
labNamestring
labLogostring | null
lsLabIdnumber
lsChainIdnumber | null
servicestring
Enum:HOME_SAMPLECENTER_VISIT
timingarray<string>

Available slot times in HH:MM (24-hour)

distancenumber | null

Distance in KM. Only for center-visit labs; absent/null for home-sample labs.

}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "message": "2 labs and 8 slots found",
  "pincode": "560035",
  "latitude": 13.045163,
  "longitude": 77.537758,
  "date": "2026-08-01",
  "slots": [
    {
      "labName": "Lab name 1",
      "labLogo": "www.image.com",
      "lsLabId": 347484,
      "lsChainId": 4,
      "service": "HOME_SAMPLE",
      "timing": [
        "08:15",
        "09:15",
        "09:45",
        "14:00"
      ]
    },
    {
      "labName": "Lab name 2",
      "labLogo": null,
      "lsLabId": 347485,
      "lsChainId": null,
      "service": "CENTER_VISIT",
      "timing": [
        "10:15",
        "11:30",
        "12:45",
        "15:00"
      ],
      "distance": 83.01323
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/availability/getSlots?date=2026-08-01&pincode=560035&latitude=13.045163&longitude=77.537758&service=&range=&labId=&labIds=&testIds=LSL110001&packageIds=LSP11002' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Camp

Get camp details

Returns full detail for one health camp (corporate, dates, phlebos, coordinators, lab, orders).

Query parameters

campLsIdstringRequired

LS id of the camp to fetch details for.

Responses

200

Success

{
statusstring
Enum:successfailure
campDetailsobject
{
campLsIdstring
corporateNamestring
datesarray<string>
ordersarray<number>

Order ids associated with the camp

addressstring
localitystring | null
citystring
statestring
pincodestring
phlebosarray<object>
{
namestring
mobilestring
altMobilestring | null
emailstring | null
}[]
labCoordinatorsarray<object>
{
namestring
mobilestring
altMobilestring | null
emailstring | null
}[]
labEscalatorsarray<object>
{
namestring
mobilestring
altMobilestring | null
emailstring | null
}[]
labNamestring
labLogostring | null
lsLabIdnumber
lsChainIdnumber | null
notesstring | null
campStatusstring
Enum:ONGOINGCOMPLETEDREPORTS_DELIVEREDCANCELLED
}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "campDetails": {
    "campLsId": "CMP10024",
    "corporateName": "XYZ 123",
    "dates": [
      "2025-01-24",
      "2025-01-25"
    ],
    "orders": [
      1003,
      1004,
      1005,
      1006,
      1007,
      1008,
      1009,
      1010
    ],
    "address": "123 Main Road",
    "locality": null,
    "city": "Bangalore",
    "state": "Karnataka",
    "pincode": "560013",
    "phlebos": [
      {
        "name": "Bob Smith",
        "mobile": "8047359194",
        "altMobile": null,
        "email": null
      }
    ],
    "labCoordinators": [
      {
        "name": "Bob Smith",
        "mobile": "8047359194",
        "altMobile": null,
        "email": "bobsmith@example.com"
      }
    ],
    "labEscalators": [
      {
        "name": "Bob Smith",
        "mobile": "8047359194",
        "altMobile": null,
        "email": "bobsmith@example.com"
      }
    ],
    "labName": "Orange Health - Bangalore",
    "labLogo": null,
    "lsLabId": 4,
    "lsChainId": 2,
    "notes": "Went well",
    "campStatus": "REPORTS_DELIVERED"
  }
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/camp/getCampDetails?campLsId=CMP10024' \
  -H 'ls-api-key: <YOUR_API_KEY>'

List camps

Lists the store's camps, optionally filtered by date range.

Query parameters

startDatestringOptional

Optional. Filter camps conducted on or after this date (YYYY-MM-DD).

endDatestringOptional

Optional. Filter camps conducted on or before this date (YYYY-MM-DD).

Responses

200

Success

{
statusstring
Enum:successfailure
campsarray<object>
{
campLsIdstring
corporateNamestring
datesarray<string>

Camp dates (YYYY-MM-DD)

numOrdersnumber
labNamestring
labLogostring | null
lsLabIdnumber
lsChainIdnumber | null
campStatusstring
Enum:ONGOINGCOMPLETEDREPORTS_DELIVEREDCANCELLED
}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "camps": [
    {
      "campLsId": "CMP10031",
      "corporateName": "ABC 123",
      "dates": [
        "2025-02-14",
        "2025-02-15"
      ],
      "numOrders": 43,
      "labName": "Orange Health - Bangalore",
      "labLogo": null,
      "lsLabId": 4,
      "lsChainId": 2,
      "campStatus": "COMPLETED"
    },
    {
      "campLsId": "CMP10033",
      "corporateName": "ABC 124",
      "dates": [
        "2025-03-04",
        "2025-03-05"
      ],
      "numOrders": 27,
      "labName": "RedCliffe",
      "labLogo": null,
      "lsLabId": 2,
      "lsChainId": null,
      "campStatus": "REPORTS_DELIVERED"
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/camp/getCamps?startDate=2025-02-01&endDate=2025-03-31' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Get camp slots

Returns generated slot availability per camp date.

Query parameters

campLsIdstringRequired

LS id of the camp to fetch slots for.

Responses

200

Success

{
statusstring
Enum:successfailure
slotsByDatearray<object>

Available slots per camp date. Dates/times with no availability are filtered out.

{
datestring

YYYY-MM-DD

slotsarray<object>
{
timestring

HH:MM (24-hour)

availablenumber
capacitynumber
}[]
}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "slotsByDate": [
    {
      "date": "2025-09-29",
      "slots": [
        {
          "time": "06:00",
          "available": 3,
          "capacity": 5
        },
        {
          "time": "06:15",
          "available": 4,
          "capacity": 5
        },
        {
          "time": "06:30",
          "available": 5,
          "capacity": 5
        }
      ]
    },
    {
      "date": "2025-09-30",
      "slots": [
        {
          "time": "06:00",
          "available": 4,
          "capacity": 5
        },
        {
          "time": "06:15",
          "available": 5,
          "capacity": 5
        },
        {
          "time": "06:45",
          "available": 5,
          "capacity": 5
        }
      ]
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/camp/getCampSlots?campLsId=CMP10024' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Place a camp order

Places an order against a health camp (validates the appointment slot against the camp's generated slots). uniqueId is optional (auto-generated when omitted). For a patient already on record (same uniqueId), a recorded gender or date of birth is kept even if this request sends different ones; only a value not yet recorded is taken from the request. Use POST /api/admin/v1.0/user/updateUserDetails to change them.

Request bodyRequired

{
campLsIdstringRequired

LS id of the camp to place the order in.

isVipbooleanOptional

Optional. Marks the order as VIP.

referenceIdstringOptional

Optional. Your own reference id for the order.

packageIdsarray<string>Optional

LS package ids (e.g. LSP11002). Provide packageIds and/or testIds.

testIdsarray<string>Optional

LS test ids (e.g. LSL110001). Provide packageIds and/or testIds.

appointmentstring · date-timeRequired

Appointment date-time, ISO 8601 format. Must match a generated camp slot.

notesstringOptional

Optional. Free-text notes for the order.

uniqueIdstringOptional

Optional. Uniquely identifies the user; auto-generated ({mobile}-{name}) when omitted.

namestringRequired

Consumer name.

emailstringRequired

Consumer email address.

dateOfBirthstringOptional

YYYY-MM-DD. Required if age is not provided.

agenumberOptional

Consumer age. Required if dateOfBirth is not provided.

genderstringRequired
Enum:MALEFEMALEOTHERS

Consumer gender.

mobilestringRequired

10 digits, cannot start with 0.

altContactstringOptional

Optional. Alternate 10-digit contact number.

mainUserUniqueIdstringOptional

Optional. uniqueId of the main user to mark this user as a dependent.

relationshipstringOptional
Enum:OTHERHUSBANDWIFEFATHERMOTHERSONDAUGHTERGRANDFATHERGRANDMOTHERGRANDSONGRANDDAUGHTERSON_IN_LAWDAUGHTER_IN_LAWBROTHERSISTERBROTHER_IN_LAWSISTER_IN_LAWUNCLEAUNTCOUSINNEPHEWNIECEMOTHER_IN_LAWFATHER_IN_LAWPARTNERFRIENDNEIGHBOUR

Optional. Dependent's relationship to the main user. Defaults to OTHER.

}

Responses

200

Success

{
statusstring
Enum:successfailure
orderobject
{
campLsIdstring
orderIdnumber
preparationsarray<string>

Preparations to do before sample collection

orderStatusstring
Enum:PENDINGCREATEDORDER_SCHEDULEDPHLEBO_ASSIGNEDSAMPLE_COLLECTEDSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_PROCESSEDCANCELEDRESCHEDULEDPARTIAL_DELIVEREDREPORT_DELIVERED
labApiErrorstring | null

Error string from the lab, or null

}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "order": {
    "campLsId": "CMP100012",
    "orderId": 47590,
    "preparations": [
      "Fasting for 12 hours"
    ],
    "orderStatus": "CREATED",
    "labApiError": null
  }
}

Request example

Request example (cURL)
curl -X POST 'https://integration.labstack.in/api/v1.3/camp/placeCampOrder' \
  -H 'ls-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "campLsId": "CMP100012",
    "isVip": true,
    "referenceId": "REF-123",
    "packageIds": [
      "LSP11002",
      "LSP11004"
    ],
    "testIds": [
      "LSL110001",
      "LSL120031"
    ],
    "appointment": "2025-06-01T11:00:00+05:30",
    "notes": "Patient is old, veins are thin.",
    "uniqueId": "U1234",
    "name": "Bob Smith",
    "email": "bobsmith@example.com",
    "dateOfBirth": "2000-01-01",
    "gender": "MALE",
    "mobile": "8047359194",
    "altContact": "8047359194",
    "mainUserUniqueId": "U1233",
    "relationship": "BROTHER"
  }'

Network

List store discounts

Returns the store's active lab-order discounts (incl. buy-X-get-Y offers, validity, and selection modes).

Responses

200

Store discounts

{
statusstring
Enum:successfailure
discountsarray<object>
{
discountIdstring
namestring
descriptionstring | null
typestring
percentagenumber | null
maxAmountnumber | null
amountnumber | null
conditionsarray<object>

Optional conditions of varying types (e.g. MIN_CART_VALUE, COUPON_CODE, CART_VALUE_BETWEEN).

validFromstring | null
validUntilstring | null
labModestring
Enum:WHITELISTBLACKLIST
packageModestring
Enum:WHITELISTBLACKLIST
testModestring
Enum:WHITELISTBLACKLIST
selectedLabIdsarray<number>
selectedPackageLsIdsarray<string>
selectedTestLsIdsarray<string>
buyXGetYobject | null
{
rewardProductsarray<object>
{
lsIdstring
namestring
typestring
}[]
rewardTypestring
Enum:FREEDISCOUNTED
rewardDiscountPercentagenumber
rewardQuantitynumber
}
maxUsageTotalnumber | null
maxUsagePerMobilenumber | null
}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "discounts": [
    {
      "discountId": "DISC10001",
      "name": "Summer Sale",
      "description": "Flat 10% off on all packages",
      "type": "PERCENTAGE",
      "percentage": 10,
      "maxAmount": 500,
      "amount": null,
      "conditions": [
        {
          "type": "MIN_CART_VALUE",
          "value": 200
        },
        {
          "type": "COUPON_CODE",
          "value": "SUMMER100"
        }
      ],
      "validFrom": "2025-06-01T00:00:00.000Z",
      "validUntil": "2025-08-31T23:59:59.000Z",
      "labMode": "BLACKLIST",
      "packageMode": "WHITELIST",
      "testMode": "BLACKLIST",
      "selectedLabIds": [],
      "selectedPackageLsIds": [
        "LSP10023",
        "LSP10024"
      ],
      "selectedTestLsIds": [],
      "buyXGetY": null,
      "maxUsageTotal": 1000,
      "maxUsagePerMobile": 1
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getDiscounts' \
  -H 'ls-api-key: <YOUR_API_KEY>'

List labs

Returns the labs active for your store, each with its chain and the packages it offers from your store network. type is the kind of center. A COLLECTION_CENTER is a sample-collection point that serves home sample collection and normally takes no center visits, so it does not do scans. A DIAGNOSTIC_CENTER or HOSPITAL takes center visits; which scans and other center tests it does depends on the tests it offers. Decide which services to offer at a lab from isHomeSampleSupported and isCenterVisitSupported rather than from type, and pass testIds or packageIds to checkServiceability or getSlots to find the labs that offer all of them.

Query parameters

labIdsstringOptional

Optional. Only fetch the labs with these comma-separated lab ids.

Responses

200

Store labs

{
statusstring
Enum:successfailure
labsarray<object>
{
labNamestring
labLogostring | null
labIdnumber
lsChainIdnumber | null

Groups the labs of one brand. A chain id is never reused. Null if the lab is not linked to a chain.

chainNamestring | null

Name of the chain. Null if the lab is not linked to a chain.

chainLogostring | null

URL of the chain's logo, or null.

typestring
Enum:COLLECTION_CENTERDIAGNOSTIC_CENTERHOSPITAL

The kind of center. See the description above.

addressstring | null
localitystring | null
citystring | null
statestring | null
pincodestring | null
latitudenumber | null

Null when the lab's location is not available.

longitudenumber | null

Null when the lab's location is not available.

isHomeSampleSupportedboolean

True if the lab does home sample collection.

isCenterVisitSupportedboolean

True if the patient can visit the lab for tests.

packagesarray<object>

Every package from your store network that this lab offers, for home sample collection and center visits alike. It is not filtered by service; whether a package can be done at home or at a center is given by isHomeSampleSupported and isCenterVisitSupported on getPackage.

{
lsIdstring
namestring
}[]
}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "labs": [
    {
      "labName": "Prima Diagnostics - Jayanagar",
      "labLogo": "www.image.com",
      "labId": 32632,
      "lsChainId": 12,
      "chainName": "Prima Diagnostics",
      "chainLogo": "www.image.com",
      "type": "COLLECTION_CENTER",
      "address": "435, 3rd Main, 4th T Block",
      "locality": "Jayanagar",
      "city": "Bangalore",
      "state": "Karnataka",
      "pincode": "560035",
      "latitude": 13.275472,
      "longitude": 77.2323213,
      "isHomeSampleSupported": true,
      "isCenterVisitSupported": false,
      "packages": [
        {
          "lsId": "LSP10019",
          "name": "Comprehensive Allergy Panel"
        },
        {
          "lsId": "LSP10003",
          "name": "Advanced Package"
        },
        {
          "lsId": "LSP10020",
          "name": "Disease Risk Screening Package"
        }
      ]
    },
    {
      "labName": "Spectrum Diagnostics",
      "labLogo": null,
      "labId": 56,
      "lsChainId": null,
      "chainName": null,
      "chainLogo": null,
      "type": "DIAGNOSTIC_CENTER",
      "address": "31, Dr Rajkumar Road",
      "locality": "Rajajinagar",
      "city": "Bangalore",
      "state": "Karnataka",
      "pincode": "560010",
      "latitude": 13.03375432,
      "longitude": 78.2323993,
      "isHomeSampleSupported": true,
      "isCenterVisitSupported": true,
      "packages": [
        {
          "lsId": "LSP10029",
          "name": "LS Busy Professional"
        },
        {
          "lsId": "LSP10003",
          "name": "Advanced Package"
        }
      ]
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getLabs?labIds=32632,56' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Get package details

Returns a single package with per-lab pricing and serviceability.

Query parameters

packageIdstringRequired

The LS id of the package to fetch (e.g. LSP10023).

pincodestringOptional

Optional. Filter labs servicing this pincode; adds distance for center-visit labs.

latitudestringOptional

Optional. Filter labs servicing this lat/long; adds distance for center-visit labs.

longitudestringOptional

Optional. Filter labs servicing this lat/long; adds distance for center-visit labs.

Responses

200

Package details

{
statusstring
Enum:successfailure
packageIdstring
packageNamestring
displayNamestring

Store-configured name; falls back to packageName

descriptionstring | null
pricenumber

Max price charged for this package across labs

mrpnumber | null

Default MRP configured in LabStack; null if none

tatinteger | null

Deprecated: the turnaround time can differ between labs, so use minTat and maxTat, or each lab's tat in labs. Same value as maxTat.

minTatinteger | null

Shortest turnaround time in hours among the labs listed in labs; null if none is set

maxTatinteger | null

Longest turnaround time in hours among the labs listed in labs; null if none is set

isHomeSampleSupportedboolean
isCenterVisitSupportedboolean
isKitBasedSupportedboolean
sampleTypesarray<string>

Sample types across all tests in the package

testsarray<object>
{
testNamestring
lsTestIdstring
}[]
labsarray<object>

Labs in the store network supporting the package (filtered by location if provided).

{
labNamestring
labLogostring | null
lsLabIdnumber
lsChainIdnumber | null
mrpnumber

MRP for this package at this lab (store MRP, may be lab-overridden)

pricenumber

Store's cost for this package at this lab

labMrpnumber | null

Lab's own consumer MRP, or null if not configured

tatinteger | null

Turnaround time in hours for this package at this lab; null if none is set

sampleReportUrlstring | null
isHomeSampleSupportedboolean
isCenterVisitSupportedboolean
distancenumber | null

Only when a location is given; null if the lab has no center visit

requiredParametersarray<object>

Individual parameters expected in the lab report for this package (requires configuration).

{
testNamestring
lsTestIdstring
}[]
}[]
tagsarray<object>
{
tagIdnumber
tagNamestring
categoryIdnumber
categoryNamestring
}[]
preparationsarray<string>

Preparations to do before sample collection

}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "packageId": "LSP10001",
  "packageName": "Liver Function Test",
  "displayName": "Liver Care",
  "description": null,
  "price": 3800,
  "mrp": null,
  "tat": 36,
  "minTat": 24,
  "maxTat": 36,
  "isHomeSampleSupported": true,
  "isCenterVisitSupported": true,
  "isKitBasedSupported": false,
  "sampleTypes": [
    "Blood"
  ],
  "tests": [
    {
      "testName": "Creatine",
      "lsTestId": "LS120021"
    },
    {
      "testName": "Urea",
      "lsTestId": "LS120022"
    }
  ],
  "labs": [
    {
      "labName": "Lab name 1",
      "labLogo": "www.image.com",
      "lsLabId": 3,
      "lsChainId": null,
      "mrp": 4000,
      "price": 3200,
      "labMrp": null,
      "tat": 24,
      "sampleReportUrl": null,
      "isHomeSampleSupported": true,
      "isCenterVisitSupported": false,
      "distance": 2.00032,
      "requiredParameters": [
        {
          "testName": "Bilirubin Direct",
          "lsTestId": "LSL100108"
        },
        {
          "testName": "Bilirubin Total",
          "lsTestId": "LSL100109"
        },
        {
          "testName": "Bilirubin Indirect",
          "lsTestId": "LSL101495"
        }
      ]
    },
    {
      "labName": "Lab name 2",
      "labLogo": null,
      "lsLabId": 16,
      "lsChainId": 2,
      "mrp": 4200,
      "price": 3800,
      "labMrp": 5000,
      "tat": 36,
      "sampleReportUrl": "https://console.labstack.in/api/v1.3/network/getSampleReport?packageLsId=LSP10001&labId=3",
      "isHomeSampleSupported": true,
      "isCenterVisitSupported": true,
      "distance": 3.2323,
      "requiredParameters": [
        {
          "testName": "Bilirubin Direct",
          "lsTestId": "LSL100108"
        },
        {
          "testName": "Bilirubin Total",
          "lsTestId": "LSL100109"
        }
      ]
    }
  ],
  "tags": [
    {
      "tagId": 2,
      "tagName": "Kidney",
      "categoryId": 1,
      "categoryName": "Organ"
    },
    {
      "tagId": 6,
      "tagName": "Exercise",
      "categoryId": 3,
      "categoryName": "Lifestyle"
    }
  ],
  "preparations": [
    "Fasting for 12 hours",
    "Stop cholesterol medicines"
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getPackage?packageId=LSP10023&pincode=560035&latitude=13.045163&longitude=77.537758' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Get package preparations

Returns comma-joined preparation instructions for a package.

Query parameters

packageIdstringRequired

Package id to fetch preparations for (e.g. LSP10001). Deprecated - preparations are also provided via getPackage.

Responses

200

Package preparations

{
statusstring
preparationsstring

Comma-separated list of preparation phrases

}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "preparations": "Fasting for 12 hours, Stop cholesterol medicines"
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getPackagePreparations?packageId=LSP10001' \
  -H 'ls-api-key: <YOUR_API_KEY>'

List packages

Lists packages and super-packages with price ranges, filtered by serviceable location. Optionally restrict the results to packages offered by specific labs via labIds. Filters combine, so a package is only returned if it is offered by a lab that satisfies every filter supplied. packages and super-packages are matched independently, so both fields are always present in a success response - either may be empty while the other is not.

Query parameters

pincodestringOptional

Optional. Filter to packages offered by labs servicing this pincode. Response may be delayed while checking with labs.

latitudestringOptional

Optional. Filter to packages offered by labs servicing this lat/long.

longitudestringOptional

Optional. Filter to packages offered by labs servicing this lat/long.

labIdsstringOptional

Optional. Comma-separated lab ids (as returned by List labs). Only packages offered by these labs are returned. Every id must be a lab in your store network, otherwise the request fails. A lab that is in your network but temporarily unavailable is accepted and simply contributes no packages, so the response can be empty rather than an error.

Responses

200

Packages and super-packages

{
statusstring
Enum:successfailure
countinteger

Number of packages plus super-packages returned

packagesarray<object>
{
packageIdstring
packageNamestring
displayNamestring

Store-configured name; falls back to packageName

descriptionstring | null
pricenumber | null

Deprecated. Same value as maxPrice.

minPricenumber | null

Lowest price across labs for your store; null if no lab has a price set

maxPricenumber | null

Highest price across labs for your store; null if no lab has a price set

minMrpnumber | null
maxMrpnumber | null
tatnumber | null

Deprecated: the turnaround time can differ between labs, so use minTat and maxTat instead. Same value as maxTat.

minTatnumber | null

Shortest turnaround time in hours among the labs offering the package for this request (after any labIds and location filtering); null if none is set

maxTatnumber | null

Longest turnaround time in hours among the labs offering the package for this request (after any labIds and location filtering); null if none is set. Pass a single lab in labIds to get that lab's turnaround time in both minTat and maxTat.

sampleTypesarray<string>

Sample types needed across the tests in the package, without duplicates

testsarray<object>
{
testNamestring
lsTestIdstring
}[]
tagsarray<object>
{
tagIdnumber
tagNamestring
categoryIdnumber
categoryNamestring
}[]
}[]
superPackagesarray<object>

Super-packages: bundles of packages offered together. Each bundled package is a sub-package, ordered by its own id.

{
packageIdstring

Super-package id. To order, pass a sub-package id instead.

packageNamestring
descriptionstring | null
pricenumber | null

Price of the super-package for your store; null if none is set

sampleTypesarray<string>

Sample types needed across all its sub-packages, without duplicates

testsarray<object>

Every test across its sub-packages, without duplicates

{
testNamestring
lsTestIdstring
}[]
subPackageCountinteger
subPackagesarray<object>
{
idstring

Sub-package id. Pass it in packageIds to order this sub-package.

testsarray<object>
{
testNamestring
lsTestIdstring
}[]
orderTypestring

The orderType an order for this sub-package must use, e.g. HOME_SAMPLE or CENTER_VISIT

}[]
}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "count": 3,
  "packages": [
    {
      "packageId": "LSP10023",
      "packageName": "Renal Profile",
      "displayName": "Renal Supreme",
      "description": null,
      "price": 3800,
      "minPrice": 3200,
      "maxPrice": 3800,
      "minMrp": null,
      "maxMrp": null,
      "tat": 36,
      "minTat": 24,
      "maxTat": 36,
      "sampleTypes": [
        "Blood",
        "Urine",
        "Stool"
      ],
      "tests": [
        {
          "testName": "Creatine",
          "lsTestId": "LS120021"
        },
        {
          "testName": "Urea",
          "lsTestId": "LS120022"
        }
      ],
      "tags": [
        {
          "tagId": 2,
          "tagName": "Kidney",
          "categoryId": 1,
          "categoryName": "Organ"
        },
        {
          "tagId": 6,
          "tagName": "Exercise",
          "categoryId": 3,
          "categoryName": "Lifestyle"
        }
      ]
    },
    {
      "packageId": "LSP10024",
      "packageName": "Comprehensive Metabolic Panel",
      "displayName": "Comprehensive Metabolic Panel",
      "description": "This package is great!",
      "price": 5000,
      "minPrice": 5000,
      "maxPrice": 5000,
      "minMrp": null,
      "maxMrp": null,
      "tat": 48,
      "minTat": 48,
      "maxTat": 48,
      "sampleTypes": [
        "Serum"
      ],
      "tests": [
        {
          "testName": "TSH",
          "lsTestId": "LS120023"
        },
        {
          "testName": "T4",
          "lsTestId": "LS120024"
        }
      ],
      "tags": []
    }
  ],
  "superPackages": [
    {
      "packageId": "LSSP1001",
      "packageName": "Annual Wellness Plan",
      "description": null,
      "price": 7500,
      "sampleTypes": [
        "Blood",
        "Urine",
        "Stool",
        "Serum"
      ],
      "tests": [
        {
          "testName": "Creatine",
          "lsTestId": "LS120021"
        },
        {
          "testName": "Urea",
          "lsTestId": "LS120022"
        },
        {
          "testName": "TSH",
          "lsTestId": "LS120023"
        },
        {
          "testName": "T4",
          "lsTestId": "LS120024"
        }
      ],
      "subPackageCount": 2,
      "subPackages": [
        {
          "id": "LSSP1001-10023",
          "tests": [
            {
              "testName": "Creatine",
              "lsTestId": "LS120021"
            },
            {
              "testName": "Urea",
              "lsTestId": "LS120022"
            }
          ],
          "orderType": "HOME_SAMPLE"
        },
        {
          "id": "LSSP1001-10024",
          "tests": [
            {
              "testName": "TSH",
              "lsTestId": "LS120023"
            },
            {
              "testName": "T4",
              "lsTestId": "LS120024"
            }
          ],
          "orderType": "CENTER_VISIT"
        }
      ]
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getPackages?pincode=560035&latitude=13.045163&longitude=77.537758&labIds=32632,56' \
  -H 'ls-api-key: <YOUR_API_KEY>'

List package tags

Returns all package tags/categories available to the store.

Responses

200

Package tags

{
statusstring
Enum:successfailure
tagsarray<object>
{
tagIdnumber
tagNamestring
categoryIdnumber
categoryNamestring
}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "tags": [
    {
      "tagId": 2,
      "tagName": "Kidney",
      "categoryId": 1,
      "categoryName": "Organ"
    },
    {
      "tagId": 6,
      "tagName": "Exercise",
      "categoryId": 3,
      "categoryName": "Lifestyle"
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getPackageTags' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Download sample report

Streams a sample report PDF for a package at a lab. On success the response has content-type application/pdf and content-disposition attachment (the browser downloads the file). Returns a 4XX error if no sample report is available for the package/lab.

Query parameters

packageLsIdstringRequired

LS package id (e.g. LSP10001).

labIdstringRequired

Lab id to fetch the sample report for.

Responses

200

Sample report PDF

400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getSampleReport?packageLsId=LSP10001&labId=3' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Get test details

Returns a single test with per-lab pricing (the store's configured rates applied) and standard ranges.

Query parameters

testIdstringRequired

The LS id of the test to fetch (e.g. LSL100336).

pincodestringOptional

Optional. Filter labs servicing this pincode.

latitudestringOptional

Optional. Filter labs servicing this lat/long.

longitudestringOptional

Optional. Filter labs servicing this lat/long.

Responses

200

Test details

{
statusstring
Enum:successfailure
lsIdstring
namestring
categorystring
Enum:ROUTINENON_ROUTINE
descriptionstring
isHomeSampleSupportedboolean
isCenterVisitSupportedboolean
minTatinteger | null

Lowest TAT across labs (hours); null if none configured

minMrpnumber | null

Lowest MRP across labs; null if none configured

aliasesarray<string>
labsarray<object>
{
labNamestring
labLogostring | null
lsLabIdnumber
lsChainIdnumber | null
mrpnumber

Lab's suggested sale price for the test

pricenumber

Store's cost for the test at this lab: the MRP with the store's configured rates applied

}[]
testRangesobject | null
{
unitsstring
typestring
Enum:RANGEDESCRIPTIVE
rangesarray<object>
{
demographicstring
Enum:NONEGENDERAGE_BRACKET
demographicValuestring | null

e.g. MALE / FEMALE / OTHERS or NEONATAL / ADULT

colorstring
Enum:GREENYELLOWRED
labelstring | null
lownumber | null

RANGE only; at least one of low/high is set

highnumber | null

RANGE only; at least one of low/high is set

}[]
}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "lsId": "LSL100336",
  "name": "Glycosylated hemoglobin",
  "category": "ROUTINE",
  "description": "Measures average blood glucose over the past 2-3 months",
  "isHomeSampleSupported": true,
  "isCenterVisitSupported": true,
  "minTat": 24,
  "minMrp": 300,
  "aliases": [
    "HbA1c",
    "Glycosylated Hb"
  ],
  "labs": [
    {
      "labName": "Redcliffe Labs Pvt Ltd",
      "labLogo": "www.image.com",
      "lsLabId": 2,
      "lsChainId": null,
      "mrp": 3100,
      "price": 2480
    },
    {
      "labName": "Orange Health - Bangalore",
      "labLogo": null,
      "lsLabId": 4,
      "lsChainId": 2,
      "mrp": 1900,
      "price": 1520
    }
  ],
  "testRanges": {
    "units": "%",
    "type": "RANGE",
    "ranges": [
      {
        "demographic": "NONE",
        "demographicValue": null,
        "color": "RED",
        "label": "Very Low",
        "low": null,
        "high": 4
      },
      {
        "demographic": "NONE",
        "demographicValue": null,
        "color": "GREEN",
        "label": "Optimal",
        "low": 4,
        "high": 5.7
      },
      {
        "demographic": "NONE",
        "demographicValue": null,
        "color": "YELLOW",
        "label": "Pre-Diabetes",
        "low": 5.7,
        "high": 6.4
      },
      {
        "demographic": "NONE",
        "demographicValue": null,
        "color": "RED",
        "label": "Diabetes",
        "low": 6.4,
        "high": null
      }
    ]
  }
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getTest?testId=LSL100336&pincode=560035&latitude=13.045163&longitude=77.537758' \
  -H 'ls-api-key: <YOUR_API_KEY>'

List tests

Returns all active tests supported by labs enabled for the authenticated store. Optionally filter to tests offered by labs that service a given pincode or lat/long — when a location filter is supplied the response may be delayed while labs are queried. Tests can also be restricted to specific labs via labIds. Filters combine, so a test is only returned if it is offered by a lab that satisfies every filter supplied. Each test's testCategory is either ROUTINE or NON_ROUTINE.

Query parameters

pincodestringOptional

Optional. Filter to tests offered by labs servicing this pincode. Response may be delayed while checking with labs.

latitudestringOptional

Optional. Filter to tests offered by labs servicing this lat/long.

longitudestringOptional

Optional. Filter to tests offered by labs servicing this lat/long.

labIdsstringOptional

Optional. Comma-separated lab ids (as returned by List labs). Only tests offered by these labs are returned. Every id must be a lab in your store network, otherwise the request fails. A lab that is in your network but temporarily unavailable is accepted and simply contributes no tests, so the response can be empty rather than an error.

Responses

200

Store tests

{
statusstring
Enum:successfailure
countinteger

Number of tests returned

testsarray<object>
{
lsIdstring
namestring
testCategorystring
Enum:ROUTINENON_ROUTINE
preparationNotesstring

Preparation instructions for the test, or an empty string if none

aliasesarray<string>

Alternative names for the test

}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "count": 2,
  "tests": [
    {
      "lsId": "LSL100336",
      "name": "Glycosylated hemoglobin",
      "testCategory": "ROUTINE",
      "preparationNotes": "",
      "aliases": [
        "HbA1c",
        "H1c Test",
        "Glycosylated Hb"
      ]
    },
    {
      "lsId": "LSL102387",
      "name": "Opiates Morphine",
      "testCategory": "NON_ROUTINE",
      "preparationNotes": "12 hours fasting",
      "aliases": [
        "Opiates"
      ]
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/network/getTests?pincode=560035&latitude=13.045163&longitude=77.537758&labIds=32632,56' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Order

Cancel an order

Cancels an order for the store and notifies the lab. An order cannot be cancelled within 30 minutes of its appointment time, or once that time has passed. This GET has side effects.

Query parameters

orderIdstringRequired

Order id to cancel.

reasonstringOptional

Optional. Cancellation reason. Defaults to "Customer requested cancellation".

Responses

200

Order cancelled

{
statusstring
orderobject
{
orderIdinteger
orderStatusstring
Enum:PENDINGCANCELED
}
}
202

Cancellation pending at lab

{
statusstring
messagestring
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "order": {
    "orderId": 47585,
    "orderStatus": "CANCELED"
  }
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/cancelOrder?orderId=47585&reason=' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Raise an order escalation

Creates a store escalation tied to an order.

Request bodyRequired

{
orderIdintegerRequired

Order id to raise the escalation against.

complaintstringRequired

Short complaint title (e.g. "Delayed report").

severitystringRequired
Enum:LOWMEDIUMHIGHCRITICAL

Escalation severity.

descriptionstringOptional

Optional. Detailed description of the issue.

notesstringOptional

Optional. Additional notes for our team.

}

Responses

200

Escalation created

{
statusstring
escalationobject
{
idinteger
complaintstring
statusstring
severitystring
Enum:LOWMEDIUMHIGHCRITICAL
}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
500

Failed to create escalation

Sample response
{
  "status": "success",
  "escalation": {
    "id": 532,
    "complaint": "Delayed report",
    "status": "PENDING",
    "severity": "MEDIUM"
  }
}

Request example

Request example (cURL)
curl -X POST 'https://integration.labstack.in/api/v1.3/order/escalation' \
  -H 'ls-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "orderId": 47585,
    "complaint": "Delayed report",
    "description": "Report was expected yesterday but has not been delivered.",
    "severity": "MEDIUM",
    "notes": "Customer has called twice."
  }'

Get order escalation details

Returns the full record of one escalation raised on one of the store's lab orders: the complaint, its description and notes, current status and severity, the patient, lab and order it concerns, and links to any attached images.

Query parameters

escalationIdintegerRequired

Responses

200

Escalation details

{
statusstring
escalationDetailsobject
{
escalationIdinteger
complaintstring

What the escalation is about.

descriptionstring | null
notesstring | null
entityTypestring
Enum:ORDER

What the escalation is raised on. Always ORDER for this endpoint.

orderIdinteger
orderTypestring
Enum:HOME_SAMPLECENTER_VISITCAMPKIT_BASEDSAMPLE_DROP_OFF
statusstring
Enum:PENDINGIN_PROGRESSRESOLVEDDISMISSED
severitystring
Enum:LOWMEDIUMHIGHCRITICAL
userNamestring | null

Name of the patient the order is for.

uniqueIdstring | null

The patient's unique id as supplied by the store.

labIdinteger | null
labNamestring | null
createdAtstring · date-time
updatedAtstring · date-time
imagesarray<object>

Images attached to the escalation, oldest first. ISSUE images were attached when the escalation was raised; RESOLUTION images were added while resolving it. Fetch each one from its link with the same ls-api-key header.

{
typestring
Enum:ISSUERESOLUTION
idinteger
linkstring

URL of getEscalationImage for this image.

}[]
}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
404

No escalation with this id exists on the store's orders

429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "escalationDetails": {
    "escalationId": 532,
    "complaint": "Delayed report",
    "description": "Report was expected yesterday but has not been delivered.",
    "notes": "Customer has called twice.",
    "entityType": "ORDER",
    "orderId": 47585,
    "orderType": "HOME_SAMPLE",
    "status": "PENDING",
    "severity": "MEDIUM",
    "userName": "Priya Sharma",
    "uniqueId": "CUST-10442",
    "labId": 12,
    "labName": "Lab name 1",
    "createdAt": "2026-10-14T06:30:10.000Z",
    "updatedAt": "2026-10-14T06:30:10.000Z",
    "images": [
      {
        "type": "ISSUE",
        "id": 1204,
        "link": "https://integration.labstack.in/api/v1.3/order/getEscalationImage?orderId=47585&type=ISSUE&imageId=1204"
      },
      {
        "type": "RESOLUTION",
        "id": 1219,
        "link": "https://integration.labstack.in/api/v1.3/order/getEscalationImage?orderId=47585&type=RESOLUTION&imageId=1219"
      }
    ]
  }
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/getEscalationDetails?escalationId=<value>' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Download an order escalation image

Returns one image attached to an escalation on the store's lab order. ISSUE images were attached when the escalation was raised; RESOLUTION images were added while resolving it. Use the ready-made links in the images array of getEscalationDetails rather than building this URL yourself.

Query parameters

orderIdintegerRequired

Order the escalation was raised on.

typestringOptional
Enum:ISSUERESOLUTION

Optional check on the kind of image requested. When given, the image must be of this kind, otherwise the request fails with 400.

imageIdintegerRequired

Identifies the image. Taken from the images array of the escalation details.

Responses

200

The image file, with its own content type (for example image/jpeg or image/png).

400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
404

No image with this id exists on an escalation for this order

429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/getEscalationImage?orderId=<value>&type=&imageId=<value>' \
  -H 'ls-api-key: <YOUR_API_KEY>'

List order escalations

Paginated list of escalations raised on the store's lab orders, newest first. Returns the basic fields only; use getEscalationDetails for the full record of one escalation.

Query parameters

statusstringOptional
Enum:PENDINGIN_PROGRESSRESOLVEDDISMISSED

Only return escalations in this status.

orderIdintegerOptional

Only return escalations raised on this order.

perPageintegerOptional

Results per page. Defaults to 200, which is also the maximum; a larger value is rejected with a 400.

pageintegerOptional

Responses

200

Escalation list

{
statusstring
totalinteger
perPageinteger
pageinteger
isLastPageboolean
escalationsarray<object>
{
escalationIdinteger
complaintstring
orderIdinteger
statusstring
Enum:PENDINGIN_PROGRESSRESOLVEDDISMISSED
severitystring
Enum:LOWMEDIUMHIGHCRITICAL
createdAtstring · date-time
updatedAtstring · date-time
}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "total": 2,
  "perPage": 200,
  "page": 1,
  "isLastPage": true,
  "escalations": [
    {
      "escalationId": 533,
      "complaint": "Phlebotomist did not arrive",
      "orderId": 47612,
      "status": "IN_PROGRESS",
      "severity": "HIGH",
      "createdAt": "2026-10-15T09:12:44.000Z",
      "updatedAt": "2026-10-15T11:40:02.000Z"
    },
    {
      "escalationId": 532,
      "complaint": "Delayed report",
      "orderId": 47585,
      "status": "PENDING",
      "severity": "MEDIUM",
      "createdAt": "2026-10-14T06:30:10.000Z",
      "updatedAt": "2026-10-14T06:30:10.000Z"
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/getEscalations?status=&orderId=&perPage=&page=' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Get order details

Returns full detail for one order including report download links and the order's status timeline. For CENTER_VISIT orders it also returns the patient's check-in link and code (checkInLink, checkInCode). Provide orderId or referenceId (at least one). orderId takes precedence and overrides referenceId if both are given.

Query parameters

orderIdstringOptional

Order id to fetch details for. Required if referenceId not given. Overrides referenceId if given.

referenceIdstringOptional

Reference id to fetch details for. Required if orderId not given. Ignored if orderId given.

Responses

200

Order details

{
statusstring
Enum:successfailure
orderDetailsobject
{
orderIdnumber
orderTypestring
Enum:HOME_SAMPLECENTER_VISITCAMPKIT_BASEDSAMPLE_DROP_OFF

CAMP is an order from a health camp. SAMPLE_DROP_OFF is an order whose sample is picked up from your store or clinic. Neither is placed through placeOrder.

orderStatusstring
Enum:PENDINGCREATEDORDER_SCHEDULEDKIT_BOOKEDKIT_DISPATCHEDKIT_DELIVEREDPATIENT_MISSEDPATIENT_VISITEDPHLEBO_ASSIGNEDPHLEBO_STARTEDPHLEBO_NO_SHOWSAMPLE_COLLECTEDKIT_PICKUP_BOOKEDKIT_PICKUP_IN_TRANSITSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_REJECTEDSAMPLE_PROCESSEDPARTIAL_DELIVEREDREPORT_DELIVEREDRESCHEDULEDCANCELED
isVipboolean
appointmentstring

ISO 8601 date-time

referenceIdstring

Same value given when placing the order; empty string if none was given

labOrderIdstring

Order's id on the lab's system; empty string until the lab assigns one

phleboNamestring | null
phleboNumberstring | null
labNamestring
labLogostring | null
lsLabIdnumber
lsChainIdnumber | null

Null if the lab is not part of a chain

packageIdsarray<string>

LS package ids in the order

testIdsarray<string>

LS test ids in the order

notesstring

Notes given when placing the order; empty string if none

uniqueIdstring
namestring
preparationsarray<string>

Preparation instructions to follow before sample collection, one per entry. Empty when the order needs none.

dateOfBirthstring | null

YYYY-MM-DD

agenumber | null
genderstring
Enum:MALEFEMALEOTHERS
mobilestring
altContactstring | null
mainUserUniqueIdstring | null

uniqueId of the main user, when the order is for a family member; null otherwise.

mainUserUnqiueIdstring | null

Deprecated. Same value as mainUserUniqueId; use that instead.

relationshipstring | null
Enum:OTHERHUSBANDWIFEFATHERMOTHERSONDAUGHTERGRANDFATHERGRANDMOTHERGRANDSONGRANDDAUGHTERSON_IN_LAWDAUGHTER_IN_LAWBROTHERSISTERBROTHER_IN_LAWSISTER_IN_LAWUNCLEAUNTCOUSINNEPHEWNIECEMOTHER_IN_LAWFATHER_IN_LAWPARTNERFRIENDNEIGHBOUR

How the patient is related to the main user, when the order is for a family member; null otherwise.

unitFloorBuildingstring | null
addressstring
localitystring | null
citystring
statestring
pincodestring
reportsarray<object>
{
linkstring

Report PDF download link

typestring
Enum:FULLPARTIAL
}[]
checkInLinkstring | null

CENTER_VISIT orders only; null for every other order type. The patient's check-in link. Turn it into a QR code (encode the URL exactly as given) and show it to the patient, for example in your app or booking confirmation. Centre staff scan it when the patient arrives, then enter checkInCode to check them in. The link is the same every time for an order.

checkInCodestring | null

CENTER_VISIT orders only; null for every other order type, and for some orders booked before this field existed. The 6-digit code the patient gives centre staff after they scan the check-in QR; show it to the patient next to the QR, and to no one else. Check-in is accepted only on the day of the appointment, on the lab's local date; after a reschedule the same link and code work on the new day. Unless your store has turned off check-in QR messages, LabStack also sends the patient this QR and code by email or WhatsApp when the order is first scheduled.

isPaymentRequiredboolean

True while the order is still awaiting the payment it was placed with. Becomes false once the payment goes through, at which point an order status webhook is sent with the PAYMENT_RECEIVED event. Always false for orders placed without isPaymentRequired.

cancelReasonstring
updatedAtstring

ISO 8601 date-time

timelinearray<object>

Every status the order has moved through, oldest first, with the time it moved into each. Never empty, and the last entry is always the current orderStatus. A status appears again each time the order returns to it, for example ORDER_SCHEDULED after RESCHEDULED. For older orders the history can start part-way through, at the first status change on record.

{
orderStatusstring
Enum:PENDINGCREATEDORDER_SCHEDULEDKIT_BOOKEDKIT_DISPATCHEDKIT_DELIVEREDPATIENT_MISSEDPATIENT_VISITEDPHLEBO_ASSIGNEDPHLEBO_STARTEDPHLEBO_NO_SHOWSAMPLE_COLLECTEDKIT_PICKUP_BOOKEDKIT_PICKUP_IN_TRANSITSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_REJECTEDSAMPLE_PROCESSEDPARTIAL_DELIVEREDREPORT_DELIVEREDRESCHEDULEDCANCELED
triggeredAtstring

ISO 8601 date-time the order moved into this status

}[]
}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "orderDetails": {
    "orderId": 47585,
    "orderType": "HOME_SAMPLE",
    "orderStatus": "PHLEBO_ASSIGNED",
    "isVip": false,
    "appointment": "2023-12-23T18:25:43.511Z",
    "referenceId": "P10012",
    "labOrderId": "BLR1234",
    "phleboName": "Bob Smith",
    "phleboNumber": "8047359194",
    "labName": "Lab name 1",
    "labLogo": "www.image.com",
    "lsLabId": 57,
    "lsChainId": 3,
    "packageIds": [
      "LSP10029",
      "LSP10871"
    ],
    "testIds": [
      "LSL110001",
      "LSL110002"
    ],
    "notes": "Patient is old, veins are thin.",
    "uniqueId": "U1234",
    "name": "Bob Smith",
    "preparations": [
      "Fasting for 12 hours"
    ],
    "dateOfBirth": "2000-01-01",
    "age": 24,
    "gender": "MALE",
    "mobile": "8047359194",
    "altContact": "8047359194",
    "mainUserUniqueId": null,
    "mainUserUnqiueId": null,
    "relationship": null,
    "unitFloorBuilding": "2nd Floor Tower 3",
    "address": "123 Main Road",
    "locality": "Gopalapur",
    "city": "Bangalore",
    "state": "Karnataka",
    "pincode": "560035",
    "reports": [
      {
        "link": "https://integration.labstack.in/api/v1.3/order/getReport?orderId=34&reportId=0",
        "type": "FULL"
      }
    ],
    "checkInLink": null,
    "checkInCode": null,
    "isPaymentRequired": false,
    "cancelReason": "",
    "updatedAt": "2024-12-11T12:20:52.623Z",
    "timeline": [
      {
        "orderStatus": "CREATED",
        "triggeredAt": "2023-12-20T10:02:11.204Z"
      },
      {
        "orderStatus": "ORDER_SCHEDULED",
        "triggeredAt": "2023-12-20T10:02:14.880Z"
      },
      {
        "orderStatus": "PHLEBO_ASSIGNED",
        "triggeredAt": "2023-12-23T16:40:05.317Z"
      }
    ]
  }
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/getOrderDetails?orderId=47585&referenceId=' \
  -H 'ls-api-key: <YOUR_API_KEY>'

List orders

Returns orders with their appointments for the store, optionally filtered by a start/end appointment-date range, by those updated since a date, and by user email.

Query parameters

startDatestringOptional

Optional. Filter orders with appointments after this date. ISO 8601 date-time.

endDatestringOptional

Optional. Filter orders with appointments before this date. ISO 8601 date-time.

updatedSincestringOptional

Optional. Filter orders updated since this date. ISO 8601 date-time.

emailstringOptional

Optional. Filter orders placed for a user with this email (case-insensitive).

Responses

200

List of orders

{
statusstring
Enum:successfailure
ordersarray<object>
{
orderIdnumber

LabStack order id

orderTypestring
Enum:HOME_SAMPLECENTER_VISIT
referenceIdstring | null

Reference id given when placing the order

appointmentstring

Appointment time, ISO 8601

orderStatusstring
Enum:PENDINGCREATEDORDER_SCHEDULEDKIT_BOOKEDKIT_DISPATCHEDKIT_DELIVEREDPATIENT_MISSEDPATIENT_VISITEDPHLEBO_ASSIGNEDPHLEBO_STARTEDPHLEBO_NO_SHOWSAMPLE_COLLECTEDKIT_PICKUP_BOOKEDKIT_PICKUP_IN_TRANSITSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_REJECTEDSAMPLE_PROCESSEDPARTIAL_DELIVEREDREPORT_DELIVEREDRESCHEDULEDCANCELED
phleboNamestring | null
phleboNumberstring | null
labNamestring
labLogostring | null
lsLabIdnumber
lsChainIdnumber | null

Null if the lab is not part of a chain

updatedAtstring

Last update time, ISO 8601

}[]
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "orders": [
    {
      "orderId": 47585,
      "orderType": "HOME_SAMPLE",
      "referenceId": "123",
      "appointment": "2023-12-23T18:25:43.511Z",
      "orderStatus": "SAMPLE_PROCESSED",
      "phleboName": "Bob Smith",
      "phleboNumber": "8047359194",
      "labName": "Lab name 1",
      "labLogo": "www.image.com",
      "lsLabId": 12,
      "lsChainId": 2,
      "updatedAt": "2024-12-11T12:20:52.623Z"
    },
    {
      "orderId": 47586,
      "orderType": "HOME_SAMPLE",
      "referenceId": "124",
      "appointment": "2023-11-03T21:45:23.211Z",
      "orderStatus": "ORDER_SCHEDULED",
      "phleboName": null,
      "phleboNumber": null,
      "labName": "Lab name 2",
      "labLogo": null,
      "lsLabId": 14,
      "lsChainId": null,
      "updatedAt": "2024-12-08T10:23:54.610Z"
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/getOrders?startDate=2026-01-01T00:00:00.000Z&endDate=2026-12-31T23:59:59.000Z&updatedSince=&email=' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Download order report PDF

Streams the order's report as a PDF (orderId=0 returns a dummy sample report).

Query parameters

orderIdstringRequired

Order id to get the report PDF of. Use 0 to download a dummy sample report.

reportIdstringRequired

Report id to download (found in the reports[] of getOrderDetails or the webhook payload).

Responses

200

Report PDF

400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/getReport?orderId=47585&reportId=0' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Get order report values

Returns standardized test values for an order; available only when the order status is REPORT_DELIVERED. If the values have not been generated yet, the call first tries to retrieve them, which can take up to about 20 seconds, and returns them with a 200 when that succeeds. Otherwise, when the order has a valid report, extraction is started automatically and a 202 is returned — retry the call in a few minutes, or wait for the HARMONIZED_VALUES_CHANGED order webhook. Extraction is attempted at most once per order, so a 400 for an order in REPORT_DELIVERED means the values are not going to become available without LabStack support. A 409 means the order has not reached REPORT_DELIVERED yet but still can; retry later, or wait for the order STATUS_CHANGED webhook announcing REPORT_DELIVERED before calling. A CANCELED order never reaches REPORT_DELIVERED, so it gets a 400 and retrying will not help. testValues can include tests the report shows beyond those ordered. Values for ordered tests can still be added after the order reaches REPORT_DELIVERED, usually within the next half hour; each change is announced by a HARMONIZED_VALUES_CHANGED order webhook, after which this call returns them.

Query parameters

orderIdstringRequired

Order id to get raw report values for. Only available when the order status is REPORT_DELIVERED.

Responses

200

Standardized test values

{
statusstring
Enum:successfailure
testValuesarray<object>
{
packageIdstring | null

LS package id (e.g. LSP10002) of the package the test was reported under, when known.

packageNamestring | null
profileIdstring | null

LS id of the profile the test belongs to, when it is part of one.

profileNamestring | null
testIdstring

LS test id (e.g. LSL100018). Always present, and distinct where the same test name is used for different sample types.

testNamestring
valuestring

Measured value (a number or a descriptive string)

unitsstring | null
methodstring | null
isHighlightedboolean

True when the matched range colour is not GREEN

rangesTypestring
Enum:RANGEDESCRIPTIVE
matchedRangeobject | null
{
labelstring | null
colorstring
Enum:GREENYELLOWRED
lownumber | null

RANGE only. If only low, read as value < low.

highnumber | null

RANGE only. If only high, read as value > high.

descriptionarray<string>

DESCRIPTIVE only. Value matches if it equals any entry.

}
rangesarray<object>

All possible ranges for the test.

{
labelstring | null
colorstring
Enum:GREENYELLOWRED
lownumber | null

RANGE only

highnumber | null

RANGE only

descriptionarray<string>

DESCRIPTIVE only

}[]
}[]
}
202

Values are not available yet and are being extracted from the report

{
statusstring
messagestring
}
400

The call cannot return values. Returned when orderId is missing or invalid; when the order is CANCELED, so it will never reach REPORT_DELIVERED and retrying will not help; and when the order is in REPORT_DELIVERED but its values cannot be produced, in which case error says why.

{
statusstring
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
409

The order exists and has not reached REPORT_DELIVERED yet but still can, so no values are available yet. The request is valid and can be repeated: retry later, or wait for the order STATUS_CHANGED webhook announcing REPORT_DELIVERED and call again then. A CANCELED order gets a 400 instead.

{
statusstring
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "testValues": [
    {
      "packageId": "LSP10002",
      "packageName": "Advanced Package",
      "profileId": "LSP10870",
      "profileName": "Diabetes Markers",
      "testId": "LSL100018",
      "testName": "Glucose Fasting",
      "value": "127",
      "units": "mg/dL",
      "method": null,
      "isHighlighted": true,
      "rangesType": "RANGE",
      "matchedRange": {
        "label": "Danger",
        "color": "RED",
        "low": 125,
        "high": null
      },
      "ranges": [
        {
          "label": "Desirable",
          "color": "GREEN",
          "low": 70,
          "high": 100
        },
        {
          "label": null,
          "color": "YELLOW",
          "low": 101,
          "high": 125
        },
        {
          "label": "Danger",
          "color": "RED",
          "low": 125,
          "high": null
        }
      ]
    },
    {
      "packageId": "LSP10002",
      "packageName": "Advanced Package",
      "profileId": "LSP10870",
      "profileName": "Diabetes Markers",
      "testId": "LSL100245",
      "testName": "Colour Urine",
      "value": "Pale Yellow",
      "units": "Description",
      "method": null,
      "isHighlighted": true,
      "rangesType": "DESCRIPTIVE",
      "matchedRange": {
        "label": "Desirable",
        "color": "GREEN",
        "description": [
          "Pale Yellow",
          "Light Yellow"
        ]
      },
      "ranges": [
        {
          "label": "Desirable",
          "color": "GREEN",
          "description": [
            "Pale Yellow",
            "Light Yellow"
          ]
        },
        {
          "label": "Slight Risk",
          "color": "YELLOW",
          "description": [
            "Dark Yellow",
            "Amber"
          ]
        },
        {
          "label": "High Risk",
          "color": "RED",
          "description": [
            "Dark Amber",
            "Red",
            "Brown"
          ]
        }
      ]
    }
  ]
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/getReportRawValues?orderId=47585' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Place a lab order

Creates an order for the authenticated store. Provide packageIds and/or testIds. pincode is always required; address/city/state are additionally required for HOME_SAMPLE orders. Either dateOfBirth or age must be provided. For a patient already on record (same uniqueId), a recorded gender or date of birth is kept, and is what the lab receives, even if this request sends different ones; only a value not yet recorded is taken from the request. Use POST /api/admin/v1.0/user/updateUserDetails to change them. orderType CAMP is not accepted by this endpoint. uniqueId is optional (auto-generated when omitted). Optionally returns a payment link when payment is required; that link is valid for 16 minutes and the order is auto-cancelled if payment is not completed in that window. Once payment completes the order is retained, getOrderDetails reports isPaymentRequired as false, and an order status webhook is sent carrying the PAYMENT_RECEIVED event. Returns 409 when your store already has an active order for the same uniqueId with exactly the same packageIds and testIds and an appointment on the same date (IST), at any time of that day and regardless of address or orderType. The same items on another date are a new order. An order stops being active once it reaches REPORT_DELIVERED, CANCELED, PHLEBO_NO_SHOW, PATIENT_MISSED or SAMPLE_REJECTED. Reschedule or cancel the existing order (its orderId is in the 409 response) instead of placing it again. referenceId is not used to detect duplicates. If a call times out, look the order up with getOrderDetails by your referenceId before retrying, and retry with the same request body only if it is not found.

Request bodyRequired

{
orderTypestringRequired
Enum:HOME_SAMPLECENTER_VISITKIT_BASED

Type of order/service.

isVipbooleanOptional

Optional. Marks the order as VIP. Defaults to false.

isPostpaidbooleanOptional

Optional. Marks the order as postpaid. When omitted, the order is postpaid when your store collects payment from the patient, and not postpaid when LabStack or the lab collects it, which is always the case when isPaymentRequired is true.

referenceIdstringOptional

Optional. Your own reference id; echoed back in responses and webhooks. Not used to detect duplicate orders. Use a value unique to each order, since getOrderDetails can look an order up by it.

linkOrderIdintegerOptional

Optional. Link this order to an existing LabStack order id.

packageIdsarray<string>Optional

LS package ids to order (e.g. LSP11002). Provide packageIds and/or testIds.

testIdsarray<string>Optional

LS test ids to order (e.g. LSL110001). Provide packageIds and/or testIds.

appointmentstringRequired

Appointment date-time, ISO 8601 format.

labIdintegerOptional

Optional. Lab to place the order with. If not specified, LabStack assigns a lab.

notesstringOptional

Optional. Free-text notes for the order (e.g. "Patient is old, veins are thin").

isPaymentRequiredbooleanOptional

Optional. If true a payment link valid for 16 minutes is returned, and the order is auto-cancelled if it is not paid within that window. Once the payment goes through, getOrderDetails reports isPaymentRequired as false and an order status webhook is sent with the PAYMENT_RECEIVED event. Defaults to false.

isSlotPreconfirmedbooleanOptional

Optional. Indicates the slot was already confirmed with the consumer.

uniqueIdstringOptional

Optional. Uniquely identifies the user; existing users are updated, new ids create a user. If omitted, defaults to {mobile}-{name}.

namestringRequired

Consumer name. Sanitised to alphanumerics; must be non-empty and up to 50 characters.

emailstringRequired

Consumer email address.

dateOfBirthstringOptional

YYYY-MM-DD. Required if age is not provided.

ageintegerOptional

Consumer age. Required if dateOfBirth is not provided.

genderstringRequired
Enum:MALEFEMALEOTHERS

Consumer gender.

mobilestringRequired

10 digits, cannot start with 0.

altContactstringOptional

Optional. Alternate 10-digit contact number; cannot start with 0.

mainUserUniqueIdstringOptional

Optional. To mark this user as a dependent, pass the uniqueId of the main user (must already exist).

relationshipstringOptional
Enum:OTHERHUSBANDWIFEFATHERMOTHERSONDAUGHTERGRANDFATHERGRANDMOTHERGRANDSONGRANDDAUGHTERSON_IN_LAWDAUGHTER_IN_LAWBROTHERSISTERBROTHER_IN_LAWSISTER_IN_LAWUNCLEAUNTCOUSINNEPHEWNIECEMOTHER_IN_LAWFATHER_IN_LAWPARTNERFRIENDNEIGHBOUR

Optional. Dependent's relationship to the main user. Defaults to OTHER.

unitFloorBuildingstringOptional

Optional. Not used to fetch lat/long.

addressstringOptional

Required for HOME_SAMPLE. Full address ({unitFloorBuilding}, {address}, {locality}, {city}, {state}) must be 20-200 characters.

localitystringOptional

Optional.

citystringOptional

Required for HOME_SAMPLE.

statestringOptional

Required for HOME_SAMPLE.

pincodestringRequired

Always required. 6 digits.

latitudenumberOptional

Optional.

longitudenumberOptional

Optional.

}

Responses

200

Order placed

{
statusstring
Enum:successfailure
orderobject
{
orderIdinteger
referenceIdstring | null

The referenceId you sent, or null if you sent none.

preparationsarray<string>

Preparations to do before sample collection

orderStatusstring
Enum:PENDINGCREATEDORDER_SCHEDULEDKIT_BOOKEDKIT_DISPATCHEDKIT_DELIVEREDPATIENT_MISSEDPATIENT_VISITEDPHLEBO_ASSIGNEDPHLEBO_STARTEDPHLEBO_NO_SHOWSAMPLE_COLLECTEDKIT_PICKUP_BOOKEDKIT_PICKUP_IN_TRANSITSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_REJECTEDSAMPLE_PROCESSEDPARTIAL_DELIVEREDREPORT_DELIVEREDRESCHEDULEDCANCELED

Status right after booking. Usually CREATED (booked, awaiting the lab confirming the appointment) or ORDER_SCHEDULED (already confirmed). PENDING means the booking has not reached the lab and our team will be investigating the reason on priority.

labNamestring
labLogostring | null
lsLabIdinteger
lsChainIdinteger | null

Null if the lab is not part of a chain

labApiErrorstring | null

Error string from the lab when placing the order, or null. Note: null does not guarantee success - confirm orderStatus is not PENDING.

labAddressstring | null

Present for CENTER_VISIT orders

labLocalitystring | null

Present for CENTER_VISIT orders

labCitystring | null

Present for CENTER_VISIT orders

labStatestring | null

Present for CENTER_VISIT orders

labPincodestring | null

Present for CENTER_VISIT orders

labLatitudenumber | null

Present for CENTER_VISIT orders

labLongitudenumber | null

Present for CENTER_VISIT orders

checkInLinkstring | null

Present for CENTER_VISIT orders only. The patient's check-in link. Turn it into a QR code (encode the URL exactly as given) and show it to the patient, for example in your app or booking confirmation. Centre staff scan it when the patient arrives, then enter checkInCode to check them in. The same link is returned by getOrderDetails and the order webhook.

checkInCodestring | null

Present for CENTER_VISIT orders only. The 6-digit code the patient gives centre staff after they scan the check-in QR; show it to the patient next to the QR, and to no one else. Check-in is accepted only on the day of the appointment, on the lab's local date; after a reschedule the same link and code work on the new day. Unless your store has turned off check-in QR messages, LabStack also sends the patient this QR and code by email or WhatsApp when the order is first scheduled.

}
paymentLinkstring | null

Only returned when isPaymentRequired is true. Valid for 16 minutes from order placement.

paymentLinkExpiresAtstring · date-time | null

Only returned when isPaymentRequired is true. Always 16 minutes after order placement, regardless of the store payment configuration; the order is cancelled at this point if unpaid.

}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
409

Duplicate order. Either your store already has an active order for this uniqueId with exactly the same packageIds and testIds and an appointment on the same date (orderId, referenceId and orderStatus identify it), or an identical request is still being processed (error only; retry after it completes).

{
statusstring
errorstring
orderIdinteger

Id of the existing active order. Absent when an identical request is still being processed.

referenceIdstring | null

referenceId of the existing order, or null if it has none. Absent when an identical request is still being processed.

orderStatusstring
Enum:PENDINGCREATEDORDER_SCHEDULEDKIT_BOOKEDKIT_DISPATCHEDKIT_DELIVEREDPATIENT_VISITEDPHLEBO_ASSIGNEDPHLEBO_STARTEDSAMPLE_COLLECTEDKIT_PICKUP_BOOKEDKIT_PICKUP_IN_TRANSITSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_PROCESSEDPARTIAL_DELIVEREDRESCHEDULED

Current status of the existing order. Absent when an identical request is still being processed.

}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "order": {
    "orderId": 47585,
    "referenceId": "REF-123",
    "preparations": [
      "Fasting for 12 hours",
      "Stop cholesterol medicines"
    ],
    "orderStatus": "CREATED",
    "labName": "Lab Name 1",
    "labLogo": "www.image.com",
    "lsLabId": 12,
    "lsChainId": 2,
    "labApiError": null,
    "labAddress": null,
    "labLocality": null,
    "labCity": null,
    "labState": null,
    "labPincode": null,
    "labLatitude": null,
    "labLongitude": null,
    "checkInLink": null,
    "checkInCode": null
  },
  "paymentLink": null,
  "paymentLinkExpiresAt": null
}

Request example

Request example (cURL)
curl -X POST 'https://integration.labstack.in/api/v1.3/order/placeOrder' \
  -H 'ls-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "orderType": "HOME_SAMPLE",
    "isVip": false,
    "isPaymentRequired": false,
    "referenceId": "REF-123",
    "packageIds": [
      "LSP11002",
      "LSP11004"
    ],
    "testIds": [
      "LSL110001",
      "LSL120031"
    ],
    "appointment": "2025-06-01T11:00:00+05:30",
    "notes": "Patient is old, veins are thin.",
    "uniqueId": "U1234",
    "name": "Bob Smith",
    "email": "bobsmith@example.com",
    "dateOfBirth": "2000-01-01",
    "gender": "MALE",
    "mobile": "8047359194",
    "altContact": "8047359194",
    "unitFloorBuilding": "2nd Floor Tower 3",
    "address": "123 Main Road",
    "locality": "Gopalapur",
    "city": "Bangalore",
    "state": "Karnataka",
    "pincode": "560035",
    "latitude": 13.045163,
    "longitude": 77.53775859999999
  }'

Reschedule an order

Reschedules an order to a new appointment time (validates slot availability with the lab). An order cannot be rescheduled within 30 minutes of its current appointment time, or once that time has passed. This GET has side effects.

Query parameters

orderIdstringRequired

Order id to reschedule.

appointmentstringRequired

New appointment date-time, ISO 8601 format.

Responses

200

Order rescheduled

{
statusstring
orderobject
{
orderIdinteger
orderStatusstring
Enum:PENDINGRESCHEDULED
}
}
202

Reschedule pending at lab

{
statusstring
messagestring
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "order": {
    "orderId": 47585,
    "orderStatus": "RESCHEDULED"
  }
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/rescheduleOrder?orderId=47585&appointment=<value>' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Submit order feedback

Records your customer's feedback on one of your orders. feedbackType says which survey the feedback answers, and decides the rating scale and the survey answers the body must carry. Send the survey answers as top-level fields next to rating; do not wrap them in an object.

feedbackTypeWhat it ratesratingSurvey fieldsAccepted when
SAMPLE_COLLECTIONThe booking and the home sample collection visitWhole number from 1 to 5phleboOnTime, goodPhleboBehavior, easyBookingProcess: all three required, each true or falseThe order is a HOME_SAMPLE order, is not CANCELED or PENDING, and its appointment time has passed or its sample has been collected
ORDER_COMPLETEHow likely the customer is to recommend the serviceWhole number from 1 to 10NoneThe order is REPORT_DELIVERED

A survey field of the other feedbackType, a missing survey field, or a rating outside its type's range is rejected with 400. comments is optional for both types.

An order holds one feedback per feedbackType: submitting the same feedbackType again for the same order replaces the earlier rating, survey answers and comments. A low rating opens an escalation on the order for LabStack support to follow up.

Example SAMPLE_COLLECTION body:

json
{
  "orderId": 47585,
  "feedbackType": "SAMPLE_COLLECTION",
  "rating": 4,
  "phleboOnTime": false,
  "goodPhleboBehavior": true,
  "easyBookingProcess": true,
  "comments": "The phlebotomist arrived 20 minutes late but was very gentle."
}

Example ORDER_COMPLETE body:

json
{
  "orderId": 47585,
  "feedbackType": "ORDER_COMPLETE",
  "rating": 9,
  "comments": "Reports arrived on time."
}

Request bodyRequired

{
orderIdintegerRequired

Order id the feedback is about. Must be an order placed by your store.

feedbackTypestringRequired
Enum:SAMPLE_COLLECTIONORDER_COMPLETE

Which survey this feedback answers. Decides the rating range and the survey fields required; see the table above.

ratingintegerRequired

Whole number from 1 to 5 for SAMPLE_COLLECTION, and from 1 to 10 for ORDER_COMPLETE.

phleboOnTimebooleanOptional

SAMPLE_COLLECTION only, and required for it. Whether the phlebotomist arrived on time.

goodPhleboBehaviorbooleanOptional

SAMPLE_COLLECTION only, and required for it. Whether the phlebotomist behaved professionally.

easyBookingProcessbooleanOptional

SAMPLE_COLLECTION only, and required for it. Whether booking the test was easy.

commentsstringOptional

Optional. What the customer said, in their words. Up to 1000 characters.

}

Responses

200

Feedback recorded

{
statusstring
feedbackobject
{
orderIdinteger
feedbackTypestring
Enum:SAMPLE_COLLECTIONORDER_COMPLETE
ratinginteger
maxRatinginteger

Highest rating on this feedbackType's scale: 5 for SAMPLE_COLLECTION, 10 for ORDER_COMPLETE.

phleboOnTimeboolean

Present for SAMPLE_COLLECTION only.

goodPhleboBehaviorboolean

Present for SAMPLE_COLLECTION only.

easyBookingProcessboolean

Present for SAMPLE_COLLECTION only.

commentsstring | null
}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
404

Order not found for this store

{
statusstring
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
500

Feedback could not be saved

Sample response
{
  "status": "success",
  "feedback": {
    "orderId": 47585,
    "feedbackType": "SAMPLE_COLLECTION",
    "rating": 4,
    "maxRating": 5,
    "phleboOnTime": false,
    "goodPhleboBehavior": true,
    "easyBookingProcess": true,
    "comments": "The phlebotomist arrived 20 minutes late but was very gentle."
  }
}

Request example

Request example (cURL)
curl -X POST 'https://integration.labstack.in/api/v1.3/order/submitFeedback' \
  -H 'ls-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "orderId": 47585,
    "feedbackType": "SAMPLE_COLLECTION",
    "rating": 4,
    "phleboOnTime": false,
    "goodPhleboBehavior": true,
    "easyBookingProcess": true,
    "comments": "The phlebotomist arrived 20 minutes late but was very gentle."
  }'

Trigger a test order webhook

Sends one order webhook for an existing order to your Diagnostics Webhook URL, so you can test the endpoint that receives it. The order itself is not changed. If your store has no Diagnostics Webhook URL, nothing is sent and the call still answers success.

The webhook carries the order as it is now, with events set to [STATUS_CHANGED]. Pass orderStatus to see the payload at another stage of the order. The status being sent shapes the payload as follows:

  • PENDING, CREATED, ORDER_SCHEDULED, RESCHEDULED and the kit statuses (KIT_BOOKED, KIT_DISPATCHED, KIT_DELIVERED, KIT_PICKUP_BOOKED, KIT_PICKUP_IN_TRANSIT) send phleboName and phleboNumber as null.
  • Every other status except CANCELED fills in a sample phlebotomist when the order has none. PHLEBO_STARTED also sets phleboStartTime to an hour before your call.
  • Passing orderStatus=RESCHEDULED moves appointmentTime to 10:00 IST the next day.
  • reports is empty for every status except REPORT_DELIVERED and CANCELED. REPORT_DELIVERED adds a sample report when the order has none, and its link downloads a sample PDF.

The payload is described under Webhook below. Webhooks sent for real changes to your orders have the same shape.

Query parameters

orderIdstringRequired

Id of the order to send a webhook for. The order is not changed.

orderStatusstringOptional
Enum:PENDINGCREATEDORDER_SCHEDULEDKIT_BOOKEDKIT_DISPATCHEDKIT_DELIVEREDPATIENT_MISSEDPATIENT_VISITEDPHLEBO_ASSIGNEDPHLEBO_STARTEDPHLEBO_NO_SHOWSAMPLE_COLLECTEDKIT_PICKUP_BOOKEDKIT_PICKUP_IN_TRANSITSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_REJECTEDSAMPLE_PROCESSEDPARTIAL_DELIVEREDREPORT_DELIVEREDRESCHEDULEDCANCELED

Optional. Order status to put in the webhook instead of the order's current status.

Responses

200

Webhook triggered

{
statusstring
messagestring
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
404

No order with this id belongs to your store

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "message": "Webhook successfully triggered"
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/order/testWebhook?orderId=47585&orderStatus=' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Webhook

POST<your Diagnostics Webhook URL>

Order webhook, sent to your Diagnostics Webhook URL whenever one of your orders changes

Sent as a POST with a JSON body. Answer with any 2xx status; the response body is ignored.

Every webhook carries your store's webhook authentication header, a header name and value agreed with LabStack: check it to confirm the webhook came from LabStack. Contact us to set or change it. Its value does not change when your API keys are rotated or revoked.

events lists everything that changed in the update, so one webhook can carry several events:

EventSent when
STATUS_CHANGEDorderStatus changed.
RESCHEDULEDappointmentTime changed.
REPORTS_CHANGEDA report was added to, replaced in or removed from reports.
PHLEBO_CHANGEDA phlebotomist was assigned or replaced, so phleboName or phleboNumber changed.
LAB_CHANGEDThe order moved to another lab. labName, labLogo, lsLabId and lsChainId describe the new lab.
HARMONIZED_VALUES_CHANGEDThe order's standardized test values changed. Fetch them with getReportRawValues.
PAYMENT_RECEIVEDThe payment the order was waiting for came through, and isPaymentRequired is now false.

Every order reports the CREATED status. When an order moves past CREATED in a single step, you are first sent a STATUS_CHANGED webhook with orderStatus CREATED, then the one with its new status.

Headers
keystring

The webhook authentication header most stores receive, holding the webhook key agreed with LabStack for your store. If your store's authentication header has another name, that header is sent instead; if none is set up, webhooks carry no authentication header.

Payload
{
orderIdinteger

Order id, as returned by placeOrder.

eventsarray<string>

What changed in this update. See the table above.

isVipboolean
labNamestring
labLogostring | null

Link to the lab logo; null when the lab has none.

lsLabIdinteger
lsChainIdinteger | null

Null if the lab is not part of a chain.

orderTypestring
Enum:HOME_SAMPLECENTER_VISITCAMPKIT_BASEDSAMPLE_DROP_OFF

CAMP is an order from a health camp. SAMPLE_DROP_OFF is an order whose sample is picked up from your store or clinic. Neither is placed through placeOrder.

orderStatusstring
Enum:PENDINGCREATEDORDER_SCHEDULEDKIT_BOOKEDKIT_DISPATCHEDKIT_DELIVEREDPATIENT_MISSEDPATIENT_VISITEDPHLEBO_ASSIGNEDPHLEBO_STARTEDPHLEBO_NO_SHOWSAMPLE_COLLECTEDKIT_PICKUP_BOOKEDKIT_PICKUP_IN_TRANSITSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_REJECTEDSAMPLE_PROCESSEDPARTIAL_DELIVEREDREPORT_DELIVEREDRESCHEDULEDCANCELED

KIT_BOOKED, KIT_DISPATCHED, KIT_DELIVERED, KIT_PICKUP_BOOKED and KIT_PICKUP_IN_TRANSIT apply to KIT_BASED orders only: the courier taking the kit to the patient is booked, the kit is on its way, the kit has reached the patient, the return pickup is booked, and the kit is on its way back to the lab. A KIT_BASED order reports KIT_PICKUP_IN_TRANSIT where other orders report SAMPLE_IN_TRANSIT. SAMPLE_REJECTED means the lab could not test the sample; a new collection follows and moves the order on, or the order is cancelled.

isPaymentRequiredboolean

True while the order is waiting for the payment it was placed with. Turns false with the PAYMENT_RECEIVED event.

appointmentTimestring · date-time

Scheduled collection or visit time, ISO 8601 in UTC.

preparationsarray<string>

What the patient should do before the sample is collected, such as fasting. Empty when nothing is needed.

referenceIdstring | null

The referenceId you gave when placing the order; empty or null if none.

phleboNamestring | null

Empty or null until a phlebotomist is assigned.

phleboNumberstring | null

Empty or null until a phlebotomist is assigned.

phleboStartTimestring · date-time | null

When the phlebotomist set off for the collection, ISO 8601 in UTC; null until then.

trackingLinkstring | null

Link to follow the phlebotomist on their way, for labs that offer one; null otherwise.

namestring

Patient name.

emailstring | null
mobilestring | null
altNumberstring | null
uniqueIdstring | null

Your id for the patient.

relationstring | null
Enum:OTHERHUSBANDWIFEFATHERMOTHERSONDAUGHTERGRANDFATHERGRANDMOTHERGRANDSONGRANDDAUGHTERSON_IN_LAWDAUGHTER_IN_LAWBROTHERSISTERBROTHER_IN_LAWSISTER_IN_LAWUNCLEAUNTCOUSINNEPHEWNIECEMOTHER_IN_LAWFATHER_IN_LAWPARTNERFRIENDNEIGHBOUR

How the patient is related to the main user, when the order is for a family member; null otherwise.

mainUserUniqueIdstring | null

uniqueId of the main user, when the order is for a family member; null otherwise.

genderstring | null
Enum:MALEFEMALEOTHERS
unitFloorBuildingstring | null
addressstring | null
localitystring | null
citystring | null
statestring | null
pincodestring | null
latitudenumber | null
longitudenumber | null
labOrderIdstring

The order's id on the lab's system; empty until the lab assigns one.

labUserIdstring

The patient's id on the lab's system, for labs that assign one; empty otherwise.

dateOfBirthstring

YYYY-MM-DD; empty when not known.

packagesarray<object>
{
lsIdstring

LS package id.

namestring
}[]
testsarray<object>
{
lsIdstring

LS test id.

namestring
sampleTypestring | null
methodologystring | null
}[]
reportsarray<object>

Reports ready to download. Empty until the first report is ready.

{
linkstring

Report PDF download link. Call it with your ls-api-key header.

typestring
Enum:FULLPARTIAL

PARTIAL while some of the results are still to come.

}[]
checkInLinkstring | null

CENTER_VISIT orders only; null for every other order type. The patient's check-in link. Turn it into a QR code (encode the URL exactly as given) and show it to the patient, for example in your app or booking confirmation. Centre staff scan it when the patient arrives, then enter checkInCode to check them in. The link is the same every time for an order.

checkInCodestring | null

CENTER_VISIT orders only; null for every other order type, and for some orders booked before this field existed. The 6-digit code the patient gives centre staff after they scan the check-in QR; show it to the patient next to the QR, and to no one else. Check-in is accepted only on the day of the appointment, on the lab's local date; after a reschedule the same link and code work on the new day. Unless your store has turned off check-in QR messages, LabStack also sends the patient this QR and code by email or WhatsApp when the order is first scheduled.

cancelReasonstring

Reason given when the order was canceled; empty otherwise.

notesstring

The notes given when the order was placed; empty if none.

}
Sample payload
{
  "orderId": 47585,
  "events": [
    "STATUS_CHANGED",
    "REPORTS_CHANGED"
  ],
  "isVip": false,
  "labName": "Lab name 1",
  "labLogo": "https://www.example.com/lab-logo.png",
  "lsLabId": 57,
  "lsChainId": 3,
  "orderType": "HOME_SAMPLE",
  "orderStatus": "REPORT_DELIVERED",
  "isPaymentRequired": false,
  "appointmentTime": "2026-10-06T03:30:00.000Z",
  "preparations": [
    "Fasting for 10-12 hours"
  ],
  "referenceId": "P10012",
  "phleboName": "Ravi Kumar",
  "phleboNumber": "9876543210",
  "phleboStartTime": "2026-10-06T02:55:00.000Z",
  "trackingLink": null,
  "name": "Asha Rao",
  "email": "asha.rao@example.com",
  "mobile": "8047359194",
  "altNumber": null,
  "uniqueId": "U1234",
  "relation": null,
  "mainUserUniqueId": null,
  "gender": "FEMALE",
  "unitFloorBuilding": "2nd Floor Tower 3",
  "address": "123 Main Road",
  "locality": "Gopalapur",
  "city": "Bangalore",
  "state": "Karnataka",
  "pincode": "560035",
  "latitude": 12.9716,
  "longitude": 77.5946,
  "labOrderId": "BLR1234",
  "labUserId": "",
  "dateOfBirth": "1990-04-12",
  "packages": [
    {
      "lsId": "LSP10029",
      "name": "Full Body Checkup"
    }
  ],
  "tests": [
    {
      "lsId": "LSL110001",
      "name": "HbA1c",
      "sampleType": "Blood",
      "methodology": "HPLC"
    }
  ],
  "reports": [
    {
      "link": "https://console.labstack.in/api/v1.3/order/getReport?orderId=47585&reportId=0",
      "type": "FULL"
    }
  ],
  "checkInLink": null,
  "checkInCode": null,
  "cancelReason": "",
  "notes": ""
}

Move a test order to a status (UAT only)

Available only in the UAT environment; anywhere else it answers 403. Use it to test how your integration handles each stage of an order without waiting for a lab to act on it.

Moves one of your orders forward to targetOrderStatus, one status at a time. The call answers 202 straight away with order.statusPath: every status the order will pass through, starting with its current status. The first change is made right after the response and the rest follow interval seconds apart, so in the example below the order reaches PHLEBO_STARTED about 10 seconds after the call.

The changes are real. The order keeps each new status, and every change appears in its history as it would if a lab had made it.

Statuses by order type

Any status after PENDING in the order type's row is a valid targetOrderStatus. The order passes through every status between its current one and the target, in this order:

orderTypeStatuses, in order
HOME_SAMPLEPENDING → CREATED → ORDER_SCHEDULED → PHLEBO_ASSIGNED → PHLEBO_STARTED → SAMPLE_COLLECTED → SAMPLE_IN_TRANSIT → SAMPLE_DELIVERED → SAMPLE_PROCESSED → REPORT_DELIVERED
CENTER_VISITPENDING → CREATED → ORDER_SCHEDULED → PATIENT_VISITED → SAMPLE_COLLECTED → SAMPLE_IN_TRANSIT → SAMPLE_DELIVERED → SAMPLE_PROCESSED → REPORT_DELIVERED
KIT_BASEDPENDING → CREATED → KIT_BOOKED → KIT_DISPATCHED → KIT_DELIVERED → SAMPLE_COLLECTED → KIT_PICKUP_BOOKED → KIT_PICKUP_IN_TRANSIT → SAMPLE_DELIVERED → SAMPLE_PROCESSED → REPORT_DELIVERED
CAMPPENDING → CREATED → REPORT_DELIVERED
SAMPLE_DROP_OFFPENDING → CREATED → ORDER_SCHEDULED → SAMPLE_COLLECTED → SAMPLE_DELIVERED → SAMPLE_PROCESSED → REPORT_DELIVERED

An order whose status is not in its row continues from the next status in the row. A RESCHEDULED order moves to ORDER_SCHEDULED first (KIT_BOOKED for a kit order), and a PARTIAL_DELIVERED order moves to REPORT_DELIVERED.

Webhooks and messages

Each change sends your Diagnostics Webhook URL the same order webhook a real change would, with the payload described under Webhook in Trigger a test order webhook. If your store has no Diagnostics Webhook URL, the order still moves but nothing is sent.

Status reachedevents in the webhook
Any statusSTATUS_CHANGED
PHLEBO_ASSIGNED, when the order had no phlebotomistSTATUS_CHANGED, PHLEBO_CHANGED
REPORT_DELIVERED, when the order had no reportSTATUS_CHANGED, REPORTS_CHANGED

The patient messages your store has switched on for these statuses are sent too, and so is the report email if your store receives reports by email. Use patients whose contact details are your own.

Sample data

Where a status needs details the order does not have yet, sample values are written in the same change, so its webhook carries them. Details already on the order are kept.

Status reachedFieldSample value
PHLEBO_ASSIGNED or PHLEBO_STARTEDphleboName, phleboNumberDummy Phlebo, 9876543210
PHLEBO_STARTEDphleboStartTimeThe time of the change
REPORT_DELIVEREDreportsOne sample report, whose link downloads a sample PDF
When the order cannot be moved
  • A targetOrderStatus that is not in the order type's row, or that the order has already reached or passed, is rejected with 400.
  • CANCELED, PATIENT_MISSED, PHLEBO_NO_SHOW and SAMPLE_REJECTED orders cannot be moved, and are rejected with 400.
  • An order moves towards one target at a time. A second call for the same order answers 409 until the first has finished.
  • If anything else changes the order's status while it is moving (a cancellation, say), the remaining changes are skipped and the order keeps the status it was given.

Request bodyRequired

{
orderIdintegerRequired

Id of the order to move, as returned by placeOrder. Must be one of your orders.

targetOrderStatusstringRequired
Enum:CREATEDORDER_SCHEDULEDKIT_BOOKEDKIT_DISPATCHEDKIT_DELIVEREDPATIENT_VISITEDPHLEBO_ASSIGNEDPHLEBO_STARTEDSAMPLE_COLLECTEDKIT_PICKUP_BOOKEDKIT_PICKUP_IN_TRANSITSAMPLE_IN_TRANSITSAMPLE_DELIVEREDSAMPLE_PROCESSEDREPORT_DELIVERED

Status to move the order to. Must be in the row for the order's type in the table above, after the order's current status.

intervalintegerOptional

Optional. Seconds between one status change and the next: a whole number from 2 to 60. Defaults to 5.

}

Responses

202

The order has started moving. Its webhooks follow.

{
statusstring
messagestring
orderobject
{
orderIdinteger
orderTypestring
Enum:HOME_SAMPLECENTER_VISITCAMPKIT_BASEDSAMPLE_DROP_OFF
orderStatusstring

The order status when you called. Also the first entry of statusPath.

targetOrderStatusstring

The targetOrderStatus you sent. Also the last entry of statusPath.

statusPatharray<string>

Every status the order will pass through, in order: its current status, then each status it will be moved to, ending with targetOrderStatus. Expect one webhook for each entry after the first.

intervalinteger

Seconds between status changes: the interval you sent, or 5.

}
}
400

The order cannot be moved as asked, and error says why. Returned when the body is not a JSON object; when orderId, targetOrderStatus or interval is missing or invalid; when targetOrderStatus is not in the row for the order's type (error lists the allowed values); when the order has already reached or passed targetOrderStatus; and when the order is CANCELED, PATIENT_MISSED, PHLEBO_NO_SHOW or SAMPLE_REJECTED.

{
statusstring
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
403

Not available in this environment. The API runs only in the UAT environment.

{
statusstring
errorstring
}
404

No order with this id belongs to your store

{
statusstring
errorstring
}
409

The order is already moving towards a target. Call again once it has finished.

{
statusstring
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
503

Order webhooks are switched off in this environment, so the API cannot run. Contact LabStack.

{
statusstring
errorstring
}
Sample response
{
  "status": "success",
  "message": "Order is moving to PHLEBO_STARTED",
  "order": {
    "orderId": 47585,
    "orderType": "HOME_SAMPLE",
    "orderStatus": "CREATED",
    "targetOrderStatus": "PHLEBO_STARTED",
    "statusPath": [
      "CREATED",
      "ORDER_SCHEDULED",
      "PHLEBO_ASSIGNED",
      "PHLEBO_STARTED"
    ],
    "interval": 5
  }
}

Request example

Request example (cURL)
curl -X POST 'https://integration.labstack.in/api/v1.3/order/triggerOrderLifecycle' \
  -H 'ls-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "orderId": 47585,
    "targetOrderStatus": "PHLEBO_STARTED",
    "interval": 5
  }'

Update an order

Updates the identifiers you gave an existing order. Send orderId plus at least one of referenceId and uniqueId; anything you omit is left unchanged. referenceId replaces your own reference on the order, and an empty string clears it. uniqueId renames the patient this order belongs to — the patient record itself, so the new uniqueId is what every other order and appointment of theirs reports too. It is rejected with 400 if any other patient of yours already uses that uniqueId — including when the order's own patient already has it, so the same call run twice fails the second time — and with 400 when the patient on the order is not one of yours to rename. Both changes are recorded against the order and are visible to LabStack support.

Request bodyRequired

{
orderIdintegerRequired

Order id to update. Must be an order placed by your store.

referenceIdstringOptional

Optional. Your own reference id for this order; echoed back in responses and webhooks. Up to 100 characters. Pass an empty string to clear it.

uniqueIdstringOptional

Optional. The new uniqueId for the order's patient. Up to 100 characters, and must not already be in use by another of your patients.

}

Responses

200

Order updated

{
statusstring
orderobject
{
orderIdinteger
referenceIdstring | null

The reference id after the update.

uniqueIdstring | null

The patient's uniqueId after the update.

}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
404

Order not found for this store

{
statusstring
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "order": {
    "orderId": 47585,
    "referenceId": "REF-123",
    "uniqueId": "U1234"
  }
}

Request example

Request example (cURL)
curl -X POST 'https://integration.labstack.in/api/v1.3/order/updateOrder' \
  -H 'ls-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "orderId": 47585,
    "referenceId": "REF-123",
    "uniqueId": "U1234"
  }'

Request

Link a request to an order

Ties an existing request to an order that has already been placed. This GET has side effects: on success the request is marked as converted and permanently associated with that order. Both ids must belong to your store, otherwise the call reports that nothing was found. A request can be linked only once, and an order can be linked to only one request - attempting either again fails with a 400 that says so.

Query parameters

requestIdstringRequired

Id of the request to link, as returned by Place a request. Positive integer.

orderIdstringRequired

Id of the order to link the request to, as returned by Place a lab order. Positive integer.

Responses

200

Request linked to the order

{
statusstring
Enum:successfailure
messagestring

Confirms which request was linked to which order.

}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
404

No request, or no order, found for the given id in your store

{
statusstring
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
500

The link could not be saved. Nothing was changed, and the call can be retried.

{
statusstring
errorstring
}
Sample response
{
  "status": "success",
  "message": "Request (Id: 8421) successfully linked to Order (Id: 47585)"
}

Request example

Request example (cURL)
curl -X GET 'https://integration.labstack.in/api/v1.3/request/linkToOrder?requestId=8421&orderId=47585' \
  -H 'ls-api-key: <YOUR_API_KEY>'

Place a request

Creates a request - an enquiry raised against the authenticated store, not an order. Use it when a customer has shown interest but the booking is not yet confirmed: the request is followed up, the details and pricing are settled, and once the order has been placed the two are tied together with Link a request to an order. Only name and mobile are required. Any packages and tests given must be part of your store network, and an optional labId pins the request to a single lab, which must support every package and test given as well as the requested orderType. If the customer has already paid your store for this request, give the amount in amountPaidToStore. The order booked from the request is then set up by default for your store to collect payment from the customer.

Request bodyRequired

{
orderTypestringOptional
Enum:HOME_SAMPLECENTER_VISITKIT_BASED

Optional. Type of service the customer is interested in.

isVipbooleanOptional

Optional. Marks the request as VIP. Defaults to false.

referenceIdstringOptional

Optional. Your own reference id, echoed back on the request.

requestGroupIdstringOptional

Optional. Your own grouping key, to tie several requests raised together into one batch.

packageIdsarray<string>Optional

Optional. LS package ids the customer is interested in (e.g. LSP11002). Each must be active and part of your store network, and must support orderType when one is given.

testIdsarray<string>Optional

Optional. LS test ids the customer is interested in (e.g. LSL110001).

appointmentstringOptional

Optional. Preferred appointment date-time, ISO 8601 format. Must be in the future.

labIdintegerOptional

Optional. Preferred lab, as returned by List labs. Must be in your store network, support the requested orderType, and carry every package and test given.

notesstringOptional

Optional. Free-text notes for the request (e.g. "Patient is old, veins are thin").

referredBystringOptional

Optional. Who referred the customer.

amountPaidToStorenumberOptional

Optional. Amount in INR the customer has already paid your store for this request, as a number of 0 or more. Omit it, or send 0, when nothing was paid. When it is above 0, the order booked from the request is set up by default for your store to collect payment from the customer.

namestringRequired

Customer name. Sanitised to alphanumerics and spaces; must be non-empty after sanitisation and at most 50 characters.

mobilestringRequired

10 digits, cannot start with 0.

emailstringOptional

Optional. Customer email address.

dateOfBirthstringOptional

Optional. YYYY-MM-DD. Cannot be in the future. Takes precedence over age when both are given.

ageintegerOptional

Optional. Customer age in whole years, used to derive an approximate date of birth. Read only when dateOfBirth is omitted.

genderstringOptional
Enum:MALEFEMALEOTHERS

Optional. Customer gender.

altContactstringOptional

Optional. Alternate contact number. 10 digits, cannot start with 0.

unitFloorBuildingstringOptional

Optional. Part of the customer address.

addressstringOptional

Optional. Part of the customer address.

localitystringOptional

Optional. Part of the customer address.

citystringOptional

Optional. Part of the customer address.

statestringOptional

Optional. Part of the customer address.

pincodestringOptional

Optional. 6 digits.

}

Responses

200

Request created

{
statusstring
Enum:successfailure
requestobject
{
requestIdinteger

Id of the created request. Pass this to Link a request to an order once the order exists.

requestStatusstring
Enum:OPEN

Always OPEN for a newly created request.

}
}
400

Bad request — missing or invalid parameters

{
statusstring
Enum:failure
errorstring
}
401

Unauthorized — API key missing, invalid, expired or revoked

{
statusstring
Enum:failure
errorstring
}
429

Too many failed authentication attempts from your address. Every request from that address is refused, whatever key it carries, until the number of seconds in the Retry-After header has passed.

{
statusstring
Enum:failure
errorstring
}
Sample response
{
  "status": "success",
  "request": {
    "requestId": 8421,
    "requestStatus": "OPEN"
  }
}

Request example

Request example (cURL)
curl -X POST 'https://integration.labstack.in/api/v1.3/request/placeRequest' \
  -H 'ls-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "orderType": "HOME_SAMPLE",
    "isVip": false,
    "referenceId": "REF-123",
    "requestGroupId": "GRP-9",
    "packageIds": [
      "LSP11002",
      "LSP11004"
    ],
    "testIds": [
      "LSL110001"
    ],
    "appointment": "2026-06-01T11:00:00+05:30",
    "labId": 57,
    "notes": "Customer asked for an early morning slot.",
    "referredBy": "Dr. Rao",
    "amountPaidToStore": 1499,
    "name": "Bob Smith",
    "mobile": "8047359194",
    "email": "bobsmith@example.com",
    "dateOfBirth": "2000-01-01",
    "gender": "MALE",
    "altContact": "8047359195",
    "unitFloorBuilding": "2nd Floor Tower 3",
    "address": "123 Main Road",
    "locality": "Gopalapur",
    "city": "Bangalore",
    "state": "Karnataka",
    "pincode": "560035"
  }'