create_invoice
ChatGPTCreate a draft invoice from any business the signed-in user can invoice from — their own, or a team company they work in (the invoice then belongs to the team owner's account and records the user as its creator). Assigns that business's next invoice number and, for an existing client, fills any client details left empty (contact, email, phone, address) from that client's latest details in the business — so the user doesn't need to repeat them (for team members this needs the Customer details permission). VAT and delivery follow the client's latest invoice when the business has “Match the customer's last invoice” on, otherwise the business defaults; an explicit vat_mode always wins. Call find_prices first for any item without a stated price: use the price-list price, else the last price charged, and ask the user only if neither exists. Delivery is a separate charge: set it with delivery_included / delivery_amount / vat_on_delivery, never as a line item. To correct an invoice after creating it, use update_invoice instead of creating another. Also makes the invoice PDF. Returns the full invoice (business, client, line items, VAT, delivery, vat_on_delivery, totals) with app_url, pdf_url (shareable PDF link, or null if the PDF couldn't be made), client_details_reused and filled_from_invoice (the invoice number the details came from when the user can see it, else null). Fails if this month's invoice allowance on the business owner's plan is used up. Dates are ISO (YYYY-MM-DD); amounts are in £. The user sees the result as an invoice card, so don't restate it in your reply.
find_prices
ChatGPTLook up prices for items before asking the user. For each item name, returns matches from the saved price list the user may use (their own, or a team's when they have Products & prices; for the given business plus shared items, or all businesses) and up to 3 recent prices charged for matching items, newest first (description, unit price, date last used, business id).
get_invoice
ChatGPTFetch one invoice the signed-in user can see (their own, or a team invoice they have access to) with its line items, the billed-from business and an app_url to open it in Invoisata. Look it up by invoice id or by invoice number. The user sees the result as an invoice card, so don't restate it in your reply.
get_invoice_pdf
ChatGPTGenerate the PDF for an invoice the signed-in user can see (their own, or a team invoice they have access to), save it to the invoice, and return a shareable link to view and download it. Look the invoice up by id or number.
get_outstanding_balance
ChatGPTHow much is currently owed on the invoices the signed-in user can see (their own, plus team invoices they have access to): the total of unpaid invoices, computed server-side and broken down by currency (never summed across currencies). Pass client to scope it to one client (matches the client's company, contact name or email); omit it for the whole account.
list_businesses
ChatGPTList every business (billed-from company) the signed-in user can invoice from: their own, plus companies in teams they belong to. Each has its id, legal name, alias, default VAT settings and owner ("you", or the team owner's name/email); team companies also show the user's permissions there (see_all_invoices, customer_details, products_prices, edit_settings).
list_invoices
ChatGPTList the invoices the signed-in user can see, newest first: their own, plus invoices in team companies they work in (all of them with “See all invoices”, otherwise only the ones they created). Optionally filter by status, by the billed-from business id, or search free text across the invoice number, the client's company and the client's contact name.
send_invoice
ChatGPTEmail an invoice the signed-in user can see (their own, or a team invoice they have access to) to the client with the PDF attached, and mark it as sent. Set reminder to true to send a payment reminder for an invoice that was already emailed and isn't paid. Sends to the invoice's client email unless to_email is given; subject and body default to the business's email template (or the standard reminder text).
update_invoice
ChatGPTCorrect an existing invoice the signed-in user can see (their own, or a team invoice they have access to). Use it for any change to an invoice — line items, client details, dates, notes, VAT or delivery — and never create a new invoice to correct one. Only the fields given change; line_items replaces all lines. Delivery is a separate charge set with delivery_included / delivery_amount / vat_on_delivery, never a line item. Subtotal, VAT and total are recalculated and the PDF is made again; status, invoice number and business stay the same. Before editing an invoice that was already sent or paid, confirm with the user. Returns the same invoice card as create_invoice. The user sees the result as an invoice card, so don't restate it in your reply.
update_invoice_status
ChatGPTSet the status of an invoice the signed-in user can see (their own, or a team invoice they have access to): draft, due (awaiting payment / overdue), sent, or paid — for example mark it as paid.