الانتقال إلى المحتوى الرئيسي
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[]