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

# Borrador del correo de la factura

> Destinatarios por defecto (contactos con rol de Facturación o el correo de facturación de la ficha), plantillas «Factura» y el asunto y cuerpo de la elegida (o la por defecto) con las variables de la factura.



## OpenAPI

````yaml /generated/specs/finance.json get /api/v1/billing/invoices/{id}/email-draft
openapi: 3.0.0
info:
  title: Raul API - Finanzas
  description: >-
    Facturas, boletas, ejecuciones de billing, cuentas por pagar y medios de
    pago.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/v1/billing/invoices/{id}/email-draft:
    get:
      tags:
        - Invoices
      summary: Borrador del correo de la factura
      description: >-
        Destinatarios por defecto (contactos con rol de Facturación o el correo
        de facturación de la ficha), plantillas «Factura» y el asunto y cuerpo
        de la elegida (o la por defecto) con las variables de la factura.
      operationId: InvoiceEmailComposerController_getDraft
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: template_id
          required: false
          in: query
          description: >-
            Plantilla «Factura» a aplicar; sin ella, la por defecto (o el texto
            propuesto por Raúl).
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceEmailDraftDto'
      security:
        - bearerAuth: []
components:
  schemas:
    InvoiceEmailDraftDto:
      type: object
      properties:
        recipients:
          description: >-
            Contactos con rol de Facturación (o el correo de facturación de la
            ficha)
          type: array
          items:
            $ref: '#/components/schemas/InvoiceEmailRecipientDto'
        subject:
          type: string
        body_html:
          type: string
          description: Cuerpo HTML con las variables ya reemplazadas
        template_id:
          type: string
          nullable: true
          format: uuid
        templates:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceEmailTemplateOptionDto'
        attachment_name:
          type: string
          description: Nombre del PDF que se adjunta
      required:
        - recipients
        - subject
        - body_html
        - template_id
        - templates
        - attachment_name
    InvoiceEmailRecipientDto:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        rol:
          type: string
          description: Rol funcional del contacto
      required:
        - name
        - email
    InvoiceEmailTemplateOptionDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        is_default:
          type: boolean
      required:
        - id
        - name
        - is_default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Token de sesión Better Auth para rutas de backoffice; las rutas de
        portal usan su token propio.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.