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

# Obtener borrador



## OpenAPI

````yaml https://rest.yafacture.com/openapi-borradores.json get /borradores/{borradorId}
openapi: 3.0.0
info:
  title: Yafacture
  description: Yafacture API
  version: '1.0'
  contact:
    name: Yafacture
    url: https://yafacture.com
    email: hola@yafacture.com
servers:
  - url: https://rest.yafacture.com
security: []
tags: []
paths:
  /borradores/{borradorId}:
    get:
      tags:
        - Borradores
      summary: Obtener borrador
      operationId: BorradoresController_controllerGetById
      parameters:
        - name: borradorId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Listar borrador
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Borradores'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Forbidden resource
                  error:
                    type: string
                    example: Forbidden
                  statusCode:
                    type: integer
                    format: int32
                    example: 403
                required:
                  - message
                  - error
                  - statusCode
      security:
        - x-api-key: []
        - bearer: []
components:
  schemas:
    Borradores:
      type: object
      properties:
        _id:
          type: string
          description: Identificador único del borrador
        emisorId:
          type: string
          description: Identificador único del emisor
        cuentaId:
          type: string
          description: Identificador único de la cuenta
        receptorId:
          type: string
          description: Identificador único del receptor
        sucursalId:
          type: string
          description: Identificador de la sucursal
        tipoComprobante:
          type: string
          description: Tipo de comprobante que se generará (I=Ingreso, E=Egreso, etc.)
          example: I
        usoCfdi:
          type: string
          description: Uso del CFDI según catálogo del SAT
        metodoPago:
          type: string
          description: Método de pago según catálogo del SAT
        formaPago:
          type: string
          description: Forma de pago según catálogo del SAT
        regimenFiscal:
          type: string
          description: Régimen fiscal del contribuyente
          default: ''
        moneda:
          type: string
          description: Moneda del comprobante según catálogo del SAT
        isCartaPorte:
          type: boolean
          description: Indica si es Carta Porte
          default: false
        isAutofactura:
          type: boolean
          description: Indica si es autofacturable
          default: false
        isVenta:
          type: boolean
          description: Indica si es una venta
          default: false
        isBloqueada:
          type: string
          description: Indica si está bloqueada
          default: ''
        isVisible:
          type: boolean
          description: Indica si el borrador es visible
          default: true
        isGlobal:
          type: boolean
          description: Indica si es una factura global
          default: false
        global:
          type: object
          description: Configuración de factura global
          default: {}
        relaciones:
          description: CFDI relacionados
          default: []
          type: array
          items:
            type: string
        origen:
          type: string
          enum:
            - app
            - api
            - upload
            - download
            - mercadolibre
            - mercadopago
            - autofactura
            - transferencia
          default: app
          description: Origen del registro (app, api, importación, etc.)
        resumen:
          type: object
          description: Resumen de totales del comprobante
          default: {}
        serieCotizacion:
          type: string
          description: Serie para identificar las cotizaciones
          default: ''
        folioCotizacion:
          type: number
          description: Folio consecutivo para las cotizaciones
          default: 1
        mensajeCotizacion:
          type: string
          description: Mensaje personalizado en la cotización
        mensajeCfdi:
          type: string
          description: Mensaje personalizado en el CFDI
        mensajeAutofactura:
          type: string
          description: Mensaje personalizado de autofactura
        fechaCreacion:
          format: date-time
          type: string
          description: Fecha de creación del registro
          default: '2026-05-17T02:51:35.412Z'
        fechaActualizacion:
          format: date-time
          type: string
          description: Fecha de última actualización del registro
          default: '2026-05-17T02:51:35.412Z'
        identificadorPublico:
          type: string
          description: Identificador público para el borrador
          default: ''
        status:
          type: boolean
          description: Estado del borrador
          default: true
      description: Descripción del schema de Borradores
      required:
        - _id
        - emisorId
        - cuentaId
        - receptorId
        - sucursalId
        - tipoComprobante
        - usoCfdi
        - metodoPago
        - formaPago
        - regimenFiscal
        - moneda
        - isCartaPorte
        - isAutofactura
        - isVenta
        - isBloqueada
        - isVisible
        - isGlobal
        - global
        - relaciones
        - origen
        - resumen
        - serieCotizacion
        - folioCotizacion
        - mensajeCotizacion
        - mensajeCfdi
        - mensajeAutofactura
        - fechaCreacion
        - fechaActualizacion
        - identificadorPublico
        - status
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        X-API-Key authentication header for the development token generated in
        Yafacture
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````