CorefinityCorefinityDocs
Open the Control PanelControl Panel
Billing · 9 of 16

Download a credit note PDF

Answers the PDF of one of the invoice's credit notes, which exists once the note's pdf_href on the invoice is not null. Each download is recorded in the company's activity.

GET/api/corestack/billing/invoices/{invoice}/credit-notes/{number}/pdf

Path parameters

invoiceintegerRequired

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

numberstringRequired

The credit note's number, from the invoice's credit_notes. Letters, digits and hyphens.

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 credit note, as a PDF file named for its number.

Fields of the 200 answer

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.
404credit_note_not_readyThe credit note is not ready yet. Try again shortly.
404feature_offThis feature is not on for your organisation yet.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.
503provider_unavailableThe payment provider, or the old host, did not answer. Try again later.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/billing/invoices/1/credit-notes/string/pdf \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
"string"
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