openapi: 3.0.3
info:
  title: Repzo API - Quick Convert to PDF
  version: 1.0.0
  description: OpenAPI specification for Repzo Quick Convert to PDF endpoints.
servers:
  - url: https://sv.api.repzo.me
paths:
  /quick-convert-to-pdf:
    post:
      summary: Convert document to PDF
      operationId: quickConvertToPdf
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/QuickConvertToPdfBody"
      responses:
        "200":
          description: PDF conversion successful
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/QuickConvertToPdfResult"
components:
  schemas:
    QuickConvertToPdfBody:
      type: object
      description: Body for converting document to PDF
      required:
        - documentType
        - documentId
      properties:
        documentType:
          type: string
          enum: [invoice, proforma, order, quote, receipt]
          description: Type of document to convert
        documentId:
          type: string
          description: ID of the document to convert
        template:
          type: string
          description: Template to use for PDF generation
        options:
          type: object
          properties:
            includeHeader:
              type: boolean
              description: Whether to include header in PDF
            includeFooter:
              type: boolean
              description: Whether to include footer in PDF
            watermark:
              type: string
              description: Watermark text to add to PDF
            orientation:
              type: string
              enum: [portrait, landscape]
              description: Page orientation
            format:
              type: string
              enum: [A4, A3, Letter]
              description: Page format
          description: PDF generation options
        language:
          type: string
          description: Language for the PDF content
    QuickConvertToPdfResult:
      type: object
      description: Result of PDF conversion
      properties:
        success:
          type: boolean
          description: Whether conversion was successful
        pdfUrl:
          type: string
          description: URL to download the generated PDF
        filename:
          type: string
          description: Generated PDF filename
        size:
          type: number
          description: PDF file size in bytes
        pages:
          type: number
          description: Number of pages in the PDF
        generatedAt:
          type: string
          format: date-time
          description: When the PDF was generated
        expiresAt:
          type: string
          format: date-time
          description: When the PDF download link expires
