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

# List invoices for the organization

> Authenticate with either a Supabase session (send the `X-Organization-Id` header, must be a member of that organization) or an API key (external integrations, requires the `read:invoices` scope). Results are ordered by creation date, newest first.



## OpenAPI

````yaml https://api.timbrix.mx/api/openapi.json get /invoices
openapi: 3.0.0
info:
  title: Timbrix API
  description: >-
    API de facturación electrónica CFDI 4.0 para México, con servidor OAuth2
    para gestionar organizaciones, miembros y webhooks. Compatible con agentes
    de IA — ver la extensión `x-ai-agent-friendly` en la raíz de esta spec.


    REST API with OAuth2 server for managing organizations, members, and
    webhooks.
  version: '1.0'
  contact: {}
servers: []
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
paths:
  /invoices:
    get:
      tags:
        - invoices
      summary: List invoices for the organization
      description: >-
        Authenticate with either a Supabase session (send the
        `X-Organization-Id` header, must be a member of that organization) or an
        API key (external integrations, requires the `read:invoices` scope).
        Results are ordered by creation date, newest first.
      operationId: InvoicesController_list
      parameters:
        - name: page
          required: false
          in: query
          description: Page number (1-indexed)
          schema:
            default: 1
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Results per page (1-100)
          schema:
            default: 20
            example: 20
            type: number
        - name: type
          required: false
          in: query
          description: Filtra por tipo de comprobante
          schema:
            type: string
            enum:
              - I
              - E
              - T
        - name: status
          required: false
          in: query
          description: Filtra por estatus
          schema:
            type: string
            enum:
              - vigente
              - cancelado
        - name: dateFrom
          required: false
          in: query
          description: >-
            Filtra por fecha de registro en Timbrix (createdAt), desde
            (inclusive, ISO 8601). Un valor de solo fecha (YYYY-MM-DD) se ancla
            al inicio del día en America/Mexico_City.
          schema:
            example: '2026-08-01'
            type: string
        - name: dateTo
          required: false
          in: query
          description: >-
            Filtra por fecha de registro en Timbrix (createdAt), hasta
            (inclusive, ISO 8601). Un valor de solo fecha (YYYY-MM-DD) se ancla
            al final del día (23:59:59.999) en America/Mexico_City, incluyendo
            el día completo.
          schema:
            example: '2026-08-31'
            type: string
        - name: rfcReceptor
          required: false
          in: query
          description: Filtra por RFC exacto del receptor
          schema:
            example: XAXX010101000
            type: string
        - name: environment
          required: false
          in: query
          description: >-
            Filtra por entorno. Ignorado para peticiones autenticadas con API
            key (siempre se usa el entorno de la key). Para una sesión de
            Supabase, omitir este parámetro devuelve ambos entornos.
          schema:
            type: string
            enum:
              - sandbox
              - production
        - name: X-Organization-Id
          in: header
          description: >-
            Required for Supabase session auth. Ignored when authenticating with
            an API key (the organization resolves from the key).
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListInvoicesResponseDto'
        '400':
          description: Missing X-Organization-Id header for a session request
      security:
        - apiKey: []
        - bearer: []
components:
  schemas:
    ListInvoicesResponseDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceListItemDto'
        total:
          type: number
          example: 42
          description: Total de facturas de la organización, antes de paginar
        page:
          type: number
          example: 1
        limit:
          type: number
          example: 20
        totalPages:
          type: number
          example: 3
      required:
        - data
        - total
        - page
        - limit
        - totalPages
    InvoiceListItemDto:
      type: object
      properties:
        id:
          type: string
          description: Timbrix invoice record ID
          example: 0f2a1c3e-1a2b-4c3d-9e8f-1234567890ab
        uuid:
          type: string
          description: Folio fiscal UUID asignado por el SAT vía PAC
          example: d3bfbc57-44af-4390-a064-f0afab85e5df
        serie:
          type: string
          example: A
        folio:
          type: string
          example: '1'
        tipoComprobante:
          type: string
          example: I
          description: I = Ingreso, E = Egreso, T = Traslado
        rfcReceptor:
          type: string
          example: GODE561231GR8
          description: RFC del receptor
        moneda:
          type: string
          example: MXN
        total:
          type: number
          example: 116
        status:
          type: string
          enum:
            - vigente
            - cancelado
          example: vigente
        environment:
          type: string
          enum:
            - sandbox
            - production
          example: production
          description: >-
            Ambiente en el que se timbró el CFDI. Los CFDI de sandbox no tienen
            validez fiscal ante el SAT.
        createdAt:
          format: date-time
          type: string
          example: '2026-07-30T22:50:03.412Z'
        requiresReceptorApproval:
          type: boolean
          description: >-
            Whether cancelling this invoice would require receptor approval per
            SAT rules — computed server-side, never re-derive this in the
            frontend.
          example: false
        cancellationStatus:
          type: string
          enum:
            - pendiente
            - rechazada
          description: >-
            Latest cancellation attempt's status, only while the invoice is
            still vigente. null if never attempted or already cancelado.
        cancellationDesynced:
          type: boolean
          description: >-
            true when a cancellation was accepted but the invoice status update
            failed to apply — indicates the invoice may already be cancelled at
            the SAT even though it still shows vigente here; needs manual
            reconciliation.
          example: false
      required:
        - id
        - uuid
        - serie
        - folio
        - tipoComprobante
        - rfcReceptor
        - moneda
        - total
        - status
        - environment
        - createdAt
        - requiresReceptorApproval
        - cancellationDesynced
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API Key for authentication (format: sk_...)'
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````