Pre Consultancy Questions
Function-calling namespace: preConsultancyQuestions
- 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/pre-consultancy-questions/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
platformDepartmentId | string | No | - |
organizationId | string | No | - |
questions | array<object> | Yes | - |
isActive | boolean | No | - |
createdAt | integer | No | unix-ms timestamp; nullable |
updatedAt | integer | No | unix-ms timestamp; nullable |
Nested Field Structures
questions item
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | No | - |
question | string | No | - |
type | string | No | - |
required | boolean | No | nullable |
options | array<string> | No | - |
min | number | No | nullable |
max | number | 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": "preConsultancyQuestions",
"apiName": "create",
"data": {
"questions": [
{
"id": "id_123",
"question": "value",
"type": "general",
"required": true,
"options": [
"value"
],
"min": 1,
"max": 1
}
]
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/pre-consultancy-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": "preConsultancyQuestions",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/pre-consultancy-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": "preConsultancyQuestions",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/pre-consultancy-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": "preConsultancyQuestions",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/pre-consultancy-questions/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
platformDepartmentId | string | No | nullable |
questions | array<object> | No | nullable |
isActive | boolean | No | nullable |
createdAt | integer | No | unix-ms timestamp; nullable |
updatedAt | integer | No | unix-ms timestamp; nullable |
Nested Field Structures
questions item
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | No | - |
question | string | No | - |
type | string | No | - |
required | boolean | No | nullable |
options | array<string> | No | - |
min | number | No | nullable |
max | number | 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": "preConsultancyQuestions",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }