Update invoice
mercoa_update_invoiceWRITE — updates an existing invoice/bill (all fields optional). Commonly used to advance status (e.g. DRAFT→NEW→SCHEDULED) or change amounts, dates, or payment methods. POST /invoice/{invoiceId}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Total invoice amount. | |
| status | No | New invoice status, e.g. NEW, APPROVED, SCHEDULED. | |
| dueDate | No | Due date (ISO 8601). | |
| payerId | No | Payer entity ID. | |
| currency | No | Currency code, e.g. USD. | |
| metadata | No | Arbitrary key/value metadata. | |
| vendorId | No | Vendor entity ID. | |
| invoiceId | Yes | Invoice ID to update. | |
| lineItems | No | Replacement line items array. | |
| noteToSelf | No | Internal note. | |
| invoiceDate | No | Invoice date (ISO 8601). | |
| deductionDate | No | Scheduled payment/deduction date (ISO 8601). | |
| invoiceNumber | No | Human-readable invoice number. | |
| paymentSourceId | No | Payment method ID to pay from. | |
| paymentDestinationId | No | Payment method ID to pay to. |