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

# Buscar DTEs emitidos

> Lista los DTEs de la cuenta con filtros y paginación. Devuelve el sobre `{ data, meta, links }`.



## OpenAPI

````yaml /api-reference/openapi.json get /dte
openapi: 3.1.0
info:
  title: Fegora API
  version: '1.0'
  description: >-
    API de Fegora para la emisión y consulta de Documentos Tributarios
    Electrónicos (DTE) en Guatemala, El Salvador y República Dominicana.


    El API es uno solo para los tres países: el país de operación lo determina
    la configuración de la cuenta emisora (no la URL ni ningún parámetro de la
    solicitud). Los campos que varían por país — tipos de documento, catálogos
    de impuestos, identificadores fiscales del receptor, datos adicionales — se
    documentan en la descripción de cada campo.


    Autenticación: OAuth2 (`POST /token`, grant types `password` y
    `refresh_token`) → JWT Bearer con vigencia de 24 horas.
servers:
  - url: https://api.fegora.com
security:
  - bearerAuth: []
tags:
  - name: Autenticación
    description: Obtención y renovación de tokens de acceso.
  - name: DTE
    description: Emisión, consulta, anulación y distribución de documentos emitidos.
  - name: DTE Recibidos
    description: Documentos donde la cuenta es el receptor (facturas de proveedores).
  - name: Lotes
    description: Carga masiva de DTEs mediante archivos Excel.
  - name: Cuentas
    description: Administración de cuentas emisoras/receptoras.
  - name: Catálogos
    description: >-
      Catálogos de referencia: productos, plantillas de PDF, localidades y
      contribuyentes.
  - name: Otros
    description: Endpoints de soporte, como el perfil del usuario autenticado.
paths:
  /dte:
    get:
      tags:
        - DTE
      summary: Buscar DTEs emitidos
      description: >-
        Lista los DTEs de la cuenta con filtros y paginación. Devuelve el sobre
        `{ data, meta, links }`.
      operationId: getDte
      parameters:
        - name: idCuenta
          in: query
          schema:
            type: string
        - name: desde
          in: query
          schema:
            type: string
            format: date-time
        - name: hasta
          in: query
          schema:
            type: string
            format: date-time
        - name: tipo
          in: query
          schema:
            type: string
        - name: idReceptor
          in: query
          schema:
            type: string
        - name: anulados
          in: query
          schema:
            type: boolean
        - name: enAmbienteDePruebas
          in: query
          schema:
            type: boolean
          description: Si se omite, se usa el ambiente configurado en la cuenta.
        - name: codigoEstablecimiento
          in: query
          schema:
            type: string
        - name: id
          in: query
          schema:
            type: string
        - name: serie
          in: query
          schema:
            type: string
        - name: numero
          in: query
          schema:
            type: integer
            format: int64
        - name: numeroTransaccion
          in: query
          schema:
            type: string
        - name: datoAdicionalNombre
          in: query
          schema:
            type: string
        - name: datoAdicionalValor
          in: query
          schema:
            type: string
        - name: pageNumber
          in: query
          schema:
            type: integer
            default: 1
          description: Número de página (base 1).
        - name: pageSize
          in: query
          schema:
            type: integer
            default: 10
          description: Tamaño de página.
      responses:
        '200':
          description: Listado paginado de DTEs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DteListado'
              examples:
                ok:
                  summary: Listado
                  value:
                    data:
                      - id: 2AF7AD7C-49C5-4BEC-95CD-BCD04BECE220
                        serie: 2AF7AD7C
                        numero: 1237666796
                        tipo: factura
                        fechaEmision: '2026-03-01T01:26:44.749'
                        fechaCertificacion: '2026-03-01T07:26:56'
                        estado: Certificado
                        anulado: false
                        esExentoIva: false
                        total: 500
                        moneda: GTQ
                        estaEnAmbienteDePruebas: true
                        idCuenta: '12345678'
                        idCanal: 1
                        canal:
                          id: 1
                          nombre: API
                          nombreCorto: api
                        emisor:
                          id: '12345678'
                          nombre: PRUEBAS FEL -SAN MIGUEL, S.A.
                          nombreComercial: PRUEBAS FEL
                          esExentoIva: false
                          esRetenedorIva: false
                          afiliacionIva: GENERAL
                          afiliacionIsr: >-
                            ISR_OPCIONAL_SIMPLIFICADO_SOBRE_INGRESOS_ACTIVIDADES_LUCRATIVAS
                          codigoEstablecimiento: '1'
                          direccion:
                            direccion: Ruta 8 3-65 Zona 4 Guatemala
                            municipio: Guatemala
                            departamento: Guatemala
                            codigoPostal: '01004'
                            pais: GT
                        receptor:
                          id: CF
                          nombre: DISTRIBUIDORA DETODO 3-51, SOCIEDAD ANONIMA
                          direccion:
                            direccion: 2a CALLE 3-51 ZONA 9 GUATEMALA
                            municipio: Guatemala
                            departamento: Guatemala
                            codigoPostal: '00100'
                            pais: GT
                        items:
                          - cantidad: 1
                            descripcion: Audifonos Bose NB-75
                            tipo: bien
                            unidadMedida: uni
                            precioUnitario: 500
                            precio: 500
                            descuento: 0
                            otroDescuento: 0
                            total: 500
                            impuestos:
                              - nombreCorto: IVA
                                codigoUnidadGravable: 1
                                cantidadUnidadesGravables: 0
                                montoGravable: 446.4286
                                montoImpuesto: 53.5714
                        datosAdicionales:
                          - nombre: SAT-1-2
                            valor: Sujeto a retención definitiva ISR
                            etiqueta: ''
                            visible: true
                        certificador:
                          id: '12345678'
                          nombre: Certificador de Pruebas, S.A.
                          nombreComercial: Certificador de Pruebas
                        archivoPdfUri: >-
                          https://cdn.fegora.com/dtes/2AF7AD7C-49C5-4BEC-95CD-BCD04BECE220.pdf
                        archivoXmlUri: >-
                          https://cdn.fegora.com/dtes/2AF7AD7C-49C5-4BEC-95CD-BCD04BECE220.xml
                        dteUri: >-
                          https://www.fegora.com/dtes/2AF7AD7C-49C5-4BEC-95CD-BCD04BECE220
                    meta:
                      totalItems: 1
                      totalPages: 1
                      pageNumber: 1
                      pageSize: 10
                    links:
                      self: https://api.fegora.com/dte?pageNumber=1
                      first: https://api.fegora.com/dte?pageNumber=1
                      last: https://api.fegora.com/dte?pageNumber=1
        '401':
          description: No autenticado. El token es inválido, expiró o no fue enviado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                noAutenticado:
                  summary: Token ausente, inválido o expirado
                  value:
                    codigo: FEG_UNAUTHORIZED
                    mensaje: No está autorizado para acceder a este recurso
                    masInformacion: https://developer.fegora.com
                    severidad: 2
components:
  schemas:
    DteListado:
      type: object
      description: Listado paginado de documentos.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DteResponse'
        meta:
          $ref: '#/components/schemas/MetaPagina'
        links:
          $ref: '#/components/schemas/LinksPagina'
    Error:
      type: object
      description: Formato estándar de error de Fegora. Se usa en toda respuesta 4xx.
      properties:
        codigo:
          type: string
          description: >-
            Código de error interno de Fegora (p. ej. `FEG_VALIDATION_ERROR`,
            `FEG_DTE_CREA_001`). Ver la tabla de códigos de error en la guía de
            introducción.
          examples:
            - FEG_VALIDATION_ERROR
        mensaje:
          type: string
          description: Mensaje descriptivo del error, en español.
        masInformacion:
          type: string
          format: uri
          description: Enlace a documentación adicional sobre el error.
          examples:
            - https://developer.fegora.com
        severidad:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: 0 = Sugerencia, 1 = Advertencia, 2 = Error, 3 = Fatal.
      required:
        - codigo
        - mensaje
    DteResponse:
      type: object
      description: >-
        Documento certificado, tal como lo devuelve Fegora al crear, consultar o
        anular un DTE. Los campos de fecha se devuelven generalmente en hora
        local del país del emisor, sin offset de zona horaria (formato
        `yyyy-MM-ddTHH:mm:ss[.fffffff]`); algunos campos puntuales (bitácora,
        fechas de certificación en ciertos países) pueden llevar sufijo `Z` u
        offset explícito.
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Identificador del documento. Es el número de autorización asignado
            por el certificador (SAT en Guatemala; `codigoGeneracion` en El
            Salvador; identificador Digifact en República Dominicana).
        serie:
          type: string
        numero:
          type: integer
          format: int64
        tipo:
          type: string
          enum:
            - factura
            - ticket
            - facturaEspecial
            - facturaCambiaria
            - facturaExportacion
            - notaCredito
            - notaDebito
            - notaAbono
            - recibo
            - reciboDonacion
        fechaEmision:
          type: string
        fechaCertificacion:
          type: string
        numeroAcceso:
          type: integer
          description: >-
            Número de acceso de contingencia. Omitido salvo que el documento se
            haya emitido en contingencia — no confundir con el `id` (número de
            autorización).
        estado:
          type: string
          enum:
            - Certificado
            - Anulado
        anulado:
          type: boolean
        esExentoIva:
          type: boolean
        motivoExencionIva:
          type: string
        esExportacion:
          type: boolean
          description: Omitido cuando es `false`.
        total:
          type: number
          format: double
        moneda:
          type: string
        estaEnAmbienteDePruebas:
          type: boolean
        emisor:
          $ref: '#/components/schemas/EntidadFiscal'
        receptor:
          $ref: '#/components/schemas/EntidadFiscal'
        idCuenta:
          type: string
        idCanal:
          type: integer
        canal:
          $ref: '#/components/schemas/Canal'
        idDteOriginal:
          type: string
          format: uuid
        motivoAjuste:
          type: string
        numeroTransaccion:
          type: string
        dteOriginal:
          $ref: '#/components/schemas/DteOriginal'
        certificador:
          $ref: '#/components/schemas/Certificador'
        selloEntidadFiscal:
          type: string
          description: Sello/firma visual del certificador.
        verificacionCertificadorUri:
          type: string
        verificacionCertificadorQrBase64:
          type: string
        datosExportacion:
          $ref: '#/components/schemas/DatosExportacion'
        retencionesFacturaEspecial:
          $ref: '#/components/schemas/RetencionesFacturaEspecial'
        abonosPactados:
          type: array
          items:
            $ref: '#/components/schemas/AbonoPactado'
        datosAnulacion:
          $ref: '#/components/schemas/DatosAnulacion'
        archivoPdfUri:
          type: string
          description: >-
            Se genera de forma diferida — puede estar ausente hasta el primer
            `GET /dte/{id}/pdf`.
        archivoXmlUri:
          type: string
        archivoJsonUri:
          type: string
          description: >-
            Presente sólo para certificadores que devuelven el documento
            certificado en JSON (El Salvador).
        dteUri:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/ItemDte'
        datosAdicionales:
          type: array
          items:
            $ref: '#/components/schemas/DatoAdicional'
        recursos:
          type: array
          items:
            $ref: '#/components/schemas/DteRecurso'
        bitacora:
          type: array
          items:
            $ref: '#/components/schemas/BitacoraEntrada'
        fechaCreacion:
          type: string
      required:
        - id
        - serie
        - numero
        - tipo
        - fechaEmision
        - estado
        - total
        - moneda
        - emisor
        - receptor
        - idCuenta
        - items
    MetaPagina:
      type: object
      properties:
        totalItems:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int64
        pageNumber:
          type: integer
        pageSize:
          type: integer
    LinksPagina:
      type: object
      properties:
        self:
          type: string
        prev:
          type:
            - string
            - 'null'
        next:
          type:
            - string
            - 'null'
        first:
          type: string
        last:
          type: string
    EntidadFiscal:
      type: object
      description: >-
        Representación de emisor o receptor tal como aparece en la respuesta de
        un DTE, con los datos fiscales resueltos por Fegora.
      properties:
        id:
          type: string
          description: NIT / RNC / identificador fiscal.
        nombre:
          type: string
        nombreComercial:
          type: string
        tipoId:
          type: string
        tipoEstablecimiento:
          type: string
        esExentoIva:
          type: boolean
        esRetenedorIva:
          type: boolean
        direccion:
          $ref: '#/components/schemas/Direccion'
        direccionCorreoElectronico:
          type: string
        afiliacionIva:
          type: string
        afiliacionIsr:
          type: string
        codigoEstablecimiento:
          type: string
        codigoPuntoVenta:
          type: string
          description: Código de punto de venta (El Salvador).
        datosAdicionales:
          type: array
          items:
            $ref: '#/components/schemas/DatoAdicional'
          description: Omitido cuando no hay datos adicionales.
      required:
        - id
        - nombre
    Canal:
      type: object
      description: Canal de emisión de la cuenta (por defecto, canal API).
      properties:
        id:
          type: integer
        nombre:
          type: string
        nombreCorto:
          type: string
    DteOriginal:
      type: object
      description: >-
        Resumen del documento original referenciado por una nota de
        crédito/débito. Fechas en hora local del emisor, sin offset de zona
        horaria.
      properties:
        id:
          type: string
        serie:
          type: string
        numero:
          type: integer
          format: int64
        fechaEmision:
          type: string
        fechaCertificacion:
          type: string
        tipo:
          type: string
        total:
          type: number
          format: double
    Certificador:
      type: object
      properties:
        id:
          type: string
          description: >-
            NIT del certificador autorizado (Digifact, Infile, etc. en
            Guatemala; NUC en El Salvador/RD).
        nombre:
          type: string
        nombreComercial:
          type: string
        esExentoIva:
          type: boolean
        esRetenedorIva:
          type: boolean
    DatosExportacion:
      type: object
      description: >-
        Datos de exportación (Guatemala). Obligatorio cuando `esExportacion:
        true` o `tipo: "facturaExportacion"`. Una factura de exportación queda
        exenta de IVA automáticamente (frase 4-1, `LEY_IVA_ART7_NUM2`) — no debe
        enviarse `motivoExencionIva` ni calcular el IVA manualmente.
      properties:
        nombreConsignatario:
          type: string
        direccionConsignatario:
          type: string
        codigoConsignatario:
          type: string
        nombreComprador:
          type: string
        direccionComprador:
          type: string
        codigoComprador:
          type: string
        otraReferencia:
          type: string
        incoterm:
          type: string
          description: Incoterm 2020. Ver https://www.tibagroup.com/mx/incoterms
          enum:
            - EXW
            - FCA
            - CPT
            - CIP
            - DAP
            - DPU
            - DDP
            - FAS
            - FOB
            - CFR
            - CIF
        codigoExportador:
          type: string
        nombreExportador:
          type: string
      required:
        - nombreConsignatario
        - direccionConsignatario
    RetencionesFacturaEspecial:
      type: object
      description: >-
        Retenciones de Factura Especial (Guatemala): ISR 5% + IVA retenido. Sólo
        presente para `tipo: "facturaEspecial"`.
      properties:
        retencionIsr:
          type: number
          format: double
        retencionIva:
          type: number
          format: double
        totalMenosRetenciones:
          type: number
          format: double
    AbonoPactado:
      type: object
      description: >-
        Abono pactado (plan de pagos). Usado en factura cambiaria (Guatemala) y
        formas de pago (El Salvador/República Dominicana). Una `factura` con
        `abonosPactados` se certifica automáticamente como factura cambiaria;
        también puede indicarse explícitamente `tipo: "facturaCambiaria"`.
      properties:
        numero:
          type: integer
          description: >-
            Número correlativo del abono (1..n). Lo asigna Fegora ordenando por
            `fecha`; se ignora si se envía en la solicitud.
        fecha:
          type: string
        monto:
          type: number
          format: double
        metodoPago:
          type: string
        duracion:
          type: string
          description: Duración en formato ISO-8601 (p. ej. `P1M`, `P1Y6M`).
    DatosAnulacion:
      type: object
      description: >-
        Bloque de anulación que se incluye en la respuesta de un DTE anulado.
        Fechas en hora local del emisor, sin offset de zona horaria.
      properties:
        motivoAnulacion:
          type: string
        fechaAnulacion:
          type: string
        fechaCertificacion:
          type: string
          description: Fecha en que el certificador confirmó la anulación.
      required:
        - motivoAnulacion
        - fechaAnulacion
    ItemDte:
      type: object
      description: >-
        Item (línea de detalle) tal como se refleja en la respuesta, con los
        impuestos ya resueltos.
      properties:
        cantidad:
          type: number
          format: double
        descripcion:
          type: string
        tipo:
          type: string
          enum:
            - bien
            - servicio
        unidadMedida:
          type: string
        precioUnitario:
          type: number
          format: double
        precio:
          type: number
          format: double
          description: Total de línea antes de descuento (precioUnitario × cantidad).
        descuento:
          type: number
          format: double
        otroDescuento:
          type: number
          format: double
        total:
          type: number
          format: double
        impuestos:
          type: array
          items:
            $ref: '#/components/schemas/Impuesto'
        datosAdicionales:
          type: array
          items:
            $ref: '#/components/schemas/DatoAdicional'
          description: Omitido cuando el item no tiene datos adicionales.
      required:
        - cantidad
        - descripcion
        - unidadMedida
        - precioUnitario
        - total
    DatoAdicional:
      type: object
      description: >-
        Dato adicional tal como se refleja en la respuesta: incluye `etiqueta`
        (para representación gráfica) y `visible`, calculados por Fegora a
        partir de lo enviado y de las frases/legales automáticas (p. ej.
        `SAT-4-1`).
      properties:
        nombre:
          type: string
        valor:
          type:
            - string
            - 'null'
        etiqueta:
          type: string
          description: >-
            Etiqueta sugerida para mostrar en una representación gráfica (PDF).
            Vacía para frases SAT y leyendas automáticas.
        visible:
          type: boolean
          description: Si debe mostrarse en una representación gráfica (PDF).
      required:
        - nombre
    DteRecurso:
      type: object
      description: Recurso adjunto a un DTE (archivo, URL o referencia a otro DTE).
      properties:
        tipo:
          type: string
          enum:
            - archivo
            - url
            - dte
        archivoUri:
          type: string
        uri:
          type: string
        idDteRelacionado:
          type: string
        descripcion:
          type: string
    BitacoraEntrada:
      type: object
      description: >-
        Entrada de la bitácora (auditoría) del documento. `fecha` en hora local
        del emisor, sin offset de zona horaria.
      properties:
        evento:
          type: string
          enum:
            - creacion
            - modificacion
            - itemAgregado
            - itemEliminado
            - certificacion
            - anulacion
            - envio
            - impresion
        fecha:
          type: string
        ipOrigen:
          type: string
        origen:
          type: string
        usuario:
          type: string
    Direccion:
      type: object
      description: >-
        Dirección física. Se usa tanto para el emisor/establecimiento como para
        el receptor. `pais` acepta el código ISO 3166-1 alfa-2 (`GT`, `SV`,
        `DO`); por compatibilidad legacy el valor por defecto interno es la
        cadena literal `GUATEMALA`, pero se recomienda enviar siempre el código
        de 2 letras.
      properties:
        direccion:
          type: string
          maxLength: 500
          description: >-
            Dirección en texto libre. Opcional — un receptor Consumidor Final
            típicamente no la incluye.
        municipio:
          type: string
        departamento:
          type: string
        idMunicipio:
          type: string
          description: >-
            Código de localidad del municipio (ver `GET /localidad`). En El
            Salvador usa el formato `SV.<departamento>.<municipio>`, p. ej.
            `SV.SS.23` (San Salvador).
        idDepartamento:
          type: string
          description: Código de localidad del departamento (ver `GET /localidad`).
        codigoPostal:
          type: string
          description: >-
            Para Guatemala, cuando `pais` es exactamente `GUATEMALA`, debe tener
            5 dígitos. Si se omite en el receptor, Fegora usa `01001` por
            defecto.
        pais:
          type: string
          description: Código o nombre de país.
          examples:
            - GT
            - SV
            - DO
    Impuesto:
      type: object
      description: >-
        Línea de impuesto tal como se refleja en la respuesta (calculada o
        completada por Fegora a partir de lo enviado).
      properties:
        nombreCorto:
          type: string
          enum:
            - IVA
            - ISR
            - IDP
            - ITH
            - ITP
            - TDP
            - IFB
            - MUN
            - IDB
            - OTRO
        codigoUnidadGravable:
          type: integer
          description: >-
            Ver la nota de variación por país en
            `ImpuestoInput.codigoUnidadGravable`.
        cantidadUnidadesGravables:
          type: number
          format: double
        montoGravable:
          type: number
          format: double
        montoImpuesto:
          type: number
          format: double
      required:
        - nombreCorto
        - montoGravable
        - montoImpuesto
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````