EndpointsOrganization Pre Consultation Questions

Organization Pre Consultation Questions

Function-calling namespace: organizationPreConsultationQuestions

  • 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/organization-pre-consultation-questions/create

Input Fields

FieldTypeRequired
organizationIdstringYes
organizationDepartmentIdstringYes
templateQuestionIdstringNo
templateVersion*intNo
questionTextstringYes
questionTypestringYes
isRequiredboolNo
orderIndexintNo
isCustomboolNo
isActiveboolNo
isDeleted*boolNo
createdAt*int64No
updatedAt*int64No

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": {} }

delete

Source: backend/endpoints/organization-pre-consultation-questions/delete

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringYes

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": {} }

getById

Source: backend/endpoints/organization-pre-consultation-questions/get-by-id

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringYes

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": {} }

listByOrganization

Source: backend/endpoints/organization-pre-consultation-questions/list-by-organization

Input Fields

FieldTypeRequired
organizationIdstringYes
pageintNo
pageSizeintNo

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": {} }

update

Source: backend/endpoints/organization-pre-consultation-questions/update

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringYes
organizationDepartmentId*stringNo
templateQuestionId*stringNo
templateVersion*intNo
questionText*stringNo
questionType*stringNo
isRequired*boolNo
orderIndex*intNo
isCustom*boolNo
isActive*boolNo
isDeleted*boolNo
createdAt*int64No
updatedAt*int64No

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": {} }