Skip to content

Get an employer invoice's PDF download link

employers.retrieve_invoice_pdf(strinvoice_id, EmployerRetrieveInvoicePdfParams**kwargs) -> EmployerRetrieveInvoicePdfResponse
GET/v1/employers/{employer_id}/invoices/{invoice_id}/pdf

Returns the time-limited PDF download link for a single invoice belonging to the employer’s billing customer. invoice_id is the external Chargebee id (not a prefixed UUID). The caller must be authorized for the employer; an unknown or unauthorized employer or invoice returns 404.

ParametersExpand Collapse
employer_id: str

Unique employer identifier (empr_*)

invoice_id: str

External Chargebee invoice id (not a prefixed UUID).

ReturnsExpand Collapse
class EmployerRetrieveInvoicePdfResponse:

Response containing a single employer invoice pdf resource.

data: Data
download_url: str

Time-limited Chargebee PDF download link for the invoice.

Get an employer invoice's PDF download link

import os
from vitable_connect import VitableConnect

client = VitableConnect(
    api_key=os.environ.get("VITABLE_CONNECT_API_KEY"),  # This is the default and can be omitted
)
response = client.employers.retrieve_invoice_pdf(
    invoice_id="INV-00042",
    employer_id="empr_abc123def456",
)
print(response.data)
{
  "data": {
    "download_url": "https://chargebee.example/invoices/INV-00042.pdf"
  }
}
Returns Examples
{
  "data": {
    "download_url": "https://chargebee.example/invoices/INV-00042.pdf"
  }
}