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

FieldTypeRequiredConstraints
organizationIdstringYes-
organizationDepartmentIdstringYes-
templateQuestionIdstringNo-
templateVersionintegerNonullable
questionTextstringYes-
questionTypestringYes-
isRequiredbooleanNo-
orderIndexintegerNo-
isCustombooleanNo-
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": "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

FieldTypeRequiredConstraints
organizationIdstringYes-
organizationDepartmentIdstringYes-
questionTextstringYes-
questionTypestringYes-
isRequiredbooleanNo-
orderIndexintegerNo-
isCustombooleanNo-
isActivebooleanNo-

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

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

deleteQuestion

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

Input Fields

FieldTypeRequiredConstraints
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": "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

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

getForDepartment

Source: backend/endpoints/organization-pre-consultation-questions/get-for-department

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
departmentIdstringYes-

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

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

FieldTypeRequiredConstraints
organizationIdstringYes-
departmentIdstringYes-
pageintegerNo-
pageSizeintegerNo-
isDeletedbooleanNonullable

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

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
organizationDepartmentIdstringNonullable
templateQuestionIdstringNonullable
templateVersionintegerNonullable
questionTextstringNonullable
questionTypestringNonullable
isRequiredbooleanNonullable
orderIndexintegerNonullable
isCustombooleanNonullable
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": "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

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
organizationDepartmentIdstringNo-
questionTextstringNo-
questionTypestringNo-
isRequiredbooleanNonullable
orderIndexintegerNonullable
isCustombooleanNonullable
isActivebooleanNonullable

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