/v1/invoicesReturns the invoices filed under the credential’s company, newest first, one page at a time.
Versions
For an edited invoice, only the newest version is listed. Every version stays readable at /v1/invoices/{id}, which names the version it replaces and the version that replaced it.
Pagination
Pass the nextCursor of the previous page as cursor. The cursor is opaque. Do not parse it.
The journal
Filter by the newest check’s verdict, search with q, and ask the history what happened with withEvent and withoutEvent: every invoice not yet sent is withoutEvent=api:sent. There is no status field: the history is a list of what happened, and a filter asks it. format=csv returns every match, up to 10,000, as CSV. Each invoice says how it came in as channel (upload, made, api, email or sftp), and channel narrows the list to one.
Query parameters
- directionstring
Return only received invoices (
in) or only invoices you issued (out). Both are returned when omitted.One ofin,out. - channelstring
Return only invoices that came in through this channel. Every channel is returned when omitted.
One ofupload,made,api,email,sftp. - issuedFromstring (date)
The earliest Invoice issue date (BT-2) to include. This is the date on the invoice, not the day it was filed. An invoice with no readable date matches no range. A date that does not exist returns 400.
- issuedTostring (date)
The latest Invoice issue date (BT-2) to include. That day is included. A date before
issuedFromreturns 400. - limitinteger
- cursorstring
The
nextCursorfrom the previous page. A cursor this service did not issue returns 400, never an empty page. - verdictstring
Return only invoices whose newest check gave this verdict.
One ofclean,acceptable-with-findings,rejected. - qstring
Text in the invoice number or in the seller's or the buyer's name, in any case.
- withEventstring
Return only invoices whose history holds this code, one of the codes an invoice's history uses (for example
api:sent). An unknown code returns 400. - withoutEventstring
Return only invoices whose history does not hold this code. Every invoice not yet sent is
withoutEvent=api:sent. - formatstring
csvreturns every match as CSV instead of a page: the columns id, direction, createdAt, invoiceNumber, issueDate, dueDate, currency, seller, buyer, payableAmount, taxAmount, verdict and paymentStatus. A cell that starts with =, +, -, @, a tab or a carriage return is written with a leading apostrophe, so no invoice data runs as a formula.xlsxreturns the same columns as one Excel sheet, every cell text. More than 10,000 matches returns 400too_many_rows;cursorandlimitdo not apply.One ofcsv,xlsx. - statusstring
Return only invoices with this payment status today.
paid: the history holdsapi:paid.overdue: not paid, and the later of the due date and the newest reminder's due date is before today.open: every other invoice.One ofopen,overdue,paid.
Status codes
| Status | Meaning |
|---|---|
200 |
One page of invoices, newest first, or every match as CSV with format=csv or as Excel with format=xlsx. |
400 |
The cursor was not issued by this service (invalid_cursor), a query parameter is out of range (invalid_query), or a CSV would hold more than 10,000 invoices (too_many_rows). |
401 |
No usable credential was sent (invalid_credentials). |
/v1/invoicescurl https://api.certinvo.com/v1/invoices \
-H "Authorization: Bearer $CERTINVO_API_KEY"const response = await fetch(`https://api.certinvo.com/v1/invoices`, {
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
},
})
console.log(response.status, await response.json())import os
import requests
response = requests.get(
"https://api.certinvo.com/v1/invoices",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)