Skip to content

API reference

List invoices

Invoices API

GET/v1/invoices

Returns 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 of in, out.
  • channelstring

    Return only invoices that came in through this channel. Every channel is returned when omitted.

    One of upload, 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 issuedFrom returns 400.

  • limitinteger
  • cursorstring

    The nextCursor from 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 of clean, 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

    csv returns 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. xlsx returns the same columns as one Excel sheet, every cell text. More than 10,000 matches returns 400 too_many_rows; cursor and limit do not apply.

    One of csv, xlsx.
  • statusstring

    Return only invoices with this payment status today. paid: the history holds api: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 of open, 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).
GET/v1/invoices
Example
curl 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)
200
text/csv
The body is the file itself (text/csv).
Success response
GET
/v1/invoices
List invoices
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Headers2
›Query Parameters12
›Code Snippet
curl -X GET "https://api.certinvo.com/v1/invoices" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close