Download invoices
List your invoices, read one and download its PDF.
On this page
An invoice's PDF is downloaded in two requests: one asks for a link, the next fetches the file. This recipe downloads a paid invoice of Harbour & Finch.
Before you start
- A token with the
readscope. - You may read your company's billing: its owner, its billing contacts and its primary user can.
- Every step needs two-factor enrolment when your company requires it.
- No step waits for a maintenance window.
List the invoices
Invoices are listed newest first.
statusnarrows the list, andpdf.availablesays whether an invoice's PDF has been made.Paged by cursor: send
next_cursorback ascursor; null means the last page.curl "https://manage.corefinity.com/api/corestack/billing/invoices?status=paid&limit=25" \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"Read one invoice
This step is optional. It answers the invoice with its lines, the credits applied to it, its payments and its credit notes.
curl https://manage.corefinity.com/api/corestack/billing/invoices/8123 \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"Ask for a link to the PDF
The request has no body and answers
200withdownload_urlandexpires_at. The link works for ten minutes, and only for you.curl -X POST https://manage.corefinity.com/api/corestack/billing/invoices/8123/pdf \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"{ "url": "/nova-vendor/corecluster/billing/pdf/Xk3ExampleTokenExampleTokenExampleTokenExample12", "expires_at": "2026-11-18T10:25:00Z", "download_url": "/api/corestack/billing/pdf/Xk3ExampleTokenExampleTokenExampleTokenExample12" }Download the PDF
Fetch
download_urlon the same host with the same token. The answer is the PDF file, named for the invoice number.Each download is recorded in your company's activity.
curl https://manage.corefinity.com/api/corestack/billing/pdf/Xk3ExampleTokenExampleTokenExampleTokenExample12 \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json" \ -o CF-100042.pdf
If it is refused
| Status | reason | What to do |
|---|---|---|
403 | billing_forbidden | Billing is for the company's owner, its billing contacts and its primary user |
404 | feature_off | Billing is not on for your company |
422 | invalid | Correct the filter named in field |
409 | pdf_pending | The invoice's PDF has not been made yet. Try again in a few minutes |
410 | link_expired | The link has expired, or it was given to somebody else. Do step 3 again |
404 | pdf_missing | The file could not be found. Open a ticket and Corefinity sends it |