Download the PDF
GET
/invoices/{id}/pdf
const url = 'https://api.brrndops.com/v1/invoices/inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11/pdf';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.brrndops.com/v1/invoices/inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11/pdf \ --header 'Authorization: Bearer <token>'Renders the invoice with its template and branding. Sandbox PDFs are watermarked “TEST”. Requires the pdf:generate scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string
Example
inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11Responses
Section titled “ Responses ”The PDF file.
Media typeapplication/pdf
string format: binary
The request was invalid: a missing or malformed field (param says which), an unknown field, or a rule such as a disallowed status change.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}Missing, invalid, expired or revoked API key.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}The key lacks the required scope (insufficient_scope), or the business isn’t verified yet (account_not_verified, production keys only).
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}No such resource in this account and environment.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}