List invoice lines with their accounting
curl --request GET \ --url 'https://example.com/api/v1/invoices/accounting-lines?page=1&perPage=20&status=DRAFT&accounting=incomplete' \ --header 'Authorization: Bearer <token>'Lists one row per invoice line with its revenue account, service period and class, ordered by issue date, invoice number and line position. By default (issuedOnly=true) it leaves out DRAFT and CANCELLED invoices, which an accountant does not book; with issuedOnly=false it covers the same invoices as the invoice list for the same filters (search, company, status, issue-date range and accounting=incomplete) and the caller’s invoice scope. A line of an invoice recorded as External does not exist, so none appears. The invoice-level discount (negative) and tax are not repeated on lines: each invoice’s adjustments are listed once, on the page that holds its first line, so summing amount by revenue account reconciles with the invoice lines and lines plus adjustments with the invoice total. A line is complete with a revenue account alone when the workspace does not require a class (accountingRequiresClass). The columns of the CSV and XLSX export are configured per workspace in the invoice settings (accountingExportColumns). Answered with 400 when the workspace has no active revenue account. Requires the invoices.manage permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Free-text search, ignoring case, over the invoice number or external number, subject and bill-to name, the company’s name, legal name or order prefix, and the first and last name of the company’s users (every word must appear in one of them, in any order). A person’s name returns every invoice of each company they are a user of, plus any invoice addressed to them.
Free-text search, ignoring case, over the invoice number or external number, subject and bill-to name, the company’s name, legal name or order prefix, and the first and last name of the company’s users (every word must appear in one of them, in any order). A person’s name returns every invoice of each company they are a user of, plus any invoice addressed to them.
Filter by invoice status. UNPAID and ISSUED are filters, not statuses. UNPAID keeps SENT, VIEWED and OVERDUE, including invoices paid in part, and leaves out DRAFT, PAID and CANCELLED: the invoices the Outstanding figure counts, overdue ones included. ISSUED keeps SENT, VIEWED, PAID and OVERDUE, the invoices the Invoiced figure counts.
Filter by invoice status. UNPAID and ISSUED are filters, not statuses. UNPAID keeps SENT, VIEWED and OVERDUE, including invoices paid in part, and leaves out DRAFT, PAID and CANCELLED: the invoices the Outstanding figure counts, overdue ones included. ISSUED keeps SENT, VIEWED, PAID and OVERDUE, the invoices the Invoiced figure counts.
incomplete returns invoices with a priced line (non-zero amount) that has no revenue account or no class. Staff only. The request is rejected when the workspace has no active revenue account.
incomplete returns invoices with a priced line (non-zero amount) that has no revenue account or no class. Staff only. The request is rejected when the workspace has no active revenue account.
Inclusive start of an issue-date range (YYYY-MM-DD), resolved against the workspace’s own calendar day.
Inclusive start of an issue-date range (YYYY-MM-DD), resolved against the workspace’s own calendar day.
Inclusive end of an issue-date range (YYYY-MM-DD), resolved against the workspace’s own calendar day.
Inclusive end of an issue-date range (YYYY-MM-DD), resolved against the workspace’s own calendar day.
Defaults to true: keeps invoices that were issued (SENT, VIEWED, PAID, OVERDUE) and leaves out DRAFT and CANCELLED. Pass false to cover the same invoices as the invoice list for the same filters.
Defaults to true: keeps invoices that were issued (SENT, VIEWED, PAID, OVERDUE) and leaves out DRAFT and CANCELLED. Pass false to cover the same invoices as the invoice list for the same filters.
Responses
Section titled “Responses”Paginated list of invoice lines with their accounting, and the invoice-level adjustments of the invoices that open on the page.
object
An invoice-level discount or tax that belongs to no line and no revenue account. Staff only.
object
Signed as it adds to the invoice total: a discount is negative, tax is positive. Lines sum to the subtotal, so line amounts plus adjustments equal the invoice total.
discount is the invoice-level discount, tax the invoice’s tax.
A line of an invoice with its revenue account, service period and class. Summing amount by revenue account reconciles with the invoice lines. Staff only.
object
False when the line has a non-zero amount and no revenue account, or no class in a workspace that requires one. A zero-amount line is always complete.
The line’s amount, net of any line discount.
The class accounting reads: the team’s accounting class name, else the team name; null while unset.
The service the line was built from; null for a Custom line.
Invoice status: DRAFT, SENT, VIEWED, OVERDUE, PAID or CANCELLED.
The team whose accounting class the line carries; null while unset.
Pagination metadata for list responses.
object
Example
{ "adjustments": [ { "kind": "discount" } ]}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC