Light APIv1.0.0

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

  • invoiceReceivableId string · uuidrequired

Response

  • id string · uuid

    Unique identifier for the PDF document

  • invoiceReceivableId string · uuid

    ID of the invoice receivable

  • status 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.

    One of GENERATING READY FAILED

  • url string · url

    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