# OneShot Agent Ledger Reports

> OneShot Agent Ledger Reports is a paid API for AI agents from win.oneshotagent.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-30).

Generate accounting reports (balance sheet, profit & loss, or trial balance) from connected accounting systems like QuickBooks, Xero, or Zoho Books.

## Facts

- Endpoint: POST https://win.oneshotagent.com/v1/tools/ledger/reports?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/oneshot-agent-ledger-reports-fcf822e5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UNFBx9QV_N-3qYeyKHPHV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability oneshot-agent-ledger-reports-fcf822e5 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Tools, payments, and compute orchestration for autonomous AI agents.

## Authentication

- **`x402Payment`** — paid tool endpoints use the [x402 payment protocol](https://x402.io).
  First call returns `402 Payment Required` with a quote; sign and resend the request
  with `payment-signature: <base64 x402 payment>` and `X-Quote-ID: <quote_id>`.
- **`agentId`** — free read-only endpoints accept `X-Agent-ID: <wallet>` (0x… address).
- **`soulKey`** — soul marketplace seller dashboard uses `Authorization: Bearer soul_…`
  (issued by `POST /v1/soul/register`).
- **`acpBearer`** — Stripe ACP checkout sessions use a separate bearer token plus the
  `API-Version: 2026-01-30` header.

## Async tools & polling

Most tool endpoints return `202 Accepted` with `{ request_id, tool, status }`. Poll
`GET /v1/requests/{id}` (with the same `X-Agent-ID`) to retrieve the final result.
A WebSocket fallback is available at `wss://<host>/v1/requests/subscribe`.

## Pricing

Prices are listed at [docs.oneshotagent.com/pricing](https://docs.oneshotagent.com/pricing).
A wallet (x402) call returns its exact price in the 402 quote before anything is charged.
Calls paid from prepaid credits (access-token sessions, and the phone number purchase at
`POST /v1/tools/voice/numbers`) debit the credit balance when the request is accepted, before the work runs
(`200` for a synchronous lookup, `201` for the number purchase, `202` for a queued job),
and answer `402 insufficient_credits` with nothing charged or bought when the balance cannot cover it.

## Error format

`{ "error": "<machine_code>", "message": "<human readable>", "details": <optional> }`.
Validation errors include a `details` field with the failing field paths.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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`."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/oneshot-agent-ledger-reports-fcf822e5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from win.oneshotagent.com](https://www.zero.xyz/host/win.oneshotagent.com/llms.txt)
