invoices.import
Record 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.
/api/v1/accounting/invoices.importPermissions
Who can call it
Retries
MCP
accounting_invoices_importFields
partyIdstring (ID)RequiredThe ID of a customer or vendor account, from parties.list.
numberstringRequired1–60 characters
issueDatestringRequiredThe date the document was issued, as YYYY-MM-DD.
dueDatestringThe date payment is due, as YYYY-MM-DD.
currencystringThree-letter currency code, such as CAD or USD.
titlestringA short title.
at most 200 characters
linesarray of objectsRequired1–100 items
taxTreatmentenum or nullautohstgstgst_qstzero_ratedexemptnonetaxRateCodeenum or nullHST_13HST_14HST_15taxesarray of objectsat most 5 items
notesstringNotes kept with the record.
at most 4000 characters
statusenumOnly include records with this status.
sentpaidvoidDefault "sent"
sentOnstringpaidOnstringidempotencyKeystringRequiredAny unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.
8–200 characters
Example
curl https://app.getoatmilk.com/api/v1/accounting/invoices.import \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"partyId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
"number": "example",
"issueDate": "2026-09-30",
"lines": [
{
"description": "Synthetic example from the docs",
"unitAmountMinor": "1250"
}
]
}'{
"data": { … }
}Try it
Try it
Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.
curl https://app.getoatmilk.com/api/v1/accounting/invoices.import \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"partyId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
"number": "example",
"issueDate": "2026-09-30",
"lines": [
{
"description": "Synthetic example from the docs",
"unitAmountMinor": "1250"
}
]
}'More in Invoicing.