EndpointsPre Consultancy Questions

Pre Consultancy Questions

Function-calling namespace: preConsultancyQuestions

  • 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-consultancy-questions/create

Input Fields

FieldTypeRequiredConstraints
platformDepartmentIdstringNo-
organizationIdstringNo-
questionsarray<object>Yes-
isActivebooleanNo-
createdAtintegerNounix-ms timestamp; nullable
updatedAtintegerNounix-ms timestamp; nullable

Nested Field Structures

questions item

FieldTypeRequiredConstraints
idstringNo-
questionstringNo-
typestringNo-
requiredbooleanNonullable
optionsarray<string>No-
minnumberNonullable
maxnumberNonullable

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

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

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

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

Example Response

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

update

Source: backend/endpoints/pre-consultancy-questions/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
platformDepartmentIdstringNonullable
questionsarray<object>Nonullable
isActivebooleanNonullable
createdAtintegerNounix-ms timestamp; nullable
updatedAtintegerNounix-ms timestamp; nullable

Nested Field Structures

questions item

FieldTypeRequiredConstraints
idstringNo-
questionstringNo-
typestringNo-
requiredbooleanNonullable
optionsarray<string>No-
minnumberNonullable
maxnumberNonullable

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