EndpointsDrug Sets

Drug Sets

Function-calling namespace: drugSets

  • 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/drug-sets/create

Input Fields

FieldTypeRequiredConstraints
doctorIdstringYes-
organizationIdstringYes-
namestringYes-
medicinesarray<object>Yes-
isActivebooleanNonullable

Nested Field Structures

medicines item

FieldTypeRequiredConstraints
medicineNamestringYes-

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": "drugSets",
  "apiName": "create",
  "data": {
    "doctorId": "doctor_123",
    "organizationId": "org_123",
    "name": "value",
    "medicines": [
      {
        "medicineName": "value"
      }
    ]
  }
}'

Example Response

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

delete

Source: backend/endpoints/drug-sets/delete

Input Fields

FieldTypeRequiredConstraints
idstringYes-
doctorIdstringYes-
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": "drugSets",
  "apiName": "delete",
  "data": {
    "id": "id_123",
    "doctorId": "doctor_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

getById

Source: backend/endpoints/drug-sets/get-by-id

Input Fields

FieldTypeRequiredConstraints
idstringYes-
doctorIdstringYes-
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": "drugSets",
  "apiName": "getById",
  "data": {
    "id": "id_123",
    "doctorId": "doctor_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

list

Source: backend/endpoints/drug-sets/list

Input Fields

FieldTypeRequiredConstraints
doctorIdstringYes-
organizationIdstringYes-
searchstringNo-
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": "drugSets",
  "apiName": "list",
  "data": {
    "doctorId": "doctor_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/drug-sets/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
doctorIdstringYes-
organizationIdstringYes-
namestringNonullable
medicinesarray<object>Nonullable
isActivebooleanNonullable

Nested Field Structures

medicines item

FieldTypeRequiredConstraints
medicineNamestringYes-

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": "drugSets",
  "apiName": "update",
  "data": {
    "id": "id_123",
    "doctorId": "doctor_123",
    "organizationId": "org_123"
  }
}'

Example Response

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