EndpointsSuppliers

Suppliers

Function-calling namespace: suppliers

  • 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/suppliers/create

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
modulestringNo-
namestringYes-
contactPersonstringNo-
phonestringNo-
emailstringNo-
gstNumberstringNo-
addressstringNo-
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": "suppliers",
  "apiName": "create",
  "data": {
    "organizationId": "org_123",
    "name": "value"
  }
}'

Example Response

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

delete

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

Example Response

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

getById

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

Example Response

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

list

Source: backend/endpoints/suppliers/list

Input Fields

FieldTypeRequiredConstraints
organizationIdstringYes-
modulestringNo-
searchstringNo-
sortBystringNo-
sortOrderstringNo-
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": "suppliers",
  "apiName": "list",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/suppliers/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
organizationIdstringYes-
namestringNonullable
contactPersonstringNonullable
phonestringNonullable
emailstringNonullable
gstNumberstringNonullable
addressstringNonullable
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": "suppliers",
  "apiName": "update",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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