Addressbook
Function-calling namespace: addressbook
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
create
Source: backend/endpoints/addressbook/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
userId | string | Yes | - |
addressType | string | Yes | oneof: HOME |
address | string | Yes | - |
city | string | Yes | - |
state | string | Yes | - |
country | string | Yes | - |
postcode | string | Yes | - |
latitude | number | No | nullable |
longitude | number | No | nullable |
isDefault | boolean | No | - |
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": "home",
"address": "221B Baker Street",
"city": "Bengaluru",
"state": "Karnataka",
"country": "India",
"postcode": "560001"
}
}'Example Response
{ "status": "ok", "data": {} }getActiveByUserId
Source: backend/endpoints/addressbook/get-active-by-user-id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
userId | string | Yes | - |
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
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
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
| Field | Type | Required | Constraints |
|---|---|---|---|
userId | string | Yes | - |
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
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
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
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
addressType | string | No | oneof: HOME |
address | string | No | nullable |
city | string | No | nullable |
state | string | No | nullable |
country | string | No | nullable |
postcode | string | No | nullable |
latitude | number | No | nullable |
longitude | number | No | nullable |
isActive | boolean | No | nullable |
isDefault | boolean | No | 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": "addressbook",
"apiName": "update",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }