EndpointsAddressbook

Addressbook

Function-calling namespace: addressbook

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

Input Fields

FieldTypeRequired
userIdstringYes
addressTypestringYes
addressstringYes
citystringYes
statestringYes
countrystringYes
postcodestringYes

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": "addressbook",
  "apiName": "create",
  "data": {
    "userId": "user_123",
    "addressType": "GENERAL",
    "address": "value",
    "city": "value",
    "state": "value",
    "country": "value",
    "postcode": "value"
  }
}'

Example Response

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

getActiveByUserId

Source: backend/endpoints/addressbook/get-active-by-user-id

Input Fields

FieldTypeRequired
userIdstringYes

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": "addressbook",
  "apiName": "getActiveByUserId",
  "data": {
    "userId": "user_123"
  }
}'

Example Response

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

getById

Source: backend/endpoints/addressbook/get-by-id

Input Fields

FieldTypeRequired
idstringYes

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": "addressbook",
  "apiName": "getById",
  "data": {
    "id": "id_123"
  }
}'

Example Response

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

getByUserId

Source: backend/endpoints/addressbook/get-by-user-id

Input Fields

FieldTypeRequired
userIdstringYes

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": "addressbook",
  "apiName": "getByUserId",
  "data": {
    "userId": "user_123"
  }
}'

Example Response

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

softDelete

Source: backend/endpoints/addressbook/soft-delete

Input Fields

FieldTypeRequired
idstringYes

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": "addressbook",
  "apiName": "softDelete",
  "data": {
    "id": "id_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/addressbook/update

Input Fields

FieldTypeRequired
idstringYes
addressType*stringNo
address*stringNo
city*stringNo
state*stringNo
country*stringNo
postcode*stringNo
isActive*boolNo

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": "addressbook",
  "apiName": "update",
  "data": {
    "id": "id_123"
  }
}'

Example Response

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