Patient Profiles
Function-calling namespace: patientProfiles
- 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/patient-profiles/create
Input Fields
| Field | Type | Required |
|---|---|---|
stackUserId | string | Yes |
firstName | string | Yes |
lastName | string | Yes |
phone | string | Yes |
email | string | No |
dateOfBirth | string | Yes |
gender | string | Yes |
bloodGroup | string | No |
address | map[string]interface{} | No |
emergencyContact | map[string]interface{} | No |
profileImageId | string | No |
profileImageUrl | string | No |
isProfileComplete | bool | No |
isPhoneVerified | bool | No |
isEmailVerified | *bool | No |
allergies | []string | No |
chronicConditions | []string | No |
currentMedications | []string | No |
expoPushToken | string | No |
createdAt | *int64 | No |
updatedAt | *int64 | 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": "patientProfiles",
"apiName": "create",
"data": {
"stackUserId": "stackuser_123",
"firstName": "value",
"lastName": "value",
"phone": "+911234567890",
"dateOfBirth": "2026-03-10",
"gender": "value"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/patient-profiles/delete
Input Fields
| Field | Type | Required |
|---|---|---|
id | 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": "patientProfiles",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/patient-profiles/get-by-id
Input Fields
| Field | Type | Required |
|---|---|---|
id | 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": "patientProfiles",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/patient-profiles/list-by-organization
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | int | No |
pageSize | 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": "patientProfiles",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/patient-profiles/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
stackUserId | *string | No |
firstName | *string | No |
lastName | *string | No |
phone | *string | No |
email | *string | No |
dateOfBirth | *string | No |
gender | *string | No |
bloodGroup | *string | No |
address | *map[string]interface{} | No |
emergencyContact | *map[string]interface{} | No |
profileImageId | *string | No |
profileImageUrl | *string | No |
isProfileComplete | *bool | No |
isPhoneVerified | *bool | No |
isEmailVerified | *bool | No |
allergies | *[]string | No |
chronicConditions | *[]string | No |
currentMedications | *[]string | No |
expoPushToken | *string | No |
createdAt | *int64 | No |
updatedAt | *int64 | 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": "patientProfiles",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }