Declarar Fácil · Schema

InvoiceInput

FinanceAccountingTaxAutomationArtificial Intelligence

Properties

Name Type Description
tipo string EMITIDA = the user issued it (income). RECIBIDA = the user received it (expense).
numeroFactura stringnull
fechaFactura string YYYY-MM-DD
fechaOperacion stringnull YYYY-MM-DD when it differs from fechaFactura
nombreClienteProveedor string The other party (client for EMITIDA, supplier for RECIBIDA)
nifClienteProveedor stringnull NIF/CIF/NIE or EU VAT number, as printed
direccionCliente stringnull
paisProveedor stringnull ISO 3166-1 alpha-2, e.g. ES, DE, US
tipoOperacion string
operacionB2B boolean
esAdquisicionIntracomunitaria boolean
esServicioNoSujeto boolean
baseImponible number Taxable base in EUR (sum of all bases if several rates; then tipoIVA is the main rate)
tipoIVA number IVA rate in percent: 21, 10, 4 or 0
cuotaIVA number Printed invoice VAT amount in EUR; keep printed zero for reverse charge
tipoIVAAutorrepercutido numbernull Applicable Spanish self-assessment rate, separately confirmed from the printed invoice rate. Never infer from printed 0%.
fuenteTipoIVAAutorrepercutido stringnull Basis for the applicable rate, e.g. confirmed tax classification and AEAT rule. Missing basis requires review.
porcentajeDeduccionIVA numbernull Independently confirmed VAT deduction percentage based on business use, valid evidence and applicable deduction rules. 0 means no deduction; null means unresolved. Independent of income-tax esDeducibl
ivaAutorrepercutido numbernull Server result: base * self-assessment rate / 100, rounded per invoice to EUR cents; never added to the printed invoice total
tipoRetencion numbernull IRPF withholding rate in percent, if the invoice shows one (e.g. 15 or 7)
cuotaRetencion numbernull IRPF withholding amount in EUR
suplidos numbernull
tipoRecargoEquivalencia numbernull
cuotaRecargoEquivalencia numbernull
claveRegimenEspecial stringnull
descripcionOperacion stringnull One line: what was sold or bought
esFacturaRectificativa boolean
numeroFacturaRectificada stringnull
totalFactura number Total to pay in EUR (base + IVA - retención + suplidos + recargo)
categoria stringnull Expense category for RECIBIDA (e.g. SOFTWARE, ALQUILER, SUMINISTROS, MATERIAL, SERVICIOS_PROFESIONALES, TRANSPORTE, OTROS)
esDeducible boolean
notas stringnull
confianzaOCR numbernull Your own confidence 0..1 that every amount is read correctly
source_file stringnull Local file name, for the user's report only (never stored as a document)
View JSON Schema on GitHub

JSON Schema

declararfacil-com-invoice-input-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/declararfacil-com/json-schema/declararfacil-com-invoice-input-schema.json",
  "title": "InvoiceInput",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/declararfacil-com-openapi.json#/components/schemas/InvoiceInput",
  "type": "object",
  "required": [
    "tipo",
    "fechaFactura",
    "nombreClienteProveedor",
    "baseImponible",
    "tipoIVA",
    "cuotaIVA",
    "totalFactura"
  ],
  "properties": {
    "tipo": {
      "type": "string",
      "enum": [
        "EMITIDA",
        "RECIBIDA"
      ],
      "description": "EMITIDA = the user issued it (income). RECIBIDA = the user received it (expense)."
    },
    "numeroFactura": {
      "type": [
        "string",
        "null"
      ]
    },
    "fechaFactura": {
      "type": "string",
      "description": "YYYY-MM-DD"
    },
    "fechaOperacion": {
      "type": [
        "string",
        "null"
      ],
      "description": "YYYY-MM-DD when it differs from fechaFactura"
    },
    "nombreClienteProveedor": {
      "type": "string",
      "description": "The other party (client for EMITIDA, supplier for RECIBIDA)"
    },
    "nifClienteProveedor": {
      "type": [
        "string",
        "null"
      ],
      "description": "NIF/CIF/NIE or EU VAT number, as printed"
    },
    "direccionCliente": {
      "type": [
        "string",
        "null"
      ]
    },
    "paisProveedor": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166-1 alpha-2, e.g. ES, DE, US"
    },
    "tipoOperacion": {
      "type": "string",
      "enum": [
        "NACIONAL",
        "INTRACOMUNITARIA",
        "EXTRACOMUNITARIA"
      ],
      "default": "NACIONAL"
    },
    "operacionB2B": {
      "type": "boolean",
      "default": true
    },
    "esAdquisicionIntracomunitaria": {
      "type": "boolean",
      "default": false
    },
    "esServicioNoSujeto": {
      "type": "boolean",
      "default": false
    },
    "baseImponible": {
      "type": "number",
      "description": "Taxable base in EUR (sum of all bases if several rates; then tipoIVA is the main rate)"
    },
    "tipoIVA": {
      "type": "number",
      "description": "IVA rate in percent: 21, 10, 4 or 0"
    },
    "cuotaIVA": {
      "type": "number",
      "description": "Printed invoice VAT amount in EUR; keep printed zero for reverse charge"
    },
    "tipoIVAAutorrepercutido": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 100,
      "description": "Applicable Spanish self-assessment rate, separately confirmed from the printed invoice rate. Never infer from printed 0%."
    },
    "fuenteTipoIVAAutorrepercutido": {
      "type": [
        "string",
        "null"
      ],
      "description": "Basis for the applicable rate, e.g. confirmed tax classification and AEAT rule. Missing basis requires review."
    },
    "porcentajeDeduccionIVA": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 100,
      "description": "Independently confirmed VAT deduction percentage based on business use, valid evidence and applicable deduction rules. 0 means no deduction; null means unresolved. Independent of income-tax esDeducible."
    },
    "ivaAutorrepercutido": {
      "type": [
        "number",
        "null"
      ],
      "readOnly": true,
      "description": "Server result: base * self-assessment rate / 100, rounded per invoice to EUR cents; never added to the printed invoice total"
    },
    "tipoRetencion": {
      "type": [
        "number",
        "null"
      ],
      "description": "IRPF withholding rate in percent, if the invoice shows one (e.g. 15 or 7)"
    },
    "cuotaRetencion": {
      "type": [
        "number",
        "null"
      ],
      "description": "IRPF withholding amount in EUR"
    },
    "suplidos": {
      "type": [
        "number",
        "null"
      ],
      "default": 0
    },
    "tipoRecargoEquivalencia": {
      "type": [
        "number",
        "null"
      ]
    },
    "cuotaRecargoEquivalencia": {
      "type": [
        "number",
        "null"
      ]
    },
    "claveRegimenEspecial": {
      "type": [
        "string",
        "null"
      ]
    },
    "descripcionOperacion": {
      "type": [
        "string",
        "null"
      ],
      "description": "One line: what was sold or bought"
    },
    "esFacturaRectificativa": {
      "type": "boolean",
      "default": false
    },
    "numeroFacturaRectificada": {
      "type": [
        "string",
        "null"
      ]
    },
    "totalFactura": {
      "type": "number",
      "description": "Total to pay in EUR (base + IVA - retención + suplidos + recargo)"
    },
    "categoria": {
      "type": [
        "string",
        "null"
      ],
      "description": "Expense category for RECIBIDA (e.g. SOFTWARE, ALQUILER, SUMINISTROS, MATERIAL, SERVICIOS_PROFESIONALES, TRANSPORTE, OTROS)"
    },
    "esDeducible": {
      "type": "boolean",
      "default": true
    },
    "notas": {
      "type": [
        "string",
        "null"
      ]
    },
    "confianzaOCR": {
      "type": [
        "number",
        "null"
      ],
      "description": "Your own confidence 0..1 that every amount is read correctly"
    },
    "source_file": {
      "type": [
        "string",
        "null"
      ],
      "description": "Local file name, for the user's report only (never stored as a document)"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/declararfacil-com-invoice-input"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.