API referenceInvoices

Edit a draft invoice

PATCH
/api/b/v1/invoices/{invoice_id}

Authorization

OAuth2PasswordBearer
AuthorizationBearer <token>

In: header

Path Parameters

invoice_id*Invoice Id
Formatuuid
admin_access_token?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Changes to an invoice that has not been issued. IN-302.

Every field optional, and only what you send is changed. number and currency are absent on purpose: both are quoted externally the moment an invoice is issued, so changing either makes two different documents share an identity. Issue a credit note instead.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/api/b/v1/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "number": "string",  "customer_name": "string",  "customer_email": "string",  "currency": "string",  "subtotal_minor": 0,  "tax_minor": 0,  "total_minor": 0,  "paid_minor": 0,  "outstanding_minor": 0,  "state": "draft",  "due_date": "2019-08-24",  "notes": "string",  "sent_at": "2019-08-24T14:15:22Z",  "paid_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "payment_link_slug": "string",  "lines": [],  "reminders": []}