Outcome
Rows of bills, bill_lines, bill_payments, aged_payables (asOf) or purchases_by_supplier (from/to), with stable documented columns.
Before you start
- Verify the intended environment, authenticated identity and specifically approved organization context.
- The published application permission is bills:read. Discover the exact granted canonical Books workspace and bind it separately from action input.
Discover the target
topolo whoami --json
topolo actions get app_topolo_books.exports.bills.get --detail --json
topolo resources topolo-books --json
topolo workspaces list topolo-books --json
- Set BOOKS_WORKSPACE_ID to the exact granted workspace returned by discovery.
Request
GET /api/exports/bills/{dataset}
Inspect and test this action. Save the reviewed input as payload.json; supply credential/resource context separately.
Input fields
| Field | Required | Meaning | Schema and constraints |
|---|---|---|---|
dataset | Required | dataset | {"type":"string","pattern":"^[a-z_]+$"} |
from | Optional | from | {"type":"string","pattern":"^\d{4}-\d{2}-\d{2}$"} |
to | Optional | to | {"type":"string","pattern":"^\d{4}-\d{2}-\d{2}$"} |
asOf | Optional | as Of | {"type":"string","pattern":"^\d{4}-\d{2}-\d{2}$"} |
Inspect nested fields and the complete input schema.
Effects
- Reads the selected Books exports result in the credential-scoped organization and applicable canonical workspace. Rows of bills, bill_lines, bill_payments, aged_payables (asOf) or purchases_by_supplier (from/to), with stable documented columns.
Interpret the response
This result returns a collection, report or verification summary without a stable resource identifier. Retain identifiers already resolved through published discovery; do not treat dates, counts or status flags as new ids.
Inspect the actual response fields and retained identifiers for the selected organization/workspace. Rows of bills, bill_lines, bill_payments, aged_payables (asOf) or purchases_by_supplier (from/to), with stable documented columns. Use the related published read actions when a returned record or ledger outcome needs further inspection; an HTTP 200 does not establish provider delivery or financial agreement.
Inspect the success schema. CLI/MCP add their own transport envelope; CLI --detail requests the full result.
Worked examples
Actual Books route handlers and the exported Worker were exercised against five local SQLite D1 concern databases with all committed migrations, the real posting Durable Object and local R2. Route captures use synthetic verified Auth; Worker captures use synthetic Auth transports. Nexus, Brand, Notify, Pay, Mercury and Xero responses are explicitly simulated at the provider transport boundary. Captures prove local request/response behavior and canonical SDK projection, not live bank access, payment movement, email delivery, provider eligibility, tax compliance, encrypted custody, scheduled execution, deployment or production completion. Fixture identities, credentials, addresses and records authorize no live operation.
Run a reviewed request
Save the input from the selected worked example as payload.json. Validate and inspect the plan before calling the action; refused examples demonstrate errors and are not instructions to execute.
CLI:
topolo actions validate app_topolo_books.exports.bills.get --data @payload.json --json
topolo actions plan app_topolo_books.exports.bills.get --resource-type workspace --resource-id "$BOOKS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_books.exports.bills.get --resource-type workspace --resource-id "$BOOKS_WORKSPACE_ID" --data @payload.json --detail --json
MCP tool and arguments for the first successful example:
{
"tool": "topolo_read_action",
"arguments": {
"actionId": "app_topolo_books.exports.bills.get",
"input": {
"dataset": "bills"
},
"resourceType": "workspace",
"resourceId": "<exact granted workspace id>",
"detail": true
}
}
Refused response · auth_error
Input · payload.json:
{
"dataset": "contacts"
}
Captured response · HTTP 401
{
"error": "API key validation failed"
}
HTTP 401. SDK error code auth_error. Authenticate in the intended organization again. Verify whoami and the exact Books application/workspace binding before retrying; do not switch identity to work around a refusal.
Successful response · HTTP 200
Input · payload.json:
{
"dataset": "bills"
}
Captured response · HTTP 200
{
"dataset": "bills",
"title": "Bills",
"generatedAt": "2026-10-05T19:42:40.976Z",
"currency": "USD",
"parameters": {},
"columns": [
{
"key": "number",
"title": "Number",
"type": "string",
"description": "bill number"
},
{
"key": "reference",
"title": "Reference",
"type": "string",
"description": ""
},
{
"key": "contact",
"title": "Contact",
"type": "string",
"description": "Contact name"
},
{
"key": "issue_date",
"title": "Issue date",
"type": "date",
"description": ""
},
{
"key": "due_date",
"title": "Due date",
"type": "date",
"description": ""
},
{
"key": "status",
"title": "Status",
"type": "string",
"description": "draft, awaiting_payment, paid or void"
},
{
"key": "currency",
"title": "Currency",
"type": "string",
"description": "Document currency"
},
{
"key": "exchange_rate",
"title": "Exchange rate",
"type": "number",
"description": "To base currency, blank when the same"
},
{
"key": "subtotal",
"title": "Subtotal",
"type": "number",
"description": "Before tax, in the currency column's major units"
},
{
"key": "tax",
"title": "Tax",
"type": "number",
"description": "Tax total, in the currency column's major units"
},
{
"key": "total",
"title": "Total",
"type": "number",
"description": "Document total, in the currency column's major units"
},
{
"key": "paid",
"title": "Paid",
"type": "number",
"description": "Payments received, in the currency column's major units"
},
{
"key": "written_off",
"title": "Written off",
"type": "number",
"description": "Settled through bad debt or small-balance write-off, in the currency column's major units"
},
{
"key": "outstanding",
"title": "Outstanding",
"type": "number",
"description": "Total less paid and written off, in the currency column's major units"
},
{
"key": "notes",
"title": "Notes",
"type": "string",
"description": ""
},
{
"key": "source",
"title": "Source",
"type": "string",
"description": "manual, xero and so on"
}
],
"rows": [],
"rowCount": 0
}
HTTP 200. Inspect the actual response fields and retained identifiers for the selected organization/workspace. Rows of bills, bill_lines, bill_payments, aged_payables (asOf) or purchases_by_supplier (from/to), with stable documented columns. Use the related published read actions when a returned record or ledger outcome needs further inspection; an HTTP 200 does not establish provider delivery or financial agreement.
Verify the result
- Inspect the actual response fields and retained identifiers for the selected organization/workspace. Rows of bills, bill_lines, bill_payments, aged_payables (asOf) or purchases_by_supplier (from/to), with stable documented columns.
- Use the related published read actions when a returned record or ledger outcome needs further inspection; an HTTP 200 does not establish provider delivery or financial agreement.
Errors and recovery
auth_error(HTTP 401): Authenticate in the intended organization again. Verify whoami and the exact Books application/workspace binding before retrying; do not switch identity to work around a refusal.
These are observed local refusals. Shared authentication, schema validation and resource authorization can also refuse before the route. Preserve the actual error, details and request id.
Recovery boundary
Repeat a read in the same authorized context; no state is changed.
Related actions
- List export datasets: Describe every dataset Books can export: its key, the route family and permission that serves it, the date parameters it takes, and every column with its type and meaning. The chart and journal datasets use the column names the importers read, so an export re-imports.
Evidence
Actual Books route handlers and the exported Worker were exercised against five local SQLite D1 concern databases with all committed migrations, the real posting Durable Object and local R2. Route captures use synthetic verified Auth; Worker captures use synthetic Auth transports. Nexus, Brand, Notify, Pay, Mercury and Xero responses are explicitly simulated at the provider transport boundary. Captures prove local request/response behavior and canonical SDK projection, not live bank access, payment movement, email delivery, provider eligibility, tax compliance, encrypted custody, scheduled execution, deployment or production completion. Fixture identities, credentials, addresses and records authorize no live operation.