atmon docs

REFERENCE/TOOLKITS/XERO.MD

Xero

Small business accounting. Manage contacts, raise invoices and bills, record payments and bank transactions, and pull reports.

PropertyValue
Slugxero
Definition version0.1.0
Base URLhttps://api.xero.com/api.xro/2.0
Auth schemesoauth2
Action tools38
By class19 read, 12 write, 7 destructive
Triggers0
Provider rate limit60 requests per 1m, per account

Measured routing accuracy

61 golden cases replayed through the router over the whole index: measured over corpus ea4f12ad2948 (65 toolkits, 2283 tools indexed and 13 declared uncallable), 38 cases written by hand and 23 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.

MeasureCasesShare
top-141/6167.2%
top-856/6191.8%

The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. just eval-live measures the same cases through the live reranker.

Authentication

Connect an entity with ConnectionsService.InitiateConnection, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.

oauth2

PropertyValue
Authorization URLhttps://login.xero.com/identity/connect/authorize
Token URLhttps://identity.xero.com/connect/token
Default scopesoffline_access, accounting.contacts, accounting.transactions, accounting.settings, accounting.reports.read
Refresh tokensyes, the refresh daemon renews ahead of expiry

Tools

38 action tools. The catalog-wide slug is xero.<tool>, which is what search_tools returns and call_tool takes.

xero.create_contact

Create a new customer or supplier contact in Xero. Use when the user wants to add, register, or set up someone to invoice or bill before raising a transaction against them. Requires a name; email and tax number are optional.

Class write (writes, no confirmation needed). Scopes accounting.contacts. Calls PUT /Contacts.

Arguments:

ArgumentTypeRequiredNotes
account_numberstringnoYour own internal reference code for this contact.
email_addressstringnoContact's email address.
first_namestringnoContact's first name, for an individual.
is_customerbooleannoTrue if this contact is invoiced (a sales customer).
is_supplierbooleannoTrue if this contact is billed (a purchases supplier).
last_namestringnoContact's last name, for an individual.
namestringyesContact or business name, e.g. "Acme Builders Ltd".
tax_numberstringnoTax or business registration number, e.g. an ABN or VAT id.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Contactsarray of object
Contacts[].ContactIDstring
Contacts[].ContactStatusstring
Contacts[].EmailAddressstring
Contacts[].IsCustomerboolean
Contacts[].IsSupplierboolean
Contacts[].Namestring

Also retrieved by: "set up a new customer in xero", "add a supplier we buy from", "register someone before I invoice them", "get this vendor into the books", "onboard a new client's billing details".

xero.get_contact

Get one Xero contact by id: name, email, tax number, and whether they are a customer, supplier, or both. Use when the user names a specific contact. For finding a contact by name or browsing all of them, use list_contacts.

Class read (reads only). Scopes accounting.contacts.read. Calls GET /Contacts/{{params.contact_id}}.

Arguments:

ArgumentTypeRequiredNotes
contact_idstringyesXero ContactID (GUID).
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Contactsarray of object
Contacts[].AccountNumberstring
Contacts[].ContactIDstring
Contacts[].ContactStatusstring
Contacts[].EmailAddressstring
Contacts[].IsCustomerboolean
Contacts[].IsSupplierboolean
Contacts[].Namestring
Contacts[].TaxNumberstring
Contacts[].UpdatedDateUTCstring

Also retrieved by: "pull up this client's details", "what's on file for this supplier", "check their tax number", "look up someone's billing info".

xero.list_contacts

List or search Xero contacts, optionally filtered by a raw where clause. Use when the user asks who our customers or suppliers are, wants to look someone up by name, or browses the contact list. For one known contact, use get_contact.

Class read (reads only). Scopes accounting.contacts.read. Calls GET /Contacts.

Arguments:

ArgumentTypeRequiredNotes
orderstringnoField to sort by, e.g. "Name" or "Name DESC".
pageintegernoPage number, 100 contacts per page. Defaults to 1.
tenant_idstringyesXero connected organisation id (tenant id).
wherestringnoXero API filter expression, e.g. 'Name.Contains("Acme")' or 'IsSupplier==true'. Omit to return every contact.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Contactsarray of object
Contacts[].ContactIDstring
Contacts[].ContactStatusstring
Contacts[].EmailAddressstring
Contacts[].IsCustomerboolean
Contacts[].IsSupplierboolean
Contacts[].Namestring

Also retrieved by: "who do we buy from", "find the client with this name", "show everyone we bill", "search our books for a vendor".

xero.update_contact

Edit an existing Xero contact's name, email, tax number, or account number. Use when the user wants to update, correct, or change a customer's or supplier's details. Only the fields given change; omit others to leave them as is.

Class write (writes, no confirmation needed). Scopes accounting.contacts. Calls POST /Contacts/{{params.contact_id}}.

Arguments:

ArgumentTypeRequiredNotes
account_numberstringnoNew internal reference code for this contact.
contact_idstringyesXero ContactID to update.
email_addressstringnoNew email address.
namestringnoNew contact or business name.
tax_numberstringnoNew tax or business registration number.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Contactsarray of object
Contacts[].ContactIDstring
Contacts[].ContactStatusstring
Contacts[].EmailAddressstring
Contacts[].Namestring

Also retrieved by: "fix their email on file", "this supplier's tax number changed", "correct the billing details we have", "change what's saved for them".

xero.archive_contact

Archive a Xero contact, taking them off the active customer or supplier list without deleting their invoice or payment history. Reversible only by editing the contact's status back in Xero directly. Use when the user wants to remove, retire, or clean up a contact that is no longer active.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes accounting.contacts. Calls POST /Contacts/{{params.contact_id}}.

Arguments:

ArgumentTypeRequiredNotes
contact_idstringyesXero ContactID to archive.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Contactsarray of object
Contacts[].ContactIDstring
Contacts[].ContactStatusstring

Also retrieved by: "get this old client off the active list", "retire a supplier we don't use anymore", "clean up someone we no longer deal with", "hide a vendor we stopped working with".

xero.create_invoice

Create a new sales invoice in Xero, billing a contact for one or more line items. Use when the user wants to invoice, bill, or charge a customer. Leave status as DRAFT to review first, or set AUTHORISED to make it payable right away. For a bill you owe, use create_bill instead.

Class write (writes, no confirmation needed). Scopes accounting.transactions. Calls PUT /Invoices.

Arguments:

ArgumentTypeRequiredNotes
contact_idstringyesXero ContactID of the customer being invoiced.
datestringnoInvoice date, YYYY-MM-DD. Defaults to today.
due_datestringnoPayment due date, YYYY-MM-DD.
line_itemsarray of objectyesInvoice line items, e.g. [{"Description": "Consulting hours", "Quantity": 10, "UnitAmount": 150, "AccountCode": "200", "TaxType": "OUTPUT"}].
referencestringnoFree-text reference shown on the invoice, e.g. a PO number.
statusstring, one of DRAFT, SUBMITTED, AUTHORISEDnoInvoice status. Defaults to DRAFT.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].AmountDuenumber
Invoices[].Contactobject
Invoices[].Contact.ContactIDstring
Invoices[].Contact.Namestring
Invoices[].CurrencyCodestring
Invoices[].InvoiceIDstring
Invoices[].InvoiceNumberstring
Invoices[].Statusstring
Invoices[].Totalnumber
Invoices[].Typestring

Also retrieved by: "bill this client for the work", "send someone a bill for hours worked", "charge a customer for the order", "start a bill I can send out", "raise a sales bill for consulting".

xero.get_invoice

Get one Xero sales invoice by id: its status, amount due, amount paid, due date, and line items. Use when the user names a specific invoice. For a bill you owe, use get_bill.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /Invoices/{{params.invoice_id}}.

Arguments:

ArgumentTypeRequiredNotes
invoice_idstringyesXero InvoiceID (GUID).
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].AmountDuenumber
Invoices[].AmountPaidnumber
Invoices[].Contactobject
Invoices[].Contact.ContactIDstring
Invoices[].Contact.Namestring
Invoices[].CurrencyCodestring
Invoices[].Datestring
Invoices[].DueDatestring
Invoices[].InvoiceIDstring
Invoices[].InvoiceNumberstring
Invoices[].LineItemsarray of object
Invoices[].LineItems[].Descriptionstring
Invoices[].LineItems[].LineAmountnumber
Invoices[].LineItems[].Quantitynumber
Invoices[].LineItems[].UnitAmountnumber
Invoices[].Statusstring
Invoices[].SubTotalnumber
Invoices[].Totalnumber
Invoices[].TotalTaxnumber
Invoices[].Typestring

Also retrieved by: "pull up this specific bill I sent", "check what's still owed on this one", "how much has this client paid so far".

xero.list_invoices

List Xero sales invoices, optionally filtered by contact, status, or a raw where clause. Use when the user asks about unpaid invoices, a customer's billing history, or outstanding accounts receivable. For bills owed to suppliers, use list_bills.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /Invoices.

Arguments:

ArgumentTypeRequiredNotes
contact_idstringnoOnly invoices for this contact id.
orderstringnoField to sort by, e.g. "DueDate" or "Total DESC".
pageintegernoPage number, 100 invoices per page. Defaults to 1.
statusstring, one of DRAFT, SUBMITTED, AUTHORISED, PAID, VOIDED, DELETEDnoOnly invoices in this state.
tenant_idstringyesXero connected organisation id (tenant id).
wherestringnoAdditional Xero API filter expression, e.g. 'AmountDue > 0'. Combined with contact_id and status when given.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].AmountDuenumber
Invoices[].Contactobject
Invoices[].Contact.ContactIDstring
Invoices[].Contact.Namestring
Invoices[].DueDatestring
Invoices[].InvoiceIDstring
Invoices[].InvoiceNumberstring
Invoices[].Statusstring
Invoices[].Totalnumber

Also retrieved by: "show what customers still owe us", "what's outstanding on our sales", "pull unpaid bills we've sent out", "what hasn't this client paid off yet".

xero.update_invoice

Edit an existing Xero sales invoice's line items, due date, reference, or status while it is still a draft or submitted. Use when the user wants to correct, add to, or authorise an invoice that has not been paid. For a bill you owe, use update_bill.

Class write (writes, no confirmation needed). Scopes accounting.transactions. Calls POST /Invoices/{{params.invoice_id}}.

Arguments:

ArgumentTypeRequiredNotes
due_datestringnoNew payment due date, YYYY-MM-DD.
invoice_idstringyesXero InvoiceID to update.
line_itemsarray of objectnoReplacement line items, in the same shape as create_invoice.
referencestringnoNew free-text reference.
statusstring, one of DRAFT, SUBMITTED, AUTHORISEDnoNew invoice status, e.g. AUTHORISED to make it payable.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].AmountDuenumber
Invoices[].InvoiceIDstring
Invoices[].Statusstring
Invoices[].Totalnumber

Also retrieved by: "add a line to a bill I haven't sent yet", "fix the due date on this one", "lock this in so it's ready to be paid".

xero.email_invoice

Email an authorised Xero sales invoice to its contact using their invoice email template. Use when the user wants to send, deliver, or mail an invoice to whoever owes it. The invoice must already be authorised.

Class write (writes, no confirmation needed). Scopes accounting.transactions. Calls POST /Invoices/{{params.invoice_id}}/Email.

Arguments:

ArgumentTypeRequiredNotes
invoice_idstringyesXero authorised InvoiceID to email.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].InvoiceIDstring
Invoices[].Statusstring

Also retrieved by: "get this bill out to the client", "deliver it so they can pay", "mail them what they owe", "get it out the door to whoever owes it".

xero.void_invoice

Void an authorised Xero sales invoice that will never be paid. Irreversible; the invoice stays on record marked voided instead of being deleted, and any allocated payments are removed. Use when the user wants to cancel, kill, or invalidate an invoice sent by mistake. For a bill, use void_bill.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes accounting.transactions. Calls POST /Invoices/{{params.invoice_id}}.

Arguments:

ArgumentTypeRequiredNotes
invoice_idstringyesXero InvoiceID to void.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].InvoiceIDstring
Invoices[].Statusstring

Also retrieved by: "kill this one, it went out by mistake", "cancel a bill that should never be paid", "this shouldn't have been sent at all".

xero.create_bill

Create a new bill owed to a supplier in Xero, from one or more line items. Use when the user wants to record, enter, or log an expense or purchase bill from a supplier. For an invoice you are sending a customer, use create_invoice instead.

Class write (writes, no confirmation needed). Scopes accounting.transactions. Calls PUT /Invoices.

Arguments:

ArgumentTypeRequiredNotes
contact_idstringyesXero ContactID of the supplier being billed.
datestringnoBill date, YYYY-MM-DD. Defaults to today.
due_datestringnoPayment due date, YYYY-MM-DD.
line_itemsarray of objectyesBill line items, e.g. [{"Description": "Office supplies", "Quantity": 1, "UnitAmount": 220, "AccountCode": "429", "TaxType": "INPUT"}].
referencestringnoFree-text reference, e.g. the supplier's bill number.
statusstring, one of DRAFT, SUBMITTED, AUTHORISEDnoBill status. Defaults to DRAFT.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].AmountDuenumber
Invoices[].Contactobject
Invoices[].Contact.ContactIDstring
Invoices[].Contact.Namestring
Invoices[].InvoiceIDstring
Invoices[].InvoiceNumberstring
Invoices[].Statusstring
Invoices[].Totalnumber
Invoices[].Typestring

Also retrieved by: "log an expense from a supplier", "enter what we owe for office supplies", "record a purchase we need to pay later".

xero.get_bill

Get one Xero bill by id: its status, amount due, amount paid, due date, and line items. Use when the user names a specific bill owed to a supplier. For a sales invoice, use get_invoice.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /Invoices/{{params.bill_id}}.

Arguments:

ArgumentTypeRequiredNotes
bill_idstringyesXero InvoiceID (GUID) of the bill.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].AmountDuenumber
Invoices[].AmountPaidnumber
Invoices[].Contactobject
Invoices[].Contact.ContactIDstring
Invoices[].Contact.Namestring
Invoices[].DueDatestring
Invoices[].InvoiceIDstring
Invoices[].InvoiceNumberstring
Invoices[].LineItemsarray of object
Invoices[].LineItems[].Descriptionstring
Invoices[].LineItems[].LineAmountnumber
Invoices[].LineItems[].Quantitynumber
Invoices[].LineItems[].UnitAmountnumber
Invoices[].Statusstring
Invoices[].Totalnumber

Also retrieved by: "what do we still owe on this one", "pull up details on this supplier expense", "check the due date on what we owe them".

xero.list_bills

List bills owed to suppliers in Xero, optionally filtered by contact, status, or a raw where clause. Use when the user asks what we owe, which supplier bills are unpaid, or wants accounts payable. For invoices sent to customers, use list_invoices.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /Invoices.

Arguments:

ArgumentTypeRequiredNotes
contact_idstringnoOnly bills from this supplier contact id.
orderstringnoField to sort by, e.g. "DueDate" or "Total DESC".
pageintegernoPage number, 100 bills per page. Defaults to 1.
statusstring, one of DRAFT, SUBMITTED, AUTHORISED, PAID, VOIDED, DELETEDnoOnly bills in this state.
tenant_idstringyesXero connected organisation id (tenant id).
wherestringnoAdditional Xero API filter expression, e.g. 'AmountDue > 0'. Combined with contact_id and status when given.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].AmountDuenumber
Invoices[].Contactobject
Invoices[].Contact.ContactIDstring
Invoices[].Contact.Namestring
Invoices[].DueDatestring
Invoices[].InvoiceIDstring
Invoices[].InvoiceNumberstring
Invoices[].Statusstring
Invoices[].Totalnumber

Also retrieved by: "what do we owe right now", "show unpaid supplier expenses", "pull our accounts payable".

xero.update_bill

Edit an existing Xero bill's line items, due date, reference, or status while it is still a draft or submitted. Use when the user wants to correct, add to, or authorise a supplier bill that is not yet paid. For a sales invoice, use update_invoice.

Class write (writes, no confirmation needed). Scopes accounting.transactions. Calls POST /Invoices/{{params.bill_id}}.

Arguments:

ArgumentTypeRequiredNotes
bill_idstringyesXero InvoiceID of the bill to update.
due_datestringnoNew payment due date, YYYY-MM-DD.
line_itemsarray of objectnoReplacement line items, in the same shape as create_bill.
referencestringnoNew free-text reference.
statusstring, one of DRAFT, SUBMITTED, AUTHORISEDnoNew bill status, e.g. AUTHORISED to make it payable.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].AmountDuenumber
Invoices[].InvoiceIDstring
Invoices[].Statusstring
Invoices[].Totalnumber

Also retrieved by: "fix the amount on what we owe them", "add a line to an expense we haven't approved", "authorise this so it's ready to be paid".

xero.void_bill

Void an authorised Xero bill that will never be paid. Irreversible; the bill stays on record marked voided instead of being deleted, and any allocated payments are removed. Use when the user wants to cancel, kill, or invalidate a supplier bill entered by mistake. For a sales invoice, use void_invoice.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes accounting.transactions. Calls POST /Invoices/{{params.bill_id}}.

Arguments:

ArgumentTypeRequiredNotes
bill_idstringyesXero InvoiceID of the bill to void.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Invoicesarray of object
Invoices[].InvoiceIDstring
Invoices[].Statusstring

Also retrieved by: "this expense was entered by mistake", "we never actually owed this, kill it", "cancel something logged wrongly".

xero.create_payment

Record a payment against a Xero invoice or bill, in full or in part. Use when the user wants to mark an invoice paid, apply a payment received, or pay off a bill from a bank account. Does not move money itself; it records that a payment already happened.

Class write (writes, no confirmation needed). Scopes accounting.transactions. Calls PUT /Payments.

Arguments:

ArgumentTypeRequiredNotes
account_idstringyesXero AccountID the payment is made from or into.
amountnumberyesPayment amount in the invoice's currency.
datestringnoPayment date, YYYY-MM-DD. Defaults to today.
invoice_idstringyesXero InvoiceID (invoice or bill) the payment applies to.
referencestringnoFree-text reference for this payment.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Paymentsarray of object
Payments[].Amountnumber
Payments[].Datestring
Payments[].Invoiceobject
Payments[].Invoice.InvoiceIDstring
Payments[].Invoice.InvoiceNumberstring
Payments[].PaymentIDstring
Payments[].Statusstring

Also retrieved by: "mark this as paid", "apply money we received against the bill", "record that the client settled up", "pay off a supplier from the bank".

xero.get_payment

Get one Xero payment by id: its amount, date, status, and the invoice or bill it was applied to. Use when the user asks whether a specific payment went through.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /Payments/{{params.payment_id}}.

Arguments:

ArgumentTypeRequiredNotes
payment_idstringyesXero PaymentID (GUID).
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Paymentsarray of object
Payments[].Amountnumber
Payments[].Datestring
Payments[].Invoiceobject
Payments[].Invoice.InvoiceIDstring
Payments[].Invoice.InvoiceNumberstring
Payments[].PaymentIDstring
Payments[].PaymentTypestring
Payments[].Statusstring

Also retrieved by: "did this actually clear", "check on money applied to this bill", "confirm we got paid on this one".

xero.list_payments

List payments recorded in Xero, optionally filtered by a raw where clause. Use when the user asks for recent payments, what has been collected, or a payment history across invoices and bills.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /Payments.

Arguments:

ArgumentTypeRequiredNotes
orderstringnoField to sort by, e.g. "Date DESC".
pageintegernoPage number, 100 payments per page. Defaults to 1.
tenant_idstringyesXero connected organisation id (tenant id).
wherestringnoXero API filter expression, e.g. 'Invoice.Contact.ContactID==guid("...")'. Omit to return every payment.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Paymentsarray of object
Payments[].Amountnumber
Payments[].Datestring
Payments[].Invoiceobject
Payments[].Invoice.InvoiceIDstring
Payments[].Invoice.InvoiceNumberstring
Payments[].PaymentIDstring
Payments[].Statusstring

Also retrieved by: "what have we collected lately", "show money applied against our bills", "pull a history of what's come in and gone out".

xero.delete_payment

Reverse a Xero payment, marking it deleted and reopening the amount it was applied to on the original invoice or bill. Irreversible; the payment cannot be restored. Use when the user wants to undo, unapply, or take back a payment entered by mistake.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes accounting.transactions. Calls POST /Payments/{{params.payment_id}}.

Arguments:

ArgumentTypeRequiredNotes
payment_idstringyesXero PaymentID to reverse.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Paymentsarray of object
Payments[].PaymentIDstring
Payments[].Statusstring

Also retrieved by: "undo that, it was applied wrongly", "take back money we marked as received", "this shouldn't have been marked settled".

xero.create_bank_transaction

Record money spent or received directly from a Xero bank account, outside of an invoice or bill. Use when the user wants to log a bank fee, cash purchase, or direct deposit that has no linked invoice. For money against an invoice or bill, use create_payment.

Class write (writes, no confirmation needed). Scopes accounting.transactions. Calls PUT /BankTransactions.

Arguments:

ArgumentTypeRequiredNotes
account_idstringyesXero AccountID of the bank account the money moved through.
contact_idstringyesXero ContactID the transaction is with.
datestringnoTransaction date, YYYY-MM-DD. Defaults to today.
line_itemsarray of objectyesTransaction line items, e.g. [{"Description": "Bank fee", "Quantity": 1, "UnitAmount": 12, "AccountCode": "404"}].
referencestringnoFree-text reference for this transaction.
tenant_idstringyesXero connected organisation id (tenant id).
typestring, one of SPEND, RECEIVEyesSPEND for money paid out, RECEIVE for money paid in.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
BankTransactionsarray of object
BankTransactions[].BankTransactionIDstring
BankTransactions[].Datestring
BankTransactions[].Statusstring
BankTransactions[].Totalnumber
BankTransactions[].Typestring

Also retrieved by: "log a bank fee", "record cash we spent with no bill", "enter a direct deposit that hit the account".

xero.get_bank_transaction

Get one Xero bank transaction by id: whether it is a spend or receive, its status, amount, and line items. Use when the user names a specific bank transaction not tied to an invoice.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /BankTransactions/{{params.bank_transaction_id}}.

Arguments:

ArgumentTypeRequiredNotes
bank_transaction_idstringyesXero BankTransactionID (GUID).
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
BankTransactionsarray of object
BankTransactions[].BankTransactionIDstring
BankTransactions[].Contactobject
BankTransactions[].Contact.ContactIDstring
BankTransactions[].Contact.Namestring
BankTransactions[].Datestring
BankTransactions[].LineItemsarray of object
BankTransactions[].LineItems[].Descriptionstring
BankTransactions[].LineItems[].LineAmountnumber
BankTransactions[].LineItems[].UnitAmountnumber
BankTransactions[].Statusstring
BankTransactions[].Totalnumber
BankTransactions[].Typestring

Also retrieved by: "what was this charge on the bank account", "pull up details on this spend entry", "check this deposit that came through".

xero.list_bank_transactions

List Xero bank transactions, optionally filtered by bank account or a raw where clause. Use when the user asks what has moved through a bank account outside of invoices and bills, or wants a spend and receive history.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /BankTransactions.

Arguments:

ArgumentTypeRequiredNotes
account_idstringnoOnly transactions through this bank AccountID.
orderstringnoField to sort by, e.g. "Date DESC".
pageintegernoPage number, 100 transactions per page. Defaults to 1.
tenant_idstringyesXero connected organisation id (tenant id).
wherestringnoAdditional Xero API filter expression, e.g. 'Type=="SPEND"'.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
BankTransactionsarray of object
BankTransactions[].BankTransactionIDstring
BankTransactions[].Datestring
BankTransactions[].Statusstring
BankTransactions[].Totalnumber
BankTransactions[].Typestring

Also retrieved by: "what's moved through the account with no bill", "show direct spending and deposits", "pull a history of bank fees".

xero.void_bank_transaction

Void a Xero bank transaction that was entered by mistake. Irreversible; the transaction stays on record marked voided instead of being deleted. Use when the user wants to cancel or undo a spend or receive money entry that never should have been recorded.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes accounting.transactions. Calls POST /BankTransactions/{{params.bank_transaction_id}}.

Arguments:

ArgumentTypeRequiredNotes
bank_transaction_idstringyesXero BankTransactionID to void.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
BankTransactionsarray of object
BankTransactions[].BankTransactionIDstring
BankTransactions[].Statusstring

Also retrieved by: "that bank entry was a mistake", "undo something logged against the account wrongly", "this spend never should have happened".

xero.create_bank_transfer

Move money between two of the organisation's own Xero bank accounts. Use when the user wants to transfer, move, or shift funds from one bank account to another, not to pay a contact.

Class write (writes, no confirmation needed). Scopes accounting.transactions. Calls PUT /BankTransfers.

Arguments:

ArgumentTypeRequiredNotes
amountnumberyesAmount to transfer, in the organisation's base currency.
datestringnoTransfer date, YYYY-MM-DD. Defaults to today.
from_account_idstringyesXero AccountID the funds leave.
tenant_idstringyesXero connected organisation id (tenant id).
to_account_idstringyesXero AccountID the funds land in.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
BankTransfersarray of object
BankTransfers[].Amountnumber
BankTransfers[].BankTransferIDstring
BankTransfers[].Datestring
BankTransfers[].FromBankAccountobject
BankTransfers[].FromBankAccount.AccountIDstring
BankTransfers[].ToBankAccountobject
BankTransfers[].ToBankAccount.AccountIDstring

Also retrieved by: "move money between our accounts", "shift funds from checking to savings", "send cash from one account to another internally".

xero.get_bank_transfer

Get one Xero bank transfer by id: the amount, date, and the two bank accounts it moved money between. Use when the user asks about a specific transfer between accounts.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /BankTransfers/{{params.bank_transfer_id}}.

Arguments:

ArgumentTypeRequiredNotes
bank_transfer_idstringyesXero BankTransferID (GUID).
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
BankTransfersarray of object
BankTransfers[].Amountnumber
BankTransfers[].BankTransferIDstring
BankTransfers[].Datestring
BankTransfers[].FromBankAccountobject
BankTransfers[].FromBankAccount.AccountIDstring
BankTransfers[].ToBankAccountobject
BankTransfers[].ToBankAccount.AccountIDstring

Also retrieved by: "check on a move between our accounts", "what happened with that internal shift of funds", "pull up details on this specific move of money".

xero.list_bank_transfers

List transfers of money between the organisation's own Xero bank accounts. Use when the user asks what has moved between accounts, not payments to or from contacts.

Class read (reads only). Scopes accounting.transactions.read. Calls GET /BankTransfers.

Arguments:

ArgumentTypeRequiredNotes
pageintegernoPage number, 100 transfers per page. Defaults to 1.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
BankTransfersarray of object
BankTransfers[].Amountnumber
BankTransfers[].BankTransferIDstring
BankTransfers[].Datestring

Also retrieved by: "show money moved between accounts", "what's shifted internally lately", "pull our history of moves between accounts".

xero.delete_bank_transfer

Permanently delete a Xero bank transfer between two of the organisation's own accounts. Irreversible; only works if the transfer has not been reconciled in either bank account. Use when the user wants to undo, reverse, or remove a transfer entered by mistake.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes accounting.transactions. Calls DELETE /BankTransfers/{{params.bank_transfer_id}}.

Arguments:

ArgumentTypeRequiredNotes
bank_transfer_idstringyesXero BankTransferID to delete.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
BankTransfersarray of object
BankTransfers[].BankTransferIDstring

Also retrieved by: "undo that move between accounts", "that internal shift of funds was a mistake", "scrap a move of money we shouldn't have made".

xero.create_account

Add a new account to the Xero chart of accounts. Use when the user wants to set up, add, or create a new ledger account, expense category, or income category to code transactions against.

Class write (writes, no confirmation needed). Scopes accounting.settings. Calls PUT /Accounts.

Arguments:

ArgumentTypeRequiredNotes
codestringyesUnique account code, e.g. "620".
descriptionstringnoInternal note describing what this account is for.
namestringyesAccount name, e.g. "Consulting Income".
tax_typestringnoDefault tax type for this account, e.g. "OUTPUT" or "INPUT".
tenant_idstringyesXero connected organisation id (tenant id).
typestringyesXero account type, e.g. "REVENUE", "EXPENSE", "CURRENT", "FIXED", "BANK".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Accountsarray of object
Accounts[].AccountIDstring
Accounts[].Codestring
Accounts[].Namestring
Accounts[].Statusstring
Accounts[].Typestring

Also retrieved by: "set up a new expense category", "add a ledger code for this kind of spend", "I need a new income category to code things to".

xero.get_account

Get one Xero chart of accounts entry by id: its code, name, type, and status. Use when the user names a specific ledger account. For browsing or searching the whole chart, use list_accounts.

Class read (reads only). Scopes accounting.settings.read. Calls GET /Accounts/{{params.account_id}}.

Arguments:

ArgumentTypeRequiredNotes
account_idstringyesXero AccountID (GUID).
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Accountsarray of object
Accounts[].AccountIDstring
Accounts[].Codestring
Accounts[].Descriptionstring
Accounts[].Namestring
Accounts[].Statusstring
Accounts[].TaxTypestring
Accounts[].Typestring

Also retrieved by: "what's this ledger code for", "pull up details on this expense category", "check what this specific account is set up as".

xero.list_accounts

List the accounts in the Xero chart of accounts, optionally filtered by a raw where clause, e.g. only bank, revenue, or expense type accounts. Use when the user asks what accounts, expense categories, or income categories exist to code a transaction against, or which of the organisation's accounts are bank accounts.

Class read (reads only). Scopes accounting.settings.read. Calls GET /Accounts.

Arguments:

ArgumentTypeRequiredNotes
orderstringnoField to sort by, e.g. "Code" or "Name".
tenant_idstringyesXero connected organisation id (tenant id).
wherestringnoXero API filter expression, e.g. 'Type=="BANK"' or 'Status=="ACTIVE"'. Omit to return every account.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Accountsarray of object
Accounts[].AccountIDstring
Accounts[].Codestring
Accounts[].Namestring
Accounts[].Statusstring
Accounts[].Typestring

Also retrieved by: "what can I code this to", "show our chart of accounts", "what expense categories do we have", "which of our accounts are bank accounts".

xero.update_account

Edit an existing Xero chart of accounts entry's name, tax type, or description. Use when the user wants to rename, recode the tax treatment of, or relabel an account. The account code and type cannot be changed once transactions exist against it.

Class write (writes, no confirmation needed). Scopes accounting.settings. Calls POST /Accounts/{{params.account_id}}.

Arguments:

ArgumentTypeRequiredNotes
account_idstringyesXero AccountID to update.
descriptionstringnoNew internal note describing what this account is for.
namestringnoNew account name.
tax_typestringnoNew default tax type for this account.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Accountsarray of object
Accounts[].AccountIDstring
Accounts[].Namestring
Accounts[].TaxTypestring

Also retrieved by: "rename this expense category", "change the tax treatment on this ledger code", "relabel what a code is used for".

xero.archive_account

Archive an account in the Xero chart of accounts, hiding it from the list used to code new transactions while keeping its transaction history. Reversible only by editing the account's status back in Xero directly. Use when the user wants to retire, remove, or stop using an account going forward.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes accounting.settings. Calls POST /Accounts/{{params.account_id}}.

Arguments:

ArgumentTypeRequiredNotes
account_idstringyesXero AccountID to archive.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Accountsarray of object
Accounts[].AccountIDstring
Accounts[].Statusstring

Also retrieved by: "retire this expense category, we don't use it", "stop using this ledger code going forward", "hide a code from the coding list without erasing its history".

xero.get_profit_and_loss

Run the Xero Profit and Loss report for a date range: income, expenses, and net profit broken into their account sections. Use when the user asks how the business is performing, or for revenue and expense totals over a period.

Class read (reads only). Scopes accounting.reports.read. Calls GET /Reports/ProfitAndLoss.

Arguments:

ArgumentTypeRequiredNotes
from_datestringnoReport start date, YYYY-MM-DD.
tenant_idstringyesXero connected organisation id (tenant id).
to_datestringnoReport end date, YYYY-MM-DD. Defaults to today.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Reportsarray of object
Reports[].ReportDatestring
Reports[].ReportNamestring
Reports[].Rowsarray of object
Reports[].Rows[].Cellsarray of object
Reports[].Rows[].RowTypestring
Reports[].Rows[].Rowsarray of object
Reports[].Rows[].Titlestring

Also retrieved by: "how's the business doing this quarter", "show revenue and expenses for last month", "what's our net margin for the period".

xero.get_balance_sheet

Run the Xero Balance Sheet report as of a date: assets, liabilities, and equity broken into their account sections. Use when the user asks what the business owns, owes, or is worth as of a point in time.

Class read (reads only). Scopes accounting.reports.read. Calls GET /Reports/BalanceSheet.

Arguments:

ArgumentTypeRequiredNotes
datestringnoAs-of date for the report, YYYY-MM-DD. Defaults to today.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Reportsarray of object
Reports[].ReportDatestring
Reports[].ReportNamestring
Reports[].Rowsarray of object
Reports[].Rows[].Cellsarray of object
Reports[].Rows[].RowTypestring
Reports[].Rows[].Rowsarray of object
Reports[].Rows[].Titlestring

Also retrieved by: "what's the business worth right now", "show what we own and owe as of today", "give me a snapshot of assets and equity".

xero.get_aged_receivables

Run the Xero Aged Receivables report for one contact: their unpaid sales invoices grouped by how overdue each one is. Use when the user asks who owes us money, how overdue a customer's invoices are, or wants a collections view. For what we owe, use get_aged_payables.

Class read (reads only). Scopes accounting.reports.read. Calls GET /Reports/AgedReceivablesByContact.

Arguments:

ArgumentTypeRequiredNotes
contact_idstringyesXero ContactID of the customer to report on.
datestringnoAs-of date for the aging, YYYY-MM-DD. Defaults to today.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Reportsarray of object
Reports[].ReportDatestring
Reports[].ReportNamestring
Reports[].Rowsarray of object
Reports[].Rows[].Cellsarray of object
Reports[].Rows[].RowTypestring
Reports[].Rows[].Titlestring

Also retrieved by: "who's behind on paying us", "how overdue is this client's balance", "show collections for this customer".

xero.get_aged_payables

Run the Xero Aged Payables report for one contact: their unpaid bills grouped by how overdue each one is. Use when the user asks what we owe a supplier, how overdue our bills are, or wants a cash flow planning view. For money owed to us, use get_aged_receivables.

Class read (reads only). Scopes accounting.reports.read. Calls GET /Reports/AgedPayablesByContact.

Arguments:

ArgumentTypeRequiredNotes
contact_idstringyesXero ContactID of the supplier to report on.
datestringnoAs-of date for the aging, YYYY-MM-DD. Defaults to today.
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Reportsarray of object
Reports[].ReportDatestring
Reports[].ReportNamestring
Reports[].Rowsarray of object
Reports[].Rows[].Cellsarray of object
Reports[].Rows[].RowTypestring
Reports[].Rows[].Titlestring

Also retrieved by: "how overdue are our bills to this supplier", "what do we owe them and how late is it", "give me a cash flow planning view of what's due out".

xero.get_organisation

Get details of the connected Xero organisation: its legal name, base currency, financial year end, and country. Use when the user asks basic questions about the company itself, e.g. its reporting currency or fiscal year end, rather than its transactions.

Class read (reads only). Scopes accounting.settings.read. Calls GET /Organisation.

Arguments:

ArgumentTypeRequiredNotes
tenant_idstringyesXero connected organisation id (tenant id).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
Organisationsarray of object
Organisations[].BaseCurrencystring
Organisations[].CountryCodestring
Organisations[].FinancialYearEndDayinteger
Organisations[].FinancialYearEndMonthinteger
Organisations[].LegalNamestring
Organisations[].Namestring
Organisations[].OrganisationIDstring

Also retrieved by: "what's our reporting currency", "when does our fiscal year end", "basic company details on file".