post https://api.mercury.com/api/v1/new-endpoint
Updates an invoice.
This endpoint requires you to send all data in full, including optional fields. For example, if an invoice has an
internalNote
, then sending a request without theinternalNote
parameter or withnull
in that field will result in the internal note being deleted. To avoid unintended changes, you can use the GET endpoint to retrieve the latest data for an invoice before updating it.
{
"id": string,
"dueDate": date,
"invoiceDate": date,
"invoiceNumber": string,
"poNumber": string | null,
"payerMemo": string | null,
"internalNote": string | null,
"customerId": string,
"ccEmails": [string | null],
"slug": string,
"status": "Unpaid" | "Paid" | "Cancelled",
"amount": decimal,
"destinationAccountId": string,
"creditCardEnabled": boolean,
"achDebitEnabled": boolean,
"useRealAccountNumber": boolean,
"lineItems": [
{
"name": string,
"unitPrice": decimal,
"quantity": number,
"salesTaxRate": number | null,
}
],
"createdAt": date-time,
"updatedAt": date-time,
"canceledAt": date-time | null,
}