Lab Provider
Function-calling namespace: labProvider
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
cancelOrder
Source: backend/endpoints/lab-provider/cancel-order
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
externalOrderId | string | Yes | - |
reasonKey | string | No | - |
reasonText | string | No | - |
organizationId | string | No | - |
labOrderId | string | No | - |
providerOrderId | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "cancelOrder",
"data": {
"providerCode": "value",
"externalOrderId": "externalorder_123"
}
}'Example Response
{ "status": "ok", "data": {} }catalog
Source: backend/endpoints/lab-provider/catalog
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
minPrice | number | No | nullable |
maxPrice | number | No | nullable |
gender | string | No | - |
page | integer | No | - |
pageSize | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "catalog",
"data": {
"providerCode": "value"
}
}'Example Response
{ "status": "ok", "data": {} }getProvider
Source: backend/endpoints/lab-provider/get-provider
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | Example: thyrocare |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "getProvider",
"data": {
"providerCode": "thyrocare"
}
}'Example Response
{
"status": "ok",
"data": {
"providerCode": "thyrocare",
"name": "Thyrocare",
"slug": "thyrocare",
"type": "diagnostic_center",
"description": "Book pathology tests and home collection slots through Thyrocare.",
"organizationId": "1773319982470739148-8f7eclP8",
"supportsHomeCollection": true,
"supportsPincodeCheck": true,
"supportsSlotBooking": true,
"metadata": {
"providerKind": "external_lab"
}
}
}createOrder
Source: backend/endpoints/lab-provider/create-order
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
organizationId | string | Yes | - |
patientId | string | Yes | - |
paymentId | string | Yes | - |
doctorId | string | No | - |
consultationId | string | No | - |
priority | string | No | - |
notes | string | No | - |
assignedTo | string | No | - |
payload | object | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "createOrder",
"data": {
"providerCode": "value",
"organizationId": "org_123",
"patientId": "patient_123",
"paymentId": "payment_123",
"payload": {}
}
}'Example Response
{ "status": "ok", "data": {} }getOrder
Source: backend/endpoints/lab-provider/get-order
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
externalOrderId | string | Yes | - |
include | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "getOrder",
"data": {
"providerCode": "value",
"externalOrderId": "externalorder_123"
}
}'Example Response
{ "status": "ok", "data": {} }getPincodes
Source: backend/endpoints/lab-provider/get-pincodes
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "getPincodes",
"data": {
"providerCode": "value"
}
}'Example Response
{ "status": "ok", "data": {} }getReport
Source: backend/endpoints/lab-provider/get-report
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
organizationId | string | Yes | - |
labOrderId | string | Yes | - |
externalOrderId | string | Yes | - |
leadId | string | Yes | - |
type | string | No | - |
testName | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "getReport",
"data": {
"providerCode": "value",
"organizationId": "org_123",
"labOrderId": "laborder_123",
"externalOrderId": "externalorder_123",
"leadId": "lead_123"
}
}'Example Response
{ "status": "ok", "data": {} }listOrders
Source: backend/endpoints/lab-provider/list-orders
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
startDate | string | No | format: YYYY-MM-DD |
endDate | string | No | format: YYYY-MM-DD |
sortBy | string | No | - |
sortOrder | string | No | - |
page | integer | No | - |
pageSize | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "listOrders",
"data": {
"providerCode": "value"
}
}'Example Response
{ "status": "ok", "data": {} }listProviders
Source: backend/endpoints/lab-provider/list-providers
Input Fields
No input fields.
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "listProviders",
"data": {}
}'Example Response
{
"status": "ok",
"data": {
"providers": [
{
"providerCode": "thyrocare",
"name": "Thyrocare",
"slug": "thyrocare",
"type": "diagnostic_center",
"description": "Book pathology tests and home collection slots through Thyrocare.",
"organizationId": "1773319982470739148-8f7eclP8",
"supportsHomeCollection": true,
"supportsPincodeCheck": true,
"supportsSlotBooking": true,
"metadata": {
"providerKind": "external_lab"
}
}
]
}
}priceBreakup
Source: backend/endpoints/lab-provider/price-breakup
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
payload | object | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "priceBreakup",
"data": {
"providerCode": "value",
"payload": {}
}
}'Example Response
{ "status": "ok", "data": {} }rescheduleOrder
Source: backend/endpoints/lab-provider/reschedule-order
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
externalOrderId | string | Yes | - |
appointmentDate | string | No | format: YYYY-MM-DD |
reasonKey | string | No | - |
reasonText | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "rescheduleOrder",
"data": {
"providerCode": "value",
"externalOrderId": "externalorder_123"
}
}'Example Response
{ "status": "ok", "data": {} }searchSlots
Source: backend/endpoints/lab-provider/search-slots
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
providerCode | string | Yes | - |
payload | object | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "labProvider",
"apiName": "searchSlots",
"data": {
"providerCode": "value",
"payload": {}
}
}'Example Response
{ "status": "ok", "data": {} }