Get invoice as PDF
Use this workflow to retrieve an invoice PDF for a Customer.
This is typically used when an external system needs to display or download the invoice document, for example in a customer portal, CRM, or customer support system.
Endpoint
Code
Where {customerGuid} is the UtilityCloud GUID of the Customer.
When to use
Use this workflow when an external system needs to retrieve the PDF document for an invoice.
Typical use cases include:
- displaying an invoice PDF in a customer portal
- making invoice PDFs available to customer support
- allowing a customer to download a copy of an invoice
- retrieving the invoice document after listing invoices for a customer
Before you begin
First retrieve the customer's invoices.
Code
Use the pdfMethod property from the invoice response to construct the request for the PDF.
Request parameters
| Parameter | Description |
|---|---|
customerGuid | UtilityCloud GUID of the Customer. |
invoiceNumber | Invoice number from the invoice response. |
token | Token from the invoice PDF reference or pdfMethod. |
Example invoice reference
An invoice returned from the invoice list may include PDF-related properties similar to this:
Code
Use the invoice number and token from the PDF reference when retrieving the PDF.
Example request
Code
Response
A successful request returns the invoice PDF.
Code
The response body contains the PDF document.
Notes
The invoice PDF should normally be retrieved after first listing invoices for the customer.
Use the pdfMethod property from the invoice response to construct the PDF request.
The token is invoice-specific and must match the invoice being requested.
If the invoice does not have a PDF reference, the PDF may not be available for that invoice.
Related endpoints
Code

