EndpointsPre Consultation Question Templates

Pre Consultation Question Templates

Function-calling namespace: preConsultationQuestionTemplates

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

create

Source: backend/endpoints/pre-consultation-question-templates/create

Input Fields

FieldTypeRequiredConstraints
platformDepartmentIdstringYes-
questionTextstringYes-
questionTypestringYesoneof: text
isRequiredbooleanNo-
isActivebooleanNo-
isDeletedbooleanNonullable
createdAtintegerNounix-ms timestamp; nullable
updatedAtintegerNounix-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": "preConsultationQuestionTemplates",
  "apiName": "create",
  "data": {
    "platformDepartmentId": "org_123",
    "questionText": "value",
    "questionType": "text"
  }
}'

Example Response

{ "status": "ok", "data": {} }

delete

Source: backend/endpoints/pre-consultation-question-templates/delete

Input Fields

FieldTypeRequiredConstraints
idstringYes-

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": "preConsultationQuestionTemplates",
  "apiName": "delete",
  "data": {
    "id": "id_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getById

Source: backend/endpoints/pre-consultation-question-templates/get-by-id

Input Fields

FieldTypeRequiredConstraints
idstringYes-

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": "preConsultationQuestionTemplates",
  "apiName": "getById",
  "data": {
    "id": "id_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getByPlatformDepartment

Source: backend/endpoints/pre-consultation-question-templates/get-by-platform-department

Input Fields

FieldTypeRequiredConstraints
platformDepartmentIdstringYes-

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": "preConsultationQuestionTemplates",
  "apiName": "getByPlatformDepartment",
  "data": {
    "platformDepartmentId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

listByDepartment

Source: backend/endpoints/pre-consultation-question-templates/list-by-department

Input Fields

FieldTypeRequiredConstraints
departmentIdstringYes-
pageintegerNo-
pageSizeintegerNo-

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": "preConsultationQuestionTemplates",
  "apiName": "listByDepartment",
  "data": {
    "departmentId": "department_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

listByOrganization

Source: backend/endpoints/pre-consultation-question-templates/list-by-organization

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
pageintegerNo-
pageSizeintegerNo-

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": "preConsultationQuestionTemplates",
  "apiName": "listByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

update

Source: backend/endpoints/pre-consultation-question-templates/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
platformDepartmentIdstringNonullable
questionTextstringNonullable
questionTypestringNonullable
isRequiredbooleanNonullable
orderIndexintegerNonullable
versionintegerNonullable
isActivebooleanNonullable
isDeletedbooleanNonullable
createdAtintegerNounix-ms timestamp; nullable
updatedAtintegerNounix-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": "preConsultationQuestionTemplates",
  "apiName": "update",
  "data": {
    "id": "id_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }