API reference

Invoices

What customers are billed: drafts written freely, issued onto receivables with their due day, voided by reversal.

Guides: Bill customers with invoices

List invoices

GET/v1/invoices

client.invoices.list()

The invoices of these books, the newest first, each with what is still owed on it.

Parameters

NameTypeDescription
statusQuerystring or null

Only draft, issued or void invoices.

party_idQuerystring or null

An id that starts with party_.

limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200InvoicePage

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/invoices" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Write a draft invoice

POST/v1/invoices· Idempotent

client.invoices.create()

Write a draft invoice for a customer. Nothing is on the books until it is issued. Its number is the next of these books' own when left out, and it falls due on the customer's payment terms (30 days without) when no due day is given.

Request body

InvoiceCreate

Response

201InvoiceOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/invoices" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"issue_date":"2026-09-30","lines":[{"account_id":"…","description":"…","unit_price":0}],"party_id":"…"}'

Get an invoice

GET/v1/invoices/{invoice_id}

client.invoices.get()

One invoice, its lines and what is still owed on it.

Parameters

NameTypeDescription
invoice_idPath · Requiredstring

An id that starts with inv_.

Response

200InvoiceOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/invoices/{invoice_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Change a draft invoice

PATCH/v1/invoices/{invoice_id}· Idempotent

client.invoices.update()

Change a draft: any field given, and every line at once when lines is. An issued invoice is refused with conflict: void it and issue another.

Parameters

NameTypeDescription
invoice_idPath · Requiredstring

An id that starts with inv_.

Request body

InvoiceUpdate

Response

200InvoiceOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X PATCH "https://api.ledgerit.ai/v1/invoices/{invoice_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete a draft invoice

DELETE/v1/invoices/{invoice_id}· Idempotent

client.invoices.delete()

Delete a draft. An issued invoice is refused with conflict: it is voided instead, and stays.

Parameters

NameTypeDescription
invoice_idPath · Requiredstring

An id that starts with inv_.

Response

204No content

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X DELETE "https://api.ledgerit.ai/v1/invoices/{invoice_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Issue an invoice onto the books

POST/v1/invoices/{invoice_id}/issue· Idempotent

client.invoices.issue()

Put a draft on the books: one entry on its issue day, the total on accounts receivable naming the customer, against each line's account. What the customer owes then ages from the invoice's due day.

Parameters

NameTypeDescription
invoice_idPath · Requiredstring

An id that starts with inv_.

Response

200InvoiceOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/invoices/{invoice_id}/issue" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Turn an invoice's reminders on or off

PUT/v1/invoices/{invoice_id}/reminders· Idempotent

client.invoices.setReminders()

Turn the customer's reminders on or off, on a draft or an issued invoice. While on, the customer is emailed three days before the due day, then one, seven and fourteen days after, each once, while anything is owed. Refused with conflict on a void invoice.

Parameters

NameTypeDescription
invoice_idPath · Requiredstring

An id that starts with inv_.

Request body

InvoiceReminders

Response

200InvoiceOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X PUT "https://api.ledgerit.ai/v1/invoices/{invoice_id}/reminders" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}'

Void an issued invoice

POST/v1/invoices/{invoice_id}/void· Idempotent

client.invoices.void()

Take an issued invoice off the books by reversing its entry. Refused with conflict while a payment is applied to it.

Parameters

NameTypeDescription
invoice_idPath · Requiredstring

An id that starts with inv_.

Request body

InvoiceVoid

Response

200InvoiceOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/invoices/{invoice_id}/void" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Objects

The objects these operations take and return.

InvoicePage

NameTypeDescription
dataRequiredarray of InvoiceOut
has_moreRequiredboolean
next_cursorRequiredstring or null

InvoiceCreate

NameTypeDescription
due_datestring (date) or null

When it falls due; the customer's payment terms from the issue day (30 days without) when left out.

issue_dateRequiredstring (date)
linesRequiredarray of InvoiceLineIn
memostring or null
numberstring or null

Unique in these books; the next INV-0001-style number when left out.

party_idRequiredstring

The customer: a counterparty of these books.

payment_linkstring or null

Where the customer can pay it, as you give it. To have LedgerIt make one in your Stripe account once it is issued, use POST /v1/invoices/{invoice_id}/payment_link.

send_remindersboolean or null

Email the customer reminders a few days before it is due and after it falls overdue; off when left out.

InvoiceOut

NameTypeDescription
amount_dueRequiredstring

What the customer still owes on it today; 0 for a draft or a void invoice.

created_atRequiredstring (date-time)
currencyRequiredstring
customer_nameRequiredstring or null

The customer's name as the invoice was issued to them.

due_dateRequiredstring (date)
entry_idRequiredstring or null

An id that starts with je_.

idRequiredstring

An id that starts with inv_.

issue_dateRequiredstring (date)
issued_atRequiredstring (date-time) or null
linesRequiredarray of InvoiceLineOut
memoRequiredstring or null
numberRequiredstring
party_idRequiredstring

An id that starts with party_.

payment_linkRequiredstring or null

Where the customer can pay it.

payment_link_madeRequiredboolean

The link was made by LedgerIt in the books' Stripe account, and a payment through it is recorded and applied to this invoice at the next Stripe sync.

remindersRequiredarray of InvoiceReminderOut

The reminders the customer was sent, the earliest first.

row_versionRequiredinteger
send_remindersRequiredboolean

Whether the customer is emailed reminders of what is owed.

sourceRequiredstring

Where it was written: ledgerit, stripe or migration.

statusRequiredstring

draft, issued or void.

subtotalRequiredstring
tax_totalRequiredstring
totalRequiredstring
void_entry_idRequiredstring or null

An id that starts with je_.

voided_atRequiredstring (date-time) or null

InvoiceUpdate

NameTypeDescription
due_datestring (date) or null
issue_datestring (date) or null
linesarray of InvoiceLineIn or null

Replaces every line when given.

memostring or null
numberstring or null
party_idstring or null

An id that starts with party_.

payment_linkstring or null
send_remindersboolean or null

InvoiceReminders

NameTypeDescription
enabledRequiredboolean

Whether the customer is emailed reminders of what is owed.

InvoiceVoid

NameTypeDescription
reasonstring or null

Why it is voided; written on the reversal.

InvoiceLineIn

NameTypeDescription
account_idRequiredstring

The income (or deferred revenue) account it is earned in.

descriptionRequiredstring

What is billed, as the customer reads it.

quantitynumber | stringDefault 1
service_endstring (date) or null

The last day of the service it bills, if any.

service_startstring (date) or null

The first day of the service it bills, if any.

tax_amountnumber | string

Sales tax on the line; must be 0 until tax is supported.

Default 0
unit_priceRequirednumber | string

Per unit; negative for a discount line.

InvoiceLineOut

NameTypeDescription
account_idRequiredstring

An id that starts with gla_.

amountRequiredstring
descriptionRequiredstring
line_noRequiredinteger
quantityRequiredstring
service_endRequiredstring (date) or null
service_startRequiredstring (date) or null
tax_amountRequiredstring
unit_priceRequiredstring

InvoiceReminderOut

NameTypeDescription
days_from_dueRequiredinteger

The stage it was sent for: days from the due day, negative before it.

sent_onRequiredstring (date)
sent_toRequiredstring

The email address it went to.