> ## Documentation Index
> Fetch the complete documentation index at: https://docs.light.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.



## OpenAPI

````yaml /openapi-public.json post /v1/invoice-receivables/{invoiceReceivableId}/document
openapi: 3.0.1
info:
  title: Light API
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /v1/invoice-receivables/{invoiceReceivableId}/document:
    post:
      tags:
        - v1 - Invoice Receivables
      summary: Generate invoice PDF
      description: >-
        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.
      operationId: generateInvoiceReceivableDocument
      parameters:
        - name: invoiceReceivableId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: >-
                  #/components/schemas/ExternalInvoiceReceivablePdfDocumentV1Model
components:
  schemas:
    ExternalInvoiceReceivablePdfDocumentV1Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the PDF document
          format: uuid
        invoiceReceivableId:
          type: string
          description: ID of the invoice receivable
          format: uuid
        status:
          type: string
          description: >-
            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.
          nullable: false
          deprecated: false
          enum:
            - GENERATING
            - READY
            - FAILED
        url:
          type: string
          description: >-
            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.
          format: url
          nullable: true
        createdAt:
          type: string
          description: Timestamp when the document was created
          format: date-time
        updatedAt:
          type: string
          description: Timestamp when the document was last updated
          format: date-time
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Basic authentication header of the form **Basic** **<api_key>**, where
        **<api_key>** is your api key.
      name: Authorization
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````