Tax lines
curl --request POST \
--url https://win.oneshotagent.com/v1/tools/ledger/tax_linesimport requests
url = "https://win.oneshotagent.com/v1/tools/ledger/tax_lines"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://win.oneshotagent.com/v1/tools/ledger/tax_lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://win.oneshotagent.com/v1/tools/ledger/tax_lines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://win.oneshotagent.com/v1/tools/ledger/tax_lines"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://win.oneshotagent.com/v1/tools/ledger/tax_lines")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/tools/ledger/tax_lines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyConnections
Tax lines
Read document lines with their tax codes and VAT from your connected accounting system
POST
/
v1
/
tools
/
ledger
/
tax_lines
Tax lines
curl --request POST \
--url https://win.oneshotagent.com/v1/tools/ledger/tax_linesimport requests
url = "https://win.oneshotagent.com/v1/tools/ledger/tax_lines"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://win.oneshotagent.com/v1/tools/ledger/tax_lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://win.oneshotagent.com/v1/tools/ledger/tax_lines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://win.oneshotagent.com/v1/tools/ledger/tax_lines"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://win.oneshotagent.com/v1/tools/ledger/tax_lines")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/tools/ledger/tax_lines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyOverview
Read-only: no filing, posting or mail. Payment cursors retain state for 24 hours; other selections store nothing.oneshot_ledger_tax_lines answers one record per document line.
QuickBooks only; other systems refuse before payment: unsupported_for_system.
Authentication
x402payment-signature required. Pricing.
Request
| Field | Meaning |
|---|---|
connection_id | Required. |
select | One: { document_from, document_to }, { document_ids } (≤100), or { paid_from, paid_to }. Dates are inclusive; payments match recorded, effective or reversal dates regardless of document date. |
document_types | Any of invoice, credit_note, bill, bill_credit, bank, journal. Default: all. |
limit, cursor | 1–100 lines (default 100); previous next_cursor, with the same select, document_types and limit. |
{ "connection_id": "5f4a3b2c-1d0e-4f9a-8b7c-6d5e4f3a2b1c", "select": { "document_from": "2026-07-01", "document_to": "2026-09-30" } }
Response
Follownext_cursor, even on empty pages. Payment scans have no date cutoff (window_margin_days: null). Missing effective-date or reversal history leaves selection_complete: false, even finally. Empty incomplete results prove nothing. Expired cursors require restarting.
Payment scans refuse (not_supported) ≥1,000 transactions per type/date; paging provides no snapshot.
| Field | Meaning |
|---|---|
records[].id | <document id>:<line>; bundle items: <document id>:<line>.<item>. |
records[].net, vat, gross | In the ledger’s home currency; net is before tax. Credits are negative. |
records[].vat | Recorded VAT allocated in pennies; null when unavailable, never estimated or assumed zero. |
records[].rate | The percentage the transaction recorded, not the code’s current rate. |
records[].tax_evidence | Recorded total/components; allocation: transaction_allocation or unavailable. |
records[].supply | Valid service/shipping date; otherwise none. |
records[].document.settlement_history | ≤20 distinct ids across observations/pages. Overflow: incomplete, limit, observed_at_least: 21, unknown total. Unread references or date/id selections: read_incomplete. |
records[].document.has_attachment, records[].account.class, total_documents | null. |
unresolved_documents[] | Missing/deleted/voided/forbidden documents with listed settlements; unlinked: document: null. No invented lines. |
tax_codes[] | Current code, name, rate, report_type, status; multiple rates: rate: null. |
{
"success": true,
"data": {
"records": [
{
"id": "130:1",
"document": { "type": "invoice", "id": "130", "number": "INV-1037", "date": "2026-09-01", "currency": "GBP" },
"tax_code": "5", "rate": 20, "net": 100, "vat": 20, "gross": 120, "direction": "sale",
"supply": { "date": "2026-08-20", "evidence": "service_date" },
"tax_evidence": { "allocation": "transaction_allocation", "transaction_vat": 20 }
}
],
"unresolved_documents": [],
"tax_codes": [{ "code": "5", "name": "20.0% S", "rate": 20, "report_type": null, "status": "active" }],
"total_documents": null,
"window_margin_days": 0,
"selection_complete": true
}
}
Errors
As Accounting.not_supported (400): select other document_ids, narrow document_types or the window:
- Foreign-currency documents: exchange rate missing/not 1; no conversion.
- Tax-inclusive line amounts that do not add up to recorded taxable amounts.
- Bundles missing their item lines.
VAT summary
ledger_reports, type: "vat_summary": QuickBooks TaxSummary (France only), company accounting basis. Period: from/to; pagination: limit/cursor. Monetary columns become labelled rows; percentages excluded. Other systems refuse before payment.
Payment evidence
settlements_listed: window matches. settlements: independent document history, including outside-window payments. Listing 600/document 500 stay separate. Incomplete history proves no payment proportion.
Method matching ignores case/outer spaces; method_raw stays unchanged:
| QuickBooks wording | Method |
|---|---|
| Cash | cash |
| Check, Cheque | cheque |
| Credit Card, CreditCard, Debit Card | card |
| Direct Debit, Giro, Standing Order | giro_standing_order_direct_debit |
| Absent or any other wording | null |