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

# Listar / buscar DE

> Listado paginado con filtros y búsqueda fuzzy.

Devuelve un listado paginado de Documentos Electrónicos del tenant, con filtros por estado, tipo, rango de fechas y búsqueda fuzzy.

## Modos de uso

* **Listado paginado** (default): combinás filtros + paginación. El response incluye `documentos[]`, `total`, `limit`, `offset`, `page`, `total_pages`.
* **Búsqueda por CDC**: pasá `?cdc=...` y el response devuelve **el objeto del DE directamente** (no paginado). Útil cuando ya conocés el CDC.
* **Búsqueda por id interno**: pasá `?id_interno=...` para resolver por el identificador de tu sistema.

## Filtros disponibles

| Param             | Tipo                | Notas                                                                         |
| ----------------- | ------------------- | ----------------------------------------------------------------------------- |
| `estado`          | `P / E / A / R / C` | Pendiente, Enviado, Aprobado, Rechazado, Cancelado.                           |
| `tipo`            | `1–8`               | `1` factura, `4` autofactura, `5` NC, `6` ND, `7` NR.                         |
| `sit`             | `H / P`             | Ambiente: homologación o producción. Sin valor, devuelve documentos de ambos. |
| `desde` / `hasta` | `YYYY-MM-DD`        | Rango de fecha de emisión (zona Paraguay).                                    |
| `q`               | `string(3–120)`     | Fuzzy match sobre nombre del receptor, RUC y número de comprobante.           |
| `limit`           | `1–100`             | Default `50`.                                                                 |
| `offset`          | `int`               | Default `0`.                                                                  |

## Cuándo usar este endpoint vs. el detalle

* **Listado**: para grilla, listados, búsquedas de cliente.
* **Detalle** (`GET /v1/de/{cdc}`): cuando necesitás todos los datos del DE incluyendo items, eventos asociados, y URLs pre-firmadas de XML y KuDE.


## OpenAPI

````yaml GET /v1/de
openapi: 3.1.0
info:
  title: eMiti API
  description: >-
    API de emisión de Documentos Tributarios Electrónicos (DTE) bajo SIFEN/DNIT
    Paraguay.
  version: 1.1.0
servers:
  - url: https://api.emiti.fravelabs.com
    description: Producción
  - url: https://api.qa.emiti.fravelabs.com
    description: QA
  - url: https://api.dev.emiti.fravelabs.com
    description: Desarrollo (Homologación SIFEN)
security:
  - ApiKeyAuth: []
paths:
  /v1/de:
    get:
      summary: GET /v1/de
      operationId: listar_facturas_v1_de_get
      parameters:
        - required: false
          schema:
            anyOf:
              - type: string
                maxLength: 44
                minLength: 44
              - type: 'null'
            title: Cdc
          name: cdc
          in: query
        - required: false
          schema:
            anyOf:
              - type: string
                maxLength: 50
              - type: 'null'
            title: Id Interno
          name: id_interno
          in: query
        - required: false
          schema:
            anyOf:
              - type: string
                maxLength: 1
                minLength: 1
              - type: 'null'
            title: Estado
          name: estado
          in: query
        - required: false
          schema:
            anyOf:
              - type: integer
                maximum: 8
                minimum: 1
              - type: 'null'
            title: Tipo
          name: tipo
          in: query
        - description: >-
            Ambiente: 'H' homologación, 'P' producción. Sin valor, ambos
            (EMI-63).
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - H
                  - P
              - type: 'null'
            title: Sit
            description: >-
              Ambiente: 'H' homologación, 'P' producción. Sin valor, ambos
              (EMI-63).
          name: sit
          in: query
        - description: Fecha inicio YYYY-MM-DD (inclusive).
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Desde
            description: Fecha inicio YYYY-MM-DD (inclusive).
          name: desde
          in: query
        - description: Fecha fin YYYY-MM-DD (inclusive, todo el día).
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Hasta
            description: Fecha fin YYYY-MM-DD (inclusive, todo el día).
          name: hasta
          in: query
        - description: >-
            Búsqueda fuzzy sobre nombre del cliente, RUC del receptor y número
            del DE. Mínimo 3 chars — menos se ignora.
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 120
              - type: 'null'
            title: Q
            description: >-
              Búsqueda fuzzy sobre nombre del cliente, RUC del receptor y número
              del DE. Mínimo 3 chars — menos se ignora.
          name: q
          in: query
        - required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            title: Limit
            default: 50
          name: limit
          in: query
        - required: false
          schema:
            type: integer
            minimum: 0
            title: Offset
            default: 0
          name: offset
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Return
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````