EndpointsSuper Admin Refunds

Super Admin Refunds

Function-calling namespace: superAdminRefunds

  • 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/super-admin-refunds/create

Input Fields

FieldTypeRequiredConstraints
paymentIdstringYes-
organizationIdstringYes-
patientIdstringNo-
sourceTypestringNo-
sourceIdstringNo-
cancelledReasonstringNo-
originalAmountnumberYes-
refundAmountnumberYes-
razorpayRefundIdstringNo-
statusstringYes-
notesstringNo-
processedByUserIdstringNo-
processedAtintegerNounix-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": "superAdminRefunds",
  "apiName": "create",
  "data": {
    "paymentId": "payment_123",
    "organizationId": "org_123",
    "originalAmount": 1,
    "refundAmount": 1,
    "status": "scheduled"
  }
}'

Example Response

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

delete

Source: backend/endpoints/super-admin-refunds/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": "superAdminRefunds",
  "apiName": "delete",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

getById

Source: backend/endpoints/super-admin-refunds/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": "superAdminRefunds",
  "apiName": "getById",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

listByOrganization

Source: backend/endpoints/super-admin-refunds/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": "superAdminRefunds",
  "apiName": "listByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/super-admin-refunds/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
paymentIdstringNonullable
patientIdstringNonullable
sourceTypestringNonullable
sourceIdstringNonullable
cancelledReasonstringNonullable
originalAmountnumberNonullable
refundAmountnumberNonullable
razorpayRefundIdstringNonullable
statusstringNonullable
notesstringNonullable
processedByUserIdstringNonullable
processedAtintegerNounix-ms timestamp; nullable
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": "superAdminRefunds",
  "apiName": "update",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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