EndpointsPlatform Settings

Platform Settings

Function-calling namespace: platformSettings

  • 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.

getCheckoutFee

Source: backend/endpoints/platform-settings/get-checkout-fee

Input schema type: struct

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": "platformSettings",
  "apiName": "getCheckoutFee",
  "data": {}
}'

Example Response

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

getShadowfaxFlow

Source: backend/endpoints/platform-settings/get-shadowfax-flow

Input schema type: struct

Shadowfax Flow Notes

  • Returns the active Shadowfax fulfillment flow used by provider-order serviceability, create, update, dispatch-ready, and cancel flows.
  • If Super Admin has not saved a value yet, the backend returns the effective SHADOWFAX_FLOW fallback. Default fallback is on_demand.
  • on_demand uses dynamic organization pickup coordinates.
  • dedicated is opt-in and uses the organization Shadowfax store code.
FlowValueShadowfax APIs
On demandon_demandServiceability POST /api/v1/order-serviceability/; create POST /api/v2/orders/; edit PUT /api/v2/orders/{sfx_order_id}/edit/; cancel PUT /api/v2/orders/{sfx_order_id}/cancel/
Dedicated / store-baseddedicatedServiceability PUT /api/v2/store_serviceability/; create POST /api/v2/stores/orders/; edit PUT /api/v1/stores/edit-order/; cancel PUT /api/v2/orders/{sfx_order_id}/cancel/

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": "platformSettings",
  "apiName": "getShadowfaxFlow",
  "data": {}
}'

Example Response

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

updateCheckoutFee

Source: backend/endpoints/platform-settings/update-checkout-fee

Input Fields

FieldTypeRequiredConstraints
labelstringNo-
feeTypestringYes-
feeValuenumberNo-
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": "platformSettings",
  "apiName": "updateCheckoutFee",
  "data": {
    "feeType": "general"
  }
}'

Example Response

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

updateShadowfaxFlow

Source: backend/endpoints/platform-settings/update-shadowfax-flow

Input Fields

FieldTypeRequiredConstraints
flowstringYesoneof: on_demand or dedicated
updatedBystringNo-

Shadowfax Flow Notes

  • Sets the Super Admin Shadowfax flow override for subsequent provider-order logistics calls.
  • flow accepts on_demand or dedicated; aliases such as on-demand normalize to on_demand.
  • Use dedicated only when store-based Shadowfax fulfillment is intentionally required.
  • updatedBy should be the logged-in Super Admin user ID when available, but an audit label is accepted.

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": "platformSettings",
  "apiName": "updateShadowfaxFlow",
  "data": {
    "flow": "on_demand",
    "updatedBy": "user_123"
  }
}'

Example Response

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