---
title: "Generate customer credit PDF"
method: POST
path: "/v1/customer-credits/{customerCreditId}/document"
tags: ["v1 - Customer Credits"]
---

# Generate customer credit PDF

`POST /v1/customer-credits/{customerCreditId}/document`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/v1/customer-credits/{customerCreditId}/document`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Generates the PDF document for a customer credit. 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.

## Path parameters

- `customerCreditId` string, uuid, required

## Response `default`

default response

- ExternalCustomerCreditPdfDocumentV1Model
  - `id` string, uuid: Unique identifier for the PDF document
  - `customerCreditId` string, uuid: ID of the customer credit
  - `status` 'GENERATING' | 'READY' | 'FAILED': Current status of the PDF document generation - `GENERATING` - The PDF is currently being generated - `READY` - The PDF has been generated and is ready for download - `FAILED` - The PDF generation failed ⚠️ This enum is not exhaustive; new values may be added in the future.
  - `url` string, url, nullable: Signed URL to download the PDF document. Only available when status is READY. The URL is temporary and should not be stored and reused. To download again, call the endpoint to get a fresh URL.
  - `createdAt` string, date-time: Timestamp when the document was created
  - `updatedAt` string, date-time: Timestamp when the document was last updated

---

[API](https://skmtc.dev/light/apis/light-api.md) - [All operations](https://skmtc.dev/light/apis/light-api/llms.txt) - [OpenAPI document](https://skmtc.dev/light/apis/light-api/revisions/84f51306f648?raw)
