Drug Sets
Function-calling namespace: drugSets
- 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.
create
Source: backend/endpoints/drug-sets/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
doctorId | string | Yes | - |
organizationId | string | Yes | - |
name | string | Yes | - |
medicines | array<object> | Yes | - |
isActive | boolean | No | nullable |
Nested Field Structures
medicines item
| Field | Type | Required | Constraints |
|---|---|---|---|
medicineName | 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": "drugSets",
"apiName": "create",
"data": {
"doctorId": "doctor_123",
"organizationId": "org_123",
"name": "value",
"medicines": [
{
"medicineName": "value"
}
]
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/drug-sets/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
doctorId | string | Yes | - |
organizationId | 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": "drugSets",
"apiName": "delete",
"data": {
"id": "id_123",
"doctorId": "doctor_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/drug-sets/get-by-id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
doctorId | string | Yes | - |
organizationId | 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": "drugSets",
"apiName": "getById",
"data": {
"id": "id_123",
"doctorId": "doctor_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }list
Source: backend/endpoints/drug-sets/list
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
doctorId | string | Yes | - |
organizationId | string | Yes | - |
search | 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": "drugSets",
"apiName": "list",
"data": {
"doctorId": "doctor_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/drug-sets/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
doctorId | string | Yes | - |
organizationId | string | Yes | - |
name | string | No | nullable |
medicines | array<object> | No | nullable |
isActive | boolean | No | nullable |
Nested Field Structures
medicines item
| Field | Type | Required | Constraints |
|---|---|---|---|
medicineName | 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": "drugSets",
"apiName": "update",
"data": {
"id": "id_123",
"doctorId": "doctor_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }