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 |
|---|---|---|
orgId | string | Yes |
userId | string | Yes |
customerName | string | Yes |
customerEmail | string | Yes |
currency | string | No |
lineItems | []models.InvoiceLineItem | No |
totalAmountMinor | int64 | No |
issueDate | string | Yes |
dueDate | string | Yes |
status | string | No |
notes | string | 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-10",
"dueDate": "2026-03-10"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/invoices/delete
Input Fields
| Field | Type | Required |
|---|---|---|
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 |
|---|---|---|
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 |
|---|---|---|
orgId | string | Yes |
userId | string | Yes |
page | int | No |
page_size | int | 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 |
|---|---|---|
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 |
|---|---|---|
id | string | Yes |
orgId | string | Yes |
userId | string | Yes |
customerName | *string | No |
customerEmail | *string | No |
currency | *string | No |
lineItems | *[]models.InvoiceLineItem | No |
totalAmountMinor | *int64 | No |
issueDate | *string | No |
dueDate | *string | No |
status | *string | No |
notes | *string | 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": {} }