# Generate invoice PDF

> Generates the PDF document for an invoice receivable. Poll this endpoint until status is READY , then use the url field to download the PDF. The signed URL is temporary and should not be stored and reused. To download again, call this endpoint to get a fresh URL.

`POST https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/document`

## Note

Idempotent on content: the first call answers GENERATING with url: null , and you poll this same POST until READY . A new PDF is generated only when none exists, the last attempt FAILED , or the invoice changed since; otherwise the existing one is returned with a fresh link. The url is a pre-signed link valid for five minutes . Works on drafts too, but needs invoiceTemplateId ( INVOICE_RECEIVABLE_MISSING_TEMPLATE ). If an original PDF was uploaded for the invoice, that file is returned instead of a generated one.

## Authorization

- API key
- Bearer token

See https://light.inc/docs/getting-started/authentication.

## Path parameters

- `invoiceReceivableId` (string, uuid, required)


## Response

- `url` — A pre-signed link valid for five minutes; call the endpoint again for a fresh one.

```json
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceReceivableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "GENERATING",
  "url": "https://example.com",
  "createdAt": "2026-01-15T09:30:00Z",
  "updatedAt": "2026-01-15T09:30:00Z"
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders.

## Code

```bash
curl -X POST "https://api.light.inc/v1/invoice-receivables/3c90c3cc-0d44-4b50-8888-8dd25736052a/document" \
  -H "Authorization: Basic YOUR_API_KEY"
```

---

Full page: https://light.inc/docs/api-reference/v1--invoice-receivables/generate-invoice-pdf · Index: https://light.inc/docs/llms.txt
