Create one invoice (same validation as the web form)
Request
- Base URL: https://declararfacil.com
- URL: https://declararfacil.com/api/invoices
- Auth: HTTP bearer
Request body
EMITIDA = the user issued it (income). RECIBIDA = the user received it (expense).
YYYY-MM-DD
YYYY-MM-DD when it differs from fechaFactura
The other party (client for EMITIDA, supplier for RECIBIDA)
NIF/CIF/NIE or EU VAT number, as printed
ISO 3166-1 alpha-2, e.g. ES, DE, US
Taxable base in EUR (sum of all bases if several rates; then tipoIVA is the main rate)
IVA rate in percent: 21, 10, 4 or 0
Printed invoice VAT amount in EUR; keep printed zero for reverse charge
Applicable Spanish self-assessment rate, separately confirmed from the printed invoice rate. Never infer from printed 0%.
Basis for the applicable rate, e.g. confirmed tax classification and AEAT rule. Missing basis requires review.
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.
Server result: base * self-assessment rate / 100, rounded per invoice to EUR cents; never added to the printed invoice total
IRPF withholding rate in percent, if the invoice shows one (e.g. 15 or 7)
IRPF withholding amount in EUR
One line: what was sold or bought
Total to pay in EUR (base + IVA - retención + suplidos + recargo)
Expense category for RECIBIDA (e.g. SOFTWARE, ALQUILER, SUMINISTROS, MATERIAL, SERVICIOS_PROFESIONALES, TRANSPORTE, OTROS)
Your own confidence 0..1 that every amount is read correctly
Local file name, for the user's report only (never stored as a document)
Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.