Organization Pre Consultation Questions
Function-calling namespace: organizationPreConsultationQuestions
- 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/organization-pre-consultation-questions/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
organizationDepartmentId | string | Yes | - |
templateQuestionId | string | No | - |
templateVersion | integer | No | nullable |
questionText | string | Yes | - |
questionType | string | Yes | - |
isRequired | boolean | No | - |
orderIndex | integer | No | - |
isCustom | boolean | No | - |
isActive | boolean | No | - |
isDeleted | boolean | No | nullable |
createdAt | integer | No | unix-ms timestamp; nullable |
updatedAt | integer | No | unix-ms timestamp; 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": "organizationPreConsultationQuestions",
"apiName": "create",
"data": {
"organizationId": "org_123",
"organizationDepartmentId": "org_123",
"questionText": "value",
"questionType": "general"
}
}'Example Response
{ "status": "ok", "data": {} }createQuestion
Source: backend/endpoints/organization-pre-consultation-questions/create-question
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
organizationDepartmentId | string | Yes | - |
questionText | string | Yes | - |
questionType | string | Yes | - |
isRequired | boolean | No | - |
orderIndex | integer | No | - |
isCustom | boolean | No | - |
isActive | 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": "organizationPreConsultationQuestions",
"apiName": "createQuestion",
"data": {
"organizationId": "org_123",
"organizationDepartmentId": "org_123",
"questionText": "value",
"questionType": "general"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/organization-pre-consultation-questions/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "organizationPreConsultationQuestions",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }deleteQuestion
Source: backend/endpoints/organization-pre-consultation-questions/delete-question
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "organizationPreConsultationQuestions",
"apiName": "deleteQuestion",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/organization-pre-consultation-questions/get-by-id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
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": "organizationPreConsultationQuestions",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getForDepartment
Source: backend/endpoints/organization-pre-consultation-questions/get-for-department
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
departmentId | 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": "organizationPreConsultationQuestions",
"apiName": "getForDepartment",
"data": {
"organizationId": "org_123",
"departmentId": "department_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/organization-pre-consultation-questions/list-by-organization
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
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": "organizationPreConsultationQuestions",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganizationAndDepartment
Source: backend/endpoints/organization-pre-consultation-questions/list-by-organization-and-department
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
departmentId | string | Yes | - |
page | integer | No | - |
pageSize | integer | No | - |
isDeleted | 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": "organizationPreConsultationQuestions",
"apiName": "listByOrganizationAndDepartment",
"data": {
"organizationId": "org_123",
"departmentId": "department_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/organization-pre-consultation-questions/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
organizationDepartmentId | string | No | nullable |
templateQuestionId | string | No | nullable |
templateVersion | integer | No | nullable |
questionText | string | No | nullable |
questionType | string | No | nullable |
isRequired | boolean | No | nullable |
orderIndex | integer | No | nullable |
isCustom | boolean | No | nullable |
isActive | boolean | No | nullable |
isDeleted | boolean | No | nullable |
createdAt | integer | No | unix-ms timestamp; nullable |
updatedAt | integer | No | unix-ms timestamp; 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": "organizationPreConsultationQuestions",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }updateQuestion
Source: backend/endpoints/organization-pre-consultation-questions/update-question
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
organizationDepartmentId | string | No | - |
questionText | string | No | - |
questionType | string | No | - |
isRequired | boolean | No | nullable |
orderIndex | integer | No | nullable |
isCustom | boolean | No | nullable |
isActive | 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": "organizationPreConsultationQuestions",
"apiName": "updateQuestion",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }