create_invoice
Create a Xero invoice (sales or bill) by specifying line items and optional contact, dates, and status. Defaults to draft sales invoice.
Instructions
[WRITE] Create an invoice (sales ACCREC by default). Defaults to DRAFT status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | No | Org to target: a tenantId, a tenant-name substring, or an alias from XERO_ORG_ALIASES. Defaults to the first connected org. | |
| type | No | ACCREC=sales, ACCPAY=bill. | |
| contactId | No | Existing contactID (preferred). | |
| contactName | No | Contact name (used if no contactId). | |
| lineItems | Yes | ||
| date | No | YYYY-MM-DD. | |
| dueDate | No | YYYY-MM-DD. | |
| reference | No | ||
| status | No | Defaults to DRAFT. | |
| lineAmountTypes | No | ||
| raw | No | Advanced: extra Invoice fields. |