Docs
Servidor MCPHerramientas disponibles

Leer resumen de facturas

Consulta lo facturado y liquidado sin IVA hoy, en 7 días o en el mes, con formas de pago y principales contrapartes.

Herramienta MCPget_invoice_summary

Propósito

Consulta lo facturado y liquidado sin IVA hoy, en 7 días o en el mes, con formas de pago y principales contrapartes.

Usar cuando
Necesitas lo facturado y liquidado recientemente, como en la página de facturas.
No usar cuando
Necesitas un mes o año fiscal pasado, ventas de recibos o un saldo de cuenta.
Permisos requeridos
analytics:read
Efectos secundarios
Ninguno
Idempotencia
Idempotente

Esquema de entrada

JSON Schema
{  "type": "object",  "properties": {    "direction": {      "description": "Invoices sent to customers or received from suppliers; defaults to sent",      "allOf": [        {          "enum": [            "sent",            "received"          ]        }      ]    },    "period": {      "description": "The organization's current day, the 7 days ending on it, or its calendar month so far; defaults to last_7_days",      "allOf": [        {          "enum": [            "today",            "last_7_days",            "month"          ]        }      ]    }  },  "$schema": "http://json-schema.org/draft-07/schema#",  "additionalProperties": false}

Esquema de salida

JSON Schema
{  "type": "object",  "properties": {    "data": {      "type": "object",      "properties": {        "dateFrom": {          "$ref": "#/definitions/__schema0"        },        "dateTo": {          "$ref": "#/definitions/__schema0"        },        "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": {                "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": {          "const": "invoice_summary"        },        "currency": {          "const": "MXN"        },        "direction": {          "enum": [            "sent",            "received"          ]        },        "period": {          "enum": [            "today",            "last_7_days",            "month"          ]        },        "amountBasis": {          "const": "before_iva"        }      },      "required": [        "dateFrom",        "dateTo",        "invoiced",        "creditNotes",        "settled",        "paymentMethods",        "counterparties",        "source",        "currency",        "direction",        "period",        "amountBasis"      ],      "additionalProperties": false    },    "error": {      "$schema": "http://json-schema.org/draft-07/schema#",      "type": "object",      "properties": {        "code": {          "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"          ]        },        "message": {          "type": "string"        },        "details": {          "type": "object",          "properties": {            "document": {              "type": "object",              "properties": {                "documentRef": {                  "type": "string",                  "pattern": "^(invoice|withholding|sales_receipt|declaration|tax_compliance_opinion|sales_receipt_refund):.+$"                },                "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        }      },      "required": [        "code",        "message"      ],      "additionalProperties": false    }  },  "$schema": "http://json-schema.org/draft-07/schema#",  "additionalProperties": false,  "definitions": {    "__schema0": {      "type": "string",      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"    }  },  "oneOf": [    {      "required": [        "data"      ]    },    {      "required": [        "error"      ]    }  ]}

Flujo relacionado

Consulta los flujos canónicos en la introducción

Herramientas relacionadas