Medication Suggestions
Function-calling namespace: medicationSuggestions
- 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.
getByConsultation
Source: backend/endpoints/medicine-suggestions/get-by-consultation
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
patientId | string | Yes | - |
consultationId | string | Yes | - |
priceFilter | object | No | nullable |
nearBy | object | No | nullable |
Nested Field Structures
priceFilter
| Field | Type | Required | Constraints |
|---|---|---|---|
minPrice | number | No | nullable |
maxPrice | number | No | nullable |
sortBy | string | No | - |
nearBy
| Field | Type | Required | Constraints |
|---|---|---|---|
lat | number | No | unix-ms timestamp; nullable |
lot | number | No | nullable |
latitude | number | No | nullable |
longitude | number | No | nullable |
radiusKm | number | No | nullable |
addressStreet | string | No | - |
addressCity | string | No | - |
addressState | string | No | - |
addressPostalCode | string | No | - |
addressCountry | 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": "medicationSuggestions",
"apiName": "getByConsultation",
"data": {
"patientId": "patient_123",
"consultationId": "consultation_123"
}
}'Example Response
{ "status": "ok", "data": {} }