EndpointsInvoices

Invoices

Function-calling namespace: invoices

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

Input Fields

FieldTypeRequired
orgIdstringYes
userIdstringYes
customerNamestringYes
customerEmailstringYes
currencystringNo
lineItems[]models.InvoiceLineItemNo
totalAmountMinorint64No
issueDatestringYes
dueDatestringYes
statusstringNo
notesstringNo

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

FieldTypeRequired
idstringYes
orgIdstringYes
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": "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

FieldTypeRequired
idstringYes
orgIdstringYes
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": "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

FieldTypeRequired
orgIdstringYes
userIdstringYes
pageintNo
page_sizeintNo

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

FieldTypeRequired
idstringYes
orgIdstringYes
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": "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

FieldTypeRequired
idstringYes
orgIdstringYes
userIdstringYes
customerName*stringNo
customerEmail*stringNo
currency*stringNo
lineItems*[]models.InvoiceLineItemNo
totalAmountMinor*int64No
issueDate*stringNo
dueDate*stringNo
status*stringNo
notes*stringNo

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": {} }