Invoicing
Invoices, customers and vendors, and how they pay.
50 actions
Give an AI assistant only these actions with the invoicing MCP toolset.
https://app.getoatmilk.com/api/mcp?toolset=invoicinginvoices
- POST
invoices.approveApprove a prepared invoice so it can be sent on its scheduled date. Invoices prepared by schedules and payment plans are never sent without approval. - POST
invoices.archiveArchive or restore up to 100 invoices at once with ids and archived (true to archive, false to restore). Archived invoices leave the invoice lists and counts but stay in the customer's history, reports and payments. Drafts and prepared invoices without a send date, paid, written-off and cancelled invoices can be archived; an invoice that is still owed or set to go out on a date is skipped with a reason (record the payment or write off the balance, or clear the send date, first). An archived invoice can't be approved, sent, paid, edited or cancelled until it is restored. Returns the invoices changed and, for each one left alone, why. - POST
invoices.correctTaxCorrect how an issued invoice imported from outside Oatmilk splits its unchanged total into subtotal and sales tax, without voiding it: pass id, expectedRevision, taxes (up to 5 lines of label, rate in percent, and amountMinor; an empty list means no sales tax), a reason of 10 to 500 characters, and an idempotency key. The tax becomes the sum of the lines and the subtotal the total minus that tax, which moves onto the invoice's single line. The total, payments, status, number, dates, and PDF don't change, and the reason and the split before and after are kept in the audit history. Refused for invoices Oatmilk issued (void and duplicate those instead), void or uncollectible invoices, invoices with more than one line or a quantity other than 1, and taxes above the total. Administrator only. - POST
invoices.createCreate a draft invoice for a customer. By default it starts from the customer's last invoice (lines, currency, notes, payment methods, terms); pass startFrom blank to start empty. Totals and sales tax are calculated on the server. Pass projectId to tie it to a project. - POST
invoices.duplicateCreate a new draft from an existing invoice, or from a customer's last invoice when partyId is given. The new draft keeps the source invoice's project. - POST
invoices.filesCommitImport reviewed invoice files with their original numbers, dates, lines, taxes, and status. Paid imports record a matching payment and PDFs become the invoice's permanent file. Nothing is emailed. - GET
invoices.filesExtractRead an uploaded invoice file and return extracted invoice candidates with suggested customers. For CSV files, first call without csvMapping to get headers, then call again with the confirmed column mapping. - POST
invoices.filesPreparePrepare an invoice file upload (PDF, Word, image, CSV, or email up to 20 MB). Supply filename, mimeType, sizeBytes, sha256, and idempotencyKey. Upload unchanged bytes to the returned uploadUrl unless alreadyUploaded is true. - GET
invoices.getRead one invoice with its lines, taxes, totals, payments, balance due, printed customer and sender details, schedule, and approval and delivery history. - POST
invoices.importRecord an invoice issued outside the platform with its original number, dates, lines, taxes, and status (sent, paid, or void) so it appears in customer history. Paid imports record a matching payment. - POST
invoices.issueIssue a draft: assign the next invoice number, freeze the customer, sender, and payment details, and store the final PDF with its SHA-256 hash. Issuing does not email anyone. - GET
invoices.lastForPartyGet the most recent invoice for a customer and a starting template (lines, currency, notes, payment methods, terms, tax) for creating a similar invoice. - GET
invoices.listList invoices with number, customer, project, dates, totals, balance due, and status. Filter by status (including open, unpaid, upcoming and needs_action: awaiting approval, ready to send by hand, or late), overdue, customer, project (or none), currency, source (manual, duplicate, recurring, plan, import), schedule, issue or due date range, or search text. Archived invoices are left out unless archived is only or include. Sort by issued, due, amount, number, updated or created. Overdue is derived from the due date and remaining balance. - POST
invoices.markUncollectibleMark an issued, unpaid invoice as uncollectible with a reason, or reopen it with uncollectible false. - GET
invoices.pdfGet a short-lived link to an issued invoice PDF and its SHA-256 hash. - GET
invoices.previewRender a PDF preview of a saved invoice or an unsaved draft without changing anything. Returns base64 PDF bytes, the number it would receive, and computed totals. - GET
invoices.projectSuggestionsSuggest which project (a project tag) an invoice belongs to. With id, the top suggestions for that invoice with their reasons; without, recent invoices that have no project and the best suggestion for each. Reasons are the customer's other invoices, invoices of the same recurring schedule or payment plan, the invoice it was duplicated from, the project tag on the bank deposit that paid it, the project's name, aliases or keywords in the title, lines or memo, and the issue date falling inside the project's dates. Suggestions are never applied by themselves; use invoices.setProject. - GET
invoices.projectTotalsInvoiced revenue per project and currency: how much was invoiced, collected and is still owed, and how many invoices, for issued invoices that aren't cancelled. Filter by projectIds and an issue-date range. Pair with tags.report for the project's spend and income from transactions. - POST
invoices.recordPaymentRecord a full or partial payment on an issued invoice with amountMinor in the invoice currency, paid date, method, reference, and an optional bank transaction. Optionally write off a small remaining balance such as wire fees. Updates the balance and paid status. - POST
invoices.remindEmail the customer a payment reminder for an issued, unpaid invoice with the PDF attached. - POST
invoices.removePaymentRemove a recorded payment with a reason. The payment stays in history as reversed and the invoice balance and status are recalculated. - POST
invoices.scheduleSet or clear the date an invoice is sent. Scheduling approves it and it is sent automatically on that date unless autoSend is false; pass review true to have administrators asked to review it a few days before instead. - POST
invoices.sendSend an invoice to the customer's billing contacts from the invoices sender identity with the PDF attached, issuing it first if needed. The email is queued and the invoice marked sent together, and an invoice's first email goes out only once; sending an already-sent invoice again is a deliberate resend. Use method manual to record that you delivered it yourself. - POST
invoices.setProjectTie up to 100 invoices to a project (a project tag's id from tags.list) or clear it with projectId null. Works on issued invoices too, because the project is internal and never printed. Archived projects can't be chosen. Returns the invoices changed and any left alone. - GET
invoices.summaryWhat the invoice list adds up to right now: what customers owe per currency and how much of it is overdue, what was paid in the last 30 days, and how many invoices need action, are overdue, are drafts, wait for approval, or are archived. Archived invoices are counted only as archived. - GET
invoices.taxPlaceWork out where a customer is for sales tax. With query, the places a typed city, town, province, postal code or country can mean (Toronto, Gimli MB, M5V 2T6, London UK), each with its jurisdiction such as CA-ON; a name Oatmilk doesn't know is read by AI that has no tools and never picks the tax. With partyId, a web search for the customer's head office by its name and website, returning the place only when a quote on the page it came from says it, with that page and quote. Only the name, the website or billing email's domain, and the city leave Oatmilk. Nothing is saved; set the customer's address or the invoice's tax to use the place. - POST
invoices.updateEdit a draft, scheduled, or awaiting-approval invoice with its expectedRevision. Editing an approved invoice returns it for approval. Issued invoices can't be edited; void and duplicate them instead. Their memo and project (projectId) can still change. - POST
invoices.voidVoid an invoice with a reason. Invoices with recorded payments must have those payments removed first. Voided invoices stay on record.
invoices.automation
invoices.numbering
invoices.plans
invoices.schedules
- POST
invoices.schedules.cancelCancel a recurring invoice or payment plan. Its unissued upcoming invoices are voided; issued invoices that weren't sent keep their number but are no longer sent automatically. - POST
invoices.schedules.createCreate a recurring invoice for a customer from a template with a weekly, monthly, or yearly cadence, start date, optional end date or number of occurrences, review lead days, and auto-send after approval. - POST
invoices.schedules.generatePrepare the next invoice of a recurring schedule now, ahead of its review window. It still needs approval before it is sent. - GET
invoices.schedules.listList recurring invoices and payment plans with their cadence, next date, review lead time, auto-send setting, status, and generated invoices. - POST
invoices.schedules.pausePause a recurring invoice or payment plan. Nothing new is prepared or sent from it while paused. - POST
invoices.schedules.resumeResume a paused recurring invoice or payment plan. Missed dates are skipped, not back-filled. The customer must not be archived. - POST
invoices.schedules.updateUpdate a recurring invoice's name, template, cadence, next date, end, review lead days, or auto-send setting with its expectedRevision. Already prepared invoices are not changed.
parties
- POST
parties.archiveArchive or restore a customer or vendor with its expectedRevision. Archived accounts keep their history but can't receive new invoices. Archiving is refused while a recurring invoice, payment plan, or scheduled invoice would still go out to them automatically; pause or cancel those schedules and clear or void those invoices first. - POST
parties.createCreate a customer or vendor account with displayName, optional legal name, contacts, address, jurisdiction (for example CA-ON), tax treatment, currency, payment terms, preferred payment methods, invoice prefix, metadata, and an idempotency key. - POST
parties.enrichLook a customer or vendor up on the web and save what their own website says: a one-line description, their industry and website, each backed by a quote from a page. Only the name, the website or billing email's domain, and the city leave Oatmilk; never amounts, invoices or contacts. Runs in the background and returns a run id; the result appears on the customer as profile. Nothing a person entered is overwritten. Skips a lookup made in the last 7 days unless force is true. - GET
parties.getRead one customer or vendor with contacts, address, jurisdiction, tax treatment, default currency and payment terms, preferred payment methods, metadata, external links, invoice history, and schedules. - GET
parties.listList customers and vendors (accounts) with their jurisdiction, tax treatment, open balance by currency, overdue count, and last invoice. Filter by search text or kind. - GET
parties.previewA short snapshot of one customer or vendor for a hover card or a quick answer: name, kind, location, billing contact, what Oatmilk found about them online (description, industry, website and the pages it came from), what they owe by currency and how much of it is overdue, their last invoice, how many invoices they have had, what they were billed and paid over the last 12 months, and how many days they usually take to pay. - GET
parties.searchQuickly find customers and vendors by name, legal name, or email for pickers. Returns names, contact email, currency, and the last invoice date. - POST
parties.updateUpdate a customer or vendor account with its expectedRevision and idempotency key. Existing invoices keep the details that were printed on them.
paymentMethods
- POST
paymentMethods.archiveDeactivate an organization payment method with its expectedRevision so it is no longer offered on new invoices. Issued invoices keep their printed details. Administrator only. - GET
paymentMethods.listList the organization's receiving payment methods (bank transfer in CAD or USD, international wire, Interac e-Transfer, pay-online links, other instructions) that can be printed on invoices. - POST
paymentMethods.saveCreate or update an organization payment method with kind, label, currency, validated banking details, active flag, and whether it is a default for its currency. Updates need expectedRevision. Administrator only. - GET
paymentMethods.wiseOptionsList issued, active Wise Business receiving details for an administrator to review before adding them to invoice payment methods. Never returns unissued or deprecated details.