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.
createReminder
Source: backend/endpoints/medication-logs/create-reminder
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
stackUserId | string | Yes | - |
medicineName | string | Yes | - |
medicineType | string | No | oneof: TABLET |
frequency | string | No | oneof: ONCE_DAILY |
reminderTimes | array<string> | Yes | min items: 1; unique HH:mm values |
startDate | string | Yes | format: YYYY-MM-DD |
endDate | string | No | format: YYYY-MM-DD |
notes | string | No | - |
isEnabled | boolean | No | nullable; default: true |
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": "createReminder",
"data": {
"stackUserId": "stackuser_123",
"medicineName": "Paracetamol 500mg",
"medicineType": "TABLET",
"frequency": "THREE_TIMES_DAILY",
"reminderTimes": [
"08:00",
"13:00",
"20:00"
],
"startDate": "2026-06-25",
"endDate": "2026-07-02",
"notes": "After food",
"isEnabled": true
}
}'Example Response
{ "status": "ok", "data": {} }deleteReminder
Source: backend/endpoints/medication-logs/delete-reminder
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
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": "deleteReminder",
"data": {
"id": "reminder_123",
"stackUserId": "stackuser_123"
}
}'Example Response
{ "status": "ok", "data": {} }generateMedicationSchedule
Source: backend/endpoints/medication-logs/generate-medication-schedule
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
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 | Constraints |
|---|---|---|---|
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 | Constraints |
|---|---|---|---|
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 | Constraints |
|---|---|---|---|
stackUserId | string | Yes | - |
startDate | string | No | format: YYYY-MM-DD |
endDate | string | No | format: YYYY-MM-DD |
limit | integer | No | min: 1; max: 365 |
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 | Constraints |
|---|---|---|---|
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 | Constraints |
|---|---|---|---|
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": {} }listActiveReminders
Source: backend/endpoints/medication-logs/list-active-reminders
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
stackUserId | string | Yes | - |
date | string | No | format: YYYY-MM-DD |
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": "listActiveReminders",
"data": {
"stackUserId": "stackuser_123",
"date": "2026-06-25"
}
}'Example Response
{ "status": "ok", "data": {} }markMedicationSkipped
Source: backend/endpoints/medication-logs/mark-medication-skipped
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
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 | Constraints |
|---|---|---|---|
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 | Constraints |
|---|---|---|---|
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": {} }toggleReminder
Source: backend/endpoints/medication-logs/toggle-reminder
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
stackUserId | string | Yes | - |
isEnabled | boolean | 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": "toggleReminder",
"data": {
"id": "reminder_123",
"stackUserId": "stackuser_123",
"isEnabled": false
}
}'Example Response
{ "status": "ok", "data": {} }updateReminder
Source: backend/endpoints/medication-logs/update-reminder
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
stackUserId | string | Yes | - |
medicineName | string | Yes | - |
medicineType | string | No | oneof: TABLET |
frequency | string | No | oneof: ONCE_DAILY |
reminderTimes | array<string> | Yes | min items: 1; unique HH:mm values |
startDate | string | Yes | format: YYYY-MM-DD |
endDate | string | No | format: YYYY-MM-DD |
notes | string | No | - |
isEnabled | boolean | No | nullable |
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": "updateReminder",
"data": {
"id": "reminder_123",
"stackUserId": "stackuser_123",
"medicineName": "Paracetamol 500mg",
"medicineType": "TABLET",
"frequency": "TWICE_DAILY",
"reminderTimes": [
"08:00",
"20:00"
],
"startDate": "2026-06-25",
"endDate": "2026-07-02",
"notes": "After food",
"isEnabled": true
}
}'Example Response
{ "status": "ok", "data": {} }