{"uid":"cap_UNFBx9QV_N-3qYeyKHPHV","slug":"oneshot-agent-ledger-reports-fcf822e5","name":"OneShot Agent Ledger Reports","description":"Tools, payments, and compute orchestration for autonomous AI agents.\n\n## Authentication\n\n- **`x402Payment`** — paid tool endpoints use the [x402 payment protocol](https://x402.io).\n  First call returns `402 Payment Required` with a quote; sign and resend the request\n  with `payment-signature: <base64 x402 payment>` and `X-Quote-ID: <quote_id>`.\n- **`agentId`** — free read-only endpoints accept `X-Agent-ID: <wallet>` (0x… address).\n- **`soulKey`** — soul marketplace seller dashboard uses `Authorization: Bearer soul_…`\n  (issued by `POST /v1/soul/register`).\n- **`acpBearer`** — Stripe ACP checkout sessions use a separate bearer token plus the\n  `API-Version: 2026-01-30` header.\n\n## Async tools & polling\n\nMost tool endpoints return `202 Accepted` with `{ request_id, tool, status }`. Poll\n`GET /v1/requests/{id}` (with the same `X-Agent-ID`) to retrieve the final result.\nA WebSocket fallback is available at `wss://<host>/v1/requests/subscribe`.\n\n## Pricing\n\nPrices are listed at [docs.oneshotagent.com/pricing](https://docs.oneshotagent.com/pricing).\nA wallet (x402) call returns its exact price in the 402 quote before anything is charged.\nCalls paid from prepaid credits (access-token sessions, and the phone number purchase at\n`POST /v1/tools/voice/numbers`) debit the credit balance when the request is accepted, before the work runs\n(`200` for a synchronous lookup, `201` for the number purchase, `202` for a queued job),\nand answer `402 insufficient_credits` with nothing charged or bought when the balance cannot cover it.\n\n## Error format\n\n`{ \"error\": \"<machine_code>\", \"message\": \"<human readable>\", \"details\": <optional> }`.\nValidation errors include a `details` field with the failing field paths.","url":"https://win.oneshotagent.com/v1/tools/ledger/reports?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string","description":"Profit and loss: the last day of the period (YYYY-MM-DD)"},"from":{"type":"string","description":"Profit and loss: the first day of the period (YYYY-MM-DD)"},"type":{"enum":["balance_sheet","profit_and_loss","trial_balance"],"type":"string","description":"The report. QuickBooks, Xero and Zoho Books: all three (Zoho Books: profit_and_loss needs from). NetSuite: no reports"},"as_of":{"type":"string","description":"Balance sheet and trial balance: the date the report stands at (YYYY-MM-DD); today when left out"},"limit":{"type":"number","description":"Records per page (1 to 100, default 25)"},"cursor":{"type":"string","description":"The next_cursor of the previous page"},"connection_id":{"type":"string","description":"The connection to read. An agent can have several connections to the same system: list your connections first (`GET /v1/connections`) and pick by `system` and `account_label`."}}},"responseSchema":{"type":"json","example":{"rows":[{"amount":12480.5,"account":"Checking","account_id":"35"}],"type":"balance_sheet","period":{"as_of":"2026-09-30"},"source":{"id":"BalanceSheet","system":"quickbooks"},"currency":"USD"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YomJcwWmXfeX4LH1rBoAV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generate accounting reports (balance sheet, profit & loss, or trial balance) from connected accounting systems like QuickBooks, Xero, or Zoho Books.","exampleAgentPrompt":"Pull a profit_and_loss report from my QuickBooks connection (connection ID abc123) for January 1 2026 through March 31 2026, showing 25 records per page.","exampleUseCases":[{"title":"Quarterly P&L for investor review","prompt":"Get me a profit and loss report from my QuickBooks account (connection abc123) for the full first quarter of 2026 — January 1 through March 31 — so I can share it with investors."},{"title":"End-of-year balance sheet snapshot","prompt":"Pull a balance sheet as of December 31 2025 from my Xero connection (connection id xero-001) so I can see where all my assets and liabilities stand at year end."},{"title":"Trial balance audit preparation","prompt":"Fetch a trial balance from my Zoho Books connection (connection zoho-99) as of today so my accountant can start preparing for the audit — give me 50 rows per page."}],"resultDescription":"A paginated list of account rows, each with account name, account ID, and amount. Also includes the report type (balance_sheet, profit_and_loss, or trial_balance), the reporting period (as_of date or from/to range), the source system and report identifier, and the currency (e.g. USD). A next_cursor is provided when more pages exist.","failureModes":["Invalid or missing connection_id returns an error; agent must list connections first via GET /v1/connections","Unsupported report type for the connected system (e.g. balance_sheet on NetSuite or non-trial_balance on Zoho Books) returns an error","Date parameters out of range or malformed (not YYYY-MM-DD) cause validation errors","x402 payment not included or invalid returns 402 Payment Required with a quote","Expired or revoked accounting connection credentials cause authentication failure with the upstream provider","Pagination cursor mismatch or reuse after data change may return inconsistent results"],"whenToPreferThis":"Use this endpoint when you need structured financial report data from a connected accounting system (QuickBooks, Xero, or Zoho Books) in a machine-readable format. Prefer this over manual exports or screen-scraping when the agent needs to programmatically analyze or summarize financials. Choose this over raw transaction endpoints when you need period-level aggregated accounting views like P&L or balance sheets rather than individual transaction records.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-30T18:39:55.943Z","isFirstParty":false,"canonicalSlug":"oneshot-agent-ledger-reports-fcf822e5"}