---
title: "Submit up to 100 extracted invoices; per-item accepted / duplicate / rejected"
method: POST
path: "/api/agent/v1/invoices/batch"
---

# Submit up to 100 extracted invoices; per-item accepted / duplicate / rejected

`POST /api/agent/v1/invoices/batch`

## Request

- Base URL: `https://declararfacil.com`
- URL: `https://declararfacil.com/api/agent/v1/invoices/batch`
- Auth: HTTP bearer

## Request body

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

## Response `200`

Per-item outcome

- BatchResult
  - `summary` object
    - `total` integer
    - `accepted` integer
    - `duplicates` integer
    - `rejected` integer
  - `results` object[]
    - `index` integer
    - `status` 'accepted' | 'duplicate' | 'rejected'
    - `id` string
    - `existing_id` string
    - `reason` string
    - `reason_code` string
    - `matched_fields` string[]
    - `review_candidate` object
    - `errors` string[]
    - `warnings` string[]
  - `next_action` string

---

[API](https://skmtc.dev/declararfacil/apis/declarar-facil-agent-api.md) · [All operations](https://skmtc.dev/declararfacil/apis/declarar-facil-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/declararfacil/apis/declarar-facil-agent-api/revisions/6d6837a48359?raw)
