Update an invoice

put/api/invoices/{id}

Request

  • Base URL: https://declararfacil.com
  • URL: https://declararfacil.com/api/invoices/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

tipo'EMITIDA' | 'RECIBIDA'

EMITIDA = the user issued it (income). RECIBIDA = the user received it (expense).

numeroFacturastring nullable
fechaFacturastring

YYYY-MM-DD

fechaOperacionstring nullable

YYYY-MM-DD when it differs from fechaFactura

nombreClienteProveedorstring

The other party (client for EMITIDA, supplier for RECIBIDA)

nifClienteProveedorstring nullable

NIF/CIF/NIE or EU VAT number, as printed

direccionClientestring nullable
paisProveedorstring nullable

ISO 3166-1 alpha-2, e.g. ES, DE, US

tipoOperacion'NACIONAL' | 'INTRACOMUNITARIA' | 'EXTRACOMUNITARIA'
operacionB2Bboolean
esAdquisicionIntracomunitariaboolean
esServicioNoSujetoboolean
baseImponiblenumber

Taxable base in EUR (sum of all bases if several rates; then tipoIVA is the main rate)

tipoIVAnumber

IVA rate in percent: 21, 10, 4 or 0

cuotaIVAnumber

Printed invoice VAT amount in EUR; keep printed zero for reverse charge

tipoIVAAutorrepercutidonumber nullable

Applicable Spanish self-assessment rate, separately confirmed from the printed invoice rate. Never infer from printed 0%.

fuenteTipoIVAAutorrepercutidostring nullable

Basis for the applicable rate, e.g. confirmed tax classification and AEAT rule. Missing basis requires review.

porcentajeDeduccionIVAnumber nullable

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.

ivaAutorrepercutidonumber nullable

Server result: base * self-assessment rate / 100, rounded per invoice to EUR cents; never added to the printed invoice total

tipoRetencionnumber nullable

IRPF withholding rate in percent, if the invoice shows one (e.g. 15 or 7)

cuotaRetencionnumber nullable

IRPF withholding amount in EUR

suplidosnumber nullable
tipoRecargoEquivalencianumber nullable
cuotaRecargoEquivalencianumber nullable
claveRegimenEspecialstring nullable
descripcionOperacionstring nullable

One line: what was sold or bought

esFacturaRectificativaboolean
numeroFacturaRectificadastring nullable
totalFacturanumber

Total to pay in EUR (base + IVA - retención + suplidos + recargo)

categoriastring nullable

Expense category for RECIBIDA (e.g. SOFTWARE, ALQUILER, SUMINISTROS, MATERIAL, SERVICIOS_PROFESIONALES, TRANSPORTE, OTROS)

esDeducibleboolean
notasstring nullable
confianzaOCRnumber nullable

Your own confidence 0..1 that every amount is read correctly

source_filestring nullable

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.