跳转到主要内容
POST
Raises a manual invoice against a client, with line items.

授权

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.

请求体

The invoice to create.

Raises a manual invoice against a client, with line items.

ClientId
integer<int64>

Client to bill. Validated against the service provider - an unknown client is a 404.

示例:

88

StatusId
integer<int32> | null

Status to create the invoice in: 1 = Draft (default) or 5 = Approved. Any other value is rejected. Approving on create pushes the invoice to the connected accounting system, the same as approving it in the app. An Approved invoice whose computed total is exactly 0 is recorded as Paid instead.

示例:

1

InvoiceDate
string<date-time> | null

Date the invoice is raised, a calendar date. Defaults to today (service provider's local date) when omitted.

示例:

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

DueDate
string<date-time> | null

Date payment is due, a calendar date. Defaults to InvoiceDate when omitted. Must not be earlier than InvoiceDate.

示例:

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

Reference
string | null

Free-text reference for the invoice, or omit for none.

示例:

"PO-4471"

RecipientEmails
string[] | null

Email addresses to send the invoice to. Optional.

LineItems
object[]

Line items for this invoice. At least one is required. Lines carry no task/ticket/time-entry linkage - that belongs to contract-generated invoices, out of scope for a manual one. A line whose ItemId is a bundle is billed as one line and stored as the bundle's parts, the same way the app stores it; the caller never sends the parts.

响应

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

Result of a create-invoice request. Matches Create Ticket/Create Time Entry's minimal shape: just the new record's Id. Fetch the invoice back through GET /v1/invoices/{invoiceId} for the full record.

DataContext
object | null
示例:

null

Notifications
object[]