Medication Logs
Function-calling namespace: medicationLogs
- 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.
generateMedicationSchedule
Source: backend/endpoints/medication-logs/generate-medication-schedule
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | string | Yes |
prescriptionId | 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": "medicationLogs",
"apiName": "generateMedicationSchedule",
"data": {
"stackUserId": "stackuser_123",
"prescriptionId": "prescription_123"
}
}'Example Response
{ "status": "ok", "data": {} }getActivePrescriptionsWithTracking
Source: backend/endpoints/medication-logs/get-active-prescriptions-with-tracking
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | 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": "medicationLogs",
"apiName": "getActivePrescriptionsWithTracking",
"data": {
"stackUserId": "stackuser_123"
}
}'Example Response
{ "status": "ok", "data": {} }getAdherenceStats
Source: backend/endpoints/medication-logs/get-adherence-stats
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | string | Yes |
prescriptionId | 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": "medicationLogs",
"apiName": "getAdherenceStats",
"data": {
"stackUserId": "stackuser_123"
}
}'Example Response
{ "status": "ok", "data": {} }getMedicationHistory
Source: backend/endpoints/medication-logs/get-medication-history
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | string | Yes |
startDate | string | No |
endDate | string | No |
limit | int | 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": "medicationLogs",
"apiName": "getMedicationHistory",
"data": {
"stackUserId": "stackuser_123"
}
}'Example Response
{ "status": "ok", "data": {} }getPrescriptionProgress
Source: backend/endpoints/medication-logs/get-prescription-progress
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | string | Yes |
prescriptionId | 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": "medicationLogs",
"apiName": "getPrescriptionProgress",
"data": {
"stackUserId": "stackuser_123",
"prescriptionId": "prescription_123"
}
}'Example Response
{ "status": "ok", "data": {} }getTodaysMedications
Source: backend/endpoints/medication-logs/get-todays-medications
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | 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": "medicationLogs",
"apiName": "getTodaysMedications",
"data": {
"stackUserId": "stackuser_123"
}
}'Example Response
{ "status": "ok", "data": {} }markMedicationSkipped
Source: backend/endpoints/medication-logs/mark-medication-skipped
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | string | Yes |
logId | string | Yes |
notes | 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": "medicationLogs",
"apiName": "markMedicationSkipped",
"data": {
"stackUserId": "stackuser_123",
"logId": "log_123"
}
}'Example Response
{ "status": "ok", "data": {} }markMedicationTaken
Source: backend/endpoints/medication-logs/mark-medication-taken
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | string | Yes |
logId | string | Yes |
notes | 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": "medicationLogs",
"apiName": "markMedicationTaken",
"data": {
"stackUserId": "stackuser_123",
"logId": "log_123"
}
}'Example Response
{ "status": "ok", "data": {} }markMissedMedications
Source: backend/endpoints/medication-logs/mark-missed-medications
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | 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": "medicationLogs",
"apiName": "markMissedMedications",
"data": {
"stackUserId": "stackuser_123"
}
}'Example Response
{ "status": "ok", "data": {} }