API / Reference / Invoice Receivables
Generate invoice PDF
POST
https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/document
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.
Authorization
Send one of these on every request. See Authentication for how to get credentials.
- API key
Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
- Bearer token
Path parameters
-
invoiceReceivableIdstring · uuidrequired
Response
-
idstring · uuidUnique identifier for the PDF document
-
invoiceReceivableIdstring · uuidID of the invoice receivable
-
statusstringCurrent status of the PDF document generation
GENERATING- The PDF is currently being generatedREADY- The PDF has been generated and is ready for downloadFAILED- The PDF generation failed
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
GENERATINGREADYFAILED -
urlstring · urlSigned 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.
-
createdAtstring · date-timeTimestamp when the document was created
-
updatedAtstring · date-timeTimestamp when the document was last updated