> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneshotagent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tax lines on Xero

> What a Xero connection answers for document lines with their tax codes and VAT

## Overview

[Tax lines](https://docs.oneshotagent.com/api-reference/connections/accounting/tax-lines.md) on Xero: same contract. Read-only: no filing, posting or mail.

The tax rate table needs Xero's organisation settings permission. Without it: `connection_scope_missing` (409) before payment; reconnect in the console.

## Authentication

x402 `payment-signature` required. [Pricing](https://docs.oneshotagent.com/pricing.md).

## Documents

Invoices, credit notes, bills, bill credits, spend and receive money lines and manual journals, posted only.

Date windows leave out draft, voided and deleted documents; by id they are `unresolved_documents` (`deleted`, `voided`, otherwise `fetch_failed`). Bank transfers have no lines. `document_ids` are Xero uuids.

| Field | On Xero |
| - | - |
| `records[].vat` | The line's own recorded tax; `null` only when the line states none. |
| `records[].net` | The line amount, less its tax on a tax-inclusive document. |
| `records[].rate` | Only on ordinary taxable codes, where the line's amounts fix one percentage. Small lines and exempt, reverse-charge or no-VAT codes: `null`. Never the code's current rate. |
| `records[].tax_evidence` | `allocation`: `line_amount`, or `unavailable` when the line states no tax; `transaction_vat`: the document's tax total (`null` on journals); no `tax_lines`. |
| `records[].supply` | `none`: Xero records no delivery or performance date. |
| `records[].direction` | Bank: receive is `sale`, spend `purchase`. Journals: credit is `sale`, debit `purchase`, both positive. |
| `records[].document` | `has_attachment` stated; `created_at` and `counterparty.country`: `null`. |
| `records[].account` | `id` and `code`; `name` and `class`: `null`. |
| `tax_codes[]` | `code`: Xero's tax type; `report_type`: its report tax type. |

## Settlements

Every selection answers `settlements` from the document's own record: payments and applied credit notes, prepayments and overpayments.

`method`, `method_raw` and `reversal` are `null`: Xero records no payment method, and a removed payment leaves no record. `effective` is `none`, except `allocation_date` from a credit note's own allocation record, whose `id` is `allocation:<AllocationID>`, or `invoice:<InvoiceID>` when Xero states none.

`settlement_history` is `read_incomplete` when settlements do not add up to the document's paid and credited amounts.

Payment windows list payments by date and read credit note, prepayment and overpayment allocations whole, answering one document per page. `window_margin_days` is `null`; `selection_complete` stays `false`.

Money ahead that no document took by `paid_to` is `unlinked`; `amount` `null` when its records disagree. A refunded prepayment or overpayment is `fetch_failed`, `document.type` `null`: its id is not its bank line's.

## Errors

As [Tax lines](https://docs.oneshotagent.com/api-reference/connections/accounting/tax-lines.md#errors). `unsupported_for_system` (400): the listing, or a document cut across pages, changed after the cursor was given; restart without one. `not_supported` (400):

* A document whose `CurrencyRate` is not 1.
* Line amounts and tax mode that establish no net amount: tax-inclusive with no tax stated, tax under `NoTax`, or no mode unless the tax is zero.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.