# 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

```http
GET /be/v3/invoice/{customerGuid}/pdf?number={invoiceNumber}&token={token}
```

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.

```http
GET /be/v3/invoice/{customerGuid}?page={page}&removeCredited={removeCredited}
```

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:

```json
{
  "invoiceNumber": "59123",
  "pdf": "https://.../be/invoice?token=NzA...MTk=&number=59123&GLN=7080001234567",
  "pdfMethod": "invoice?token=NzA4MDA...MTk=&number=59123&GLN=7080001234567"
}
```

Use the invoice number and token from the PDF reference when retrieving the PDF.

## Example request

```http
GET /be/v3/invoice/9c571be0-a689-4b83-9343-4043b5328836/pdf?number=59123&token=NzA4MDA...MTk=
```

## Response

A successful request returns the invoice PDF.

```http
200 OK
Content-Type: application/pdf
```

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

```http
GET /be/v3/invoice/{customerGuid}?page={page}&removeCredited={removeCredited}
GET /be/v3/invoice/{customerGuid}/pdf?number={invoiceNumber}&token={token}
GET /be/v3/invoice/details?erpid={erpId}&token={token}
GET /be/v3/invoice/details?number={invoiceNumber}&token={token}
```
