Skip to main content
POST
/
v1
/
invoice-receivables
/
{invoiceReceivableId}
/
document
Generate invoice PDF
curl --request POST \
  --url https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/document \
  --header 'Authorization: <api-key>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceReceivableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "GENERATING",
  "url": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

Path Parameters

invoiceReceivableId
string<uuid>
required

Response

default - application/json;charset=UTF-8

default response

id
string<uuid>

Unique identifier for the PDF document

invoiceReceivableId
string<uuid>

ID of the invoice receivable

status
enum<string>

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.

Available options:
GENERATING,
READY,
FAILED
url
string<url> | null

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