---
title: "Obtener reporte de facturas"
description: "Devuelve lo facturado y liquidado sin IVA hoy, en los últimos 7 días o en el mes, con la proporción por forma de pago y las principales contrapartes del mes."
language: es-MX
canonical_url: "https://exac.mx/docs/api/tax-reports/reports/get-invoice-report"
md_url: "https://exac.mx/docs/api/tax-reports/reports/get-invoice-report.md"
---

# Obtener reporte de facturas

Devuelve lo facturado y liquidado sin IVA hoy, en los últimos 7 días o en el mes, con la proporción por forma de pago y las principales contrapartes del mes.

## Solicitud

`GET /v1/reports/invoices`

- **Autorización:** Permiso requerido: `analytics:read`.

- **Entornos:** Producción y prueba

- **Idempotencia:** No requerida

## Contrato canónico para máquinas

Este fragmento se genera desde la operación canónica y los contratos Zod que utiliza la ruta.

```json
{
  "method": "GET",
  "path": "/v1/reports/invoices",
  "operation": {
    "operationId": "getInvoiceReport",
    "tags": [
      "Reports"
    ],
    "summary": "Obtener reporte de facturas",
    "description": "Devuelve lo facturado y liquidado sin IVA hoy, en los últimos 7 días o en el mes, con la proporción por forma de pago y las principales contrapartes del mes.",
    "security": [
      {
        "bearerAuth": []
      }
    ],
    "parameters": [
      {
        "name": "direction",
        "in": "query",
        "required": false,
        "schema": {
          "description": "Invoices sent to customers or received from suppliers; defaults to sent",
          "type": "string",
          "enum": [
            "sent",
            "received"
          ]
        }
      },
      {
        "name": "period",
        "in": "query",
        "required": false,
        "schema": {
          "description": "The organization's current day, the 7 days ending on it, or its calendar month so far; defaults to last_7_days",
          "type": "string",
          "enum": [
            "today",
            "last_7_days",
            "month"
          ]
        }
      }
    ],
    "responses": {
      "200": {
        "description": "Operación completada.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "dateFrom": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "dateTo": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "invoiced": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number"
                        },
                        "count": {
                          "type": "number"
                        },
                        "pue": {
                          "type": "number"
                        },
                        "ppd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total",
                        "count",
                        "pue",
                        "ppd"
                      ],
                      "additionalProperties": false
                    },
                    "creditNotes": {
                      "type": "number"
                    },
                    "settled": {
                      "type": "number"
                    },
                    "paymentMethods": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paymentMethod": {
                            "type": "string",
                            "enum": [
                              "cash",
                              "card",
                              "transfer",
                              "credit",
                              "other"
                            ]
                          },
                          "share": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "paymentMethod",
                          "share"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "counterparties": {
                      "type": "object",
                      "properties": {
                        "month": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}$"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "number"
                              },
                              "isOther": {
                                "type": "boolean"
                              },
                              "counterpartyId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "share": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "name",
                              "amount",
                              "isOther",
                              "counterpartyId",
                              "share"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "month",
                        "items"
                      ],
                      "additionalProperties": false
                    },
                    "source": {
                      "type": "string",
                      "const": "invoice_summary"
                    },
                    "currency": {
                      "type": "string",
                      "const": "MXN"
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "sent",
                        "received"
                      ]
                    },
                    "period": {
                      "type": "string",
                      "enum": [
                        "today",
                        "last_7_days",
                        "month"
                      ]
                    },
                    "amountBasis": {
                      "type": "string",
                      "const": "before_iva"
                    }
                  },
                  "required": [
                    "dateFrom",
                    "dateTo",
                    "invoiced",
                    "creditNotes",
                    "settled",
                    "paymentMethods",
                    "counterparties",
                    "source",
                    "currency",
                    "direction",
                    "period",
                    "amountBasis"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "data"
              ],
              "additionalProperties": false
            },
            "example": {
              "data": {
                "dateFrom": "2026-07-12",
                "dateTo": "2026-07-18",
                "invoiced": {
                  "total": 48000,
                  "count": 14,
                  "pue": 30000,
                  "ppd": 18000
                },
                "creditNotes": 1200,
                "settled": 36500,
                "paymentMethods": [
                  {
                    "paymentMethod": "transfer",
                    "share": 0.7
                  },
                  {
                    "paymentMethod": "card",
                    "share": 0.25
                  },
                  {
                    "paymentMethod": "cash",
                    "share": 0.05
                  }
                ],
                "counterparties": {
                  "month": "2026-07",
                  "items": [
                    {
                      "name": "Estudio Jacaranda",
                      "amount": 22000,
                      "isOther": false,
                      "counterpartyId": "customer-example",
                      "share": 0.55
                    },
                    {
                      "name": "Otros",
                      "amount": 18000,
                      "isOther": true,
                      "counterpartyId": null,
                      "share": 0.45
                    }
                  ]
                },
                "source": "invoice_summary",
                "currency": "MXN",
                "direction": "sent",
                "period": "last_7_days",
                "amountBasis": "before_iva"
              }
            }
          }
        }
      },
      "400": {
        "description": "Solicitud inválida.\n\n`validation_error`",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "401": {
        "description": "Credencial inválida o ausente.\n\n`unauthenticated`",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "WWW-Authenticate": {
            "$ref": "#/components/headers/WWWAuthenticate"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "403": {
        "description": "La credencial no incluye el permiso `analytics:read`.\n\n`forbidden`",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "WWW-Authenticate": {
            "$ref": "#/components/headers/WWWAuthenticate"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "404": {
        "description": "Recurso no encontrado.\n\n`not_found`",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "405": {
        "description": "Método no permitido.\n\n`method_not_allowed`",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Allow": {
            "$ref": "#/components/headers/Allow"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "429": {
        "description": "Demasiadas solicitudes.\n\n`rate_limited`",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "500": {
        "description": "Error interno del servidor.\n\n`internal`",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "503": {
        "description": "Servicio temporalmente no disponible.\n\n`provider_unavailable`",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      }
    },
    "x-exac-environments": [
      "production",
      "sandbox"
    ]
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ProgrammaticError"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "ProgrammaticError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "validation_error",
              "unauthenticated",
              "forbidden",
              "payment_required",
              "not_found",
              "method_not_allowed",
              "conflict",
              "idempotency_conflict",
              "operation_in_progress",
              "recovery_required",
              "migration_required",
              "rate_limited",
              "provider_unavailable",
              "internal"
            ],
            "description": "Acción recomendada por código:\n\n- `validation_error` — Corrige cada elemento de details.issues usando su path y código estable.\n- `unauthenticated` — Proporciona una API key o un token de acceso OAuth válido.\n- `forbidden` — Usa una credencial con el permiso requerido.\n- `payment_required` — Revisa el plan del RFC, el método de pago y el límite de gasto en facturación. Reintenta solo después de resolver el requisito de pago.\n- `not_found` — Verifica el identificador del recurso dentro de la organización.\n- `method_not_allowed` — Usa el método HTTP documentado.\n- `conflict` — Actualiza el recurso y resuelve su estado actual.\n- `idempotency_conflict` — Usa otra clave de idempotencia para una solicitud modificada.\n- `operation_in_progress` — Espera el tiempo de Retry-After y repite la misma solicitud.\n- `recovery_required` — No reintentes automáticamente; reconcilia el resultado del proveedor.\n- `migration_required` — Contacta a soporte para completar la migración histórica; no vuelvas a emitir el documento.\n- `rate_limited` — Espera el tiempo de Retry-After antes de reintentar.\n- `provider_unavailable` — Reintenta solo cuando la respuesta marque la falla como reintentable.\n- `internal` — Reintenta después y contacta a soporte si el error persiste."
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "properties": {
              "document": {
                "type": "object",
                "properties": {
                  "documentRef": {
                    "$ref": "#/components/schemas/DocumentRef"
                  },
                  "editable": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "documentRef",
                  "editable"
                ],
                "additionalProperties": false
              },
              "issues": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          }
                        ]
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "message"
                  ],
                  "additionalProperties": false
                }
              },
              "retryable": {
                "type": "boolean"
              },
              "retryAfterSeconds": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "reason": {
                "type": "string"
              },
              "balanceMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "topUpUrl": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "code",
          "message",
          "status"
        ],
        "additionalProperties": false
      },
      "DocumentRef": {
        "type": "string",
        "pattern": "^(invoice|withholding|sales_receipt|declaration|tax_compliance_opinion|sales_receipt_refund):.+$"
      }
    }
  }
}
```

[OpenAPI 3.1](/openapi.json)

## Herramientas MCP equivalentes

- [`get_invoice_summary`](/docs/mcp/tools/get_invoice_summary.md)

Documentación completa: https://exac.mx/docs.md
Índice para agentes: https://exac.mx/docs/llms.txt
