Invoices
Function-calling namespace: invoices
- 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/invoices/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
orgId | string | Yes | - |
userId | string | Yes | - |
customerName | string | Yes | - |
customerEmail | string | Yes | |
currency | string | No | - |
lineItems | array<object> | No | - |
totalAmountMinor | integer | No | min: 0 |
issueDate | string | Yes | format: YYYY-MM-DD |
dueDate | string | Yes | format: YYYY-MM-DD |
status | string | No | - |
notes | string | No | - |
paymentId | string | No | - |
Nested Field Structures
lineItems item
| Field | Type | Required | Constraints |
|---|---|---|---|
item | string | No | - |
description | string | No | - |
quantity | integer | No | - |
amountMinor | integer | 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": "invoices",
"apiName": "create",
"data": {
"orgId": "org_123",
"userId": "user_123",
"customerName": "value",
"customerEmail": "user@example.com",
"issueDate": "2026-03-12",
"dueDate": "2026-03-12"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/invoices/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
orgId | string | Yes | - |
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": "invoices",
"apiName": "delete",
"data": {
"id": "id_123",
"orgId": "org_123",
"userId": "user_123"
}
}'Example Response
{ "status": "ok", "data": {} }get
Source: backend/endpoints/invoices/get
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
orgId | string | Yes | - |
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": "invoices",
"apiName": "get",
"data": {
"id": "id_123",
"orgId": "org_123",
"userId": "user_123"
}
}'Example Response
{ "status": "ok", "data": {} }read
Source: backend/endpoints/invoices/read
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
orgId | string | Yes | - |
userId | string | Yes | - |
page | integer | No | - |
page_size | integer | 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": "invoices",
"apiName": "read",
"data": {
"orgId": "org_123",
"userId": "user_123"
}
}'Example Response
{ "status": "ok", "data": {} }send-email
Source: backend/endpoints/invoices/send-email
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
orgId | string | Yes | - |
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": "invoices",
"apiName": "send-email",
"data": {
"id": "id_123",
"orgId": "org_123",
"userId": "user_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/invoices/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
orgId | string | Yes | - |
userId | string | Yes | - |
customerName | string | No | nullable |
customerEmail | string | No | nullable |
currency | string | No | nullable |
lineItems | array<object> | No | nullable |
totalAmountMinor | integer | No | nullable |
issueDate | string | No | format: YYYY-MM-DD; nullable |
dueDate | string | No | format: YYYY-MM-DD; nullable |
status | string | No | nullable |
notes | string | No | nullable |
Nested Field Structures
lineItems item
| Field | Type | Required | Constraints |
|---|---|---|---|
item | string | No | - |
description | string | No | - |
quantity | integer | No | - |
amountMinor | integer | 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": "invoices",
"apiName": "update",
"data": {
"id": "id_123",
"orgId": "org_123",
"userId": "user_123"
}
}'Example Response
{ "status": "ok", "data": {} }