跳转到主要内容
PATCH
Updates an invoice: its header fields, its status (approve only) and its lines.

授权

X-API-Key
string
header
必填

Your Gorelo API key. See Generate API key. If your data is hosted in Australia, click the base URL at the top of this page and select https://api.aue.gorelo.io.

路径参数

invoiceId
string<uuid>
必填

Invoice identifier.

请求体

Fields to change.

Partial update of an invoice. Every field is optional: a field left out keeps its value. A clearable field clears with null.

StatusId
integer<int32> | null

5 (Approved) is the only value accepted, from Draft or Submitted. Approving pushes the invoice to the connected accounting system, as approving it in the app does. An invoice whose total is 0 is recorded as Paid instead. Sending 5 for an invoice that is already Approved changes nothing. Not clearable.

示例:

5

InvoiceDate
string<date-time> | null

Date of issue, a calendar date. Not clearable.

示例:

"2026-09-15T00:00:00.0000000+00:00"

DueDate
string<date-time> | null

Date payment is due, a calendar date. May not be earlier than InvoiceDate. Not clearable.

示例:

"2026-10-15T00:00:00.0000000+00:00"

Reference
string | null

Free-text reference. Send null to clear it.

示例:

"PO-4471-REV"

InvoiceTemplateId
integer<int64> | null

PDF template for this invoice. Send null to clear it; the service provider's default then applies.

示例:

12

InvoiceEmailTemplateId
integer<int64> | null

Email template for this invoice. Send null to clear it; the service provider's default then applies.

示例:

4

BrandingThemeId
string<uuid> | null

Branding theme the synced copy carries in the connected accounting system. Send null to clear it.

LineItems
object[] | null

Replaces the invoice's lines, matched by line Id. An entry with an Id on this invoice is updated in place; an entry with no Id is added; an existing line left out is removed, and work it was billing (a time entry, a ticket charge, a prorated contract charge) goes back to waiting to be invoiced. A bundle line's Id acts on the whole bundle. An empty array is rejected. Omit the field to leave the lines alone.

响应

OK

StatusCode
enum<integer>
可用选项:
100,
101,
102,
103,
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
421,
422,
423,
424,
426,
428,
429,
431,
451,
500,
501,
502,
503,
504,
505,
506,
507,
508,
510,
511
IsSuccess
boolean
Data
object

An invoice with its line items, returned by GET /v1/invoices/{invoiceId}.

DataContext
object | null
示例:

null

Notifications
object[]