CorefinityCorefinityDocs
Open the Control PanelControl Panel
Billing · 10 of 16

Create a link to an invoice PDF

Step one of downloading an invoice's PDF: answers a link that works for ten minutes, and only for the person it was given to. With a token, step two is GET on download_url (GET /corestack/billing/pdf/{token}); url is the same link for a browser that is signed in to the Control Panel.

POST/api/corestack/billing/invoices/{invoice}/pdf

Path parameters

invoiceintegerRequired

The invoice's id. Digits only. At least 1.

Query parameters

accountinteger

The billing account to read, by its id (see GET /corestack/billing/account). Left out, the request acts on your company's default billing account. An account that does not exist and one that is not your company's answer the same 404. At least 1.

account_idinteger

The same as account, under the name the MCP tools use. Send one of the two: when they name different accounts the request is refused 422 invalid on account_id. At least 1.

Returns

200 The link.

Fields of the 200 answer
download_urlstringRequired

The same link on this API, as a path. GET it with the access token that asked for it.

expires_atstringRequired

Format: date-time.

urlstringRequired

The link for a browser that is signed in to the Control Panel, as a path.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403billing_forbiddenBilling is for the organisation's owner and billing contacts. Ask one of them to do this.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409pdf_pendingThe invoice's PDF is not ready yet. Try again in a few minutes.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/corestack/billing/invoices/1/pdf \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "download_url": "/api/corestack/billing/pdf/Xk3ExampleTokenExampleTokenExampleTokenExample12",
  "expires_at": "2027-01-18T10:25:00Z",
  "url": "/nova-vendor/corecluster/billing/pdf/Xk3ExampleTokenExampleTokenExampleTokenExample12"
}
Try it

Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT