SII Guide
Spain's Suministro Inmediato de Información (SII) is AEAT's real-time invoice reporting system for large businesses. FiscalAPI supports SII as a third Spanish fiscalization system alongside TicketBAI and Verifactu.
What is SII?
SII requires businesses to electronically submit invoice records to AEAT within four calendar days of issuance. Unlike TicketBAI (Basque Country) and Verifactu (nationwide for smaller businesses), SII targets companies with annual revenue of EUR 6 million or more.
Who must use SII?
SII is mandatory for:
- Companies with annual turnover exceeding EUR 6,336,000
- Businesses enrolled in the monthly VAT refund scheme (REDEME)
- Groups filing consolidated VAT returns (grupos de IVA)
- Businesses that voluntarily opt in
SII vs TicketBAI vs Verifactu
| Feature | SII | TicketBAI | Verifactu |
|---|---|---|---|
| Scope | Large businesses (>=EUR 6M) | Basque Country only | Rest of Spain |
| Authority | AEAT (national) | Regional tax authorities | AEAT (national) |
| Protocol | SOAP 1.1 | XML POST / LROE | SOAP 1.1 |
| Authentication | Mutual TLS (qualified certificate) | Client certificate | Mutual TLS |
| Submission window | 4 calendar days | Real-time | Real-time |
| Invoice chaining | No | Yes (XAdES-EPES) | Yes (SHA-256) |
Book types (Libros Registro)
SII organizes invoice data into four books:
| Book | Spanish name | Description |
|---|---|---|
| Issued invoices | Libro de Facturas Expedidas | Invoices you issue to customers |
| Received invoices | Libro de Facturas Recibidas | Invoices you receive from suppliers |
| Investment goods | Libro de Bienes de Inversión | Capital asset acquisitions |
| Intra-community operations | Libro de Operaciones Intracomunitarias | Cross-border EU transactions |
FiscalAPI currently supports the issued invoices and received invoices books, which cover the vast majority of SII submissions.
Configuration
Country config fields
| Field | Type | Required | Description |
|---|---|---|---|
system | string | Yes | Must be "sii" |
nif | string | Yes | Spanish tax ID (NIF/CIF) of the obligated party |
legal_name | string | Yes | Full legal name (razón social) |
certificate_id | string | Yes | Reference to an uploaded certificate for mutual TLS |
Configuration example
curl -X POST https://api.fiscalapi.com/v1/locations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer fsk_test_abc123def456..." \
-d '{
"name": "Madrid HQ",
"country": "ES",
"address": "Calle de Alcalá 50, 28014 Madrid",
"tax_id": "A12345674",
"country_config": {
"system": "sii",
"nif": "A12345674",
"legal_name": "Gran Empresa SL",
"certificate_id": "spain-sii-prod-2026"
}
}'
Submission flow
Issued invoices (Facturas Expedidas)
- Transaction is created via
POST /v1/transactions - FiscalAPI builds a SOAP envelope with the invoice record (RegistroLRFacturasEmitidas)
- Envelope is submitted to AEAT via mutual TLS
- AEAT responds with an
EstadoEnvio(Correcto, Incorrecto, ParcialmenteCorrecto) - On success,
fiscal_idis set to the CSV (Código Seguro de Verificación) - Transaction status transitions to
success
Cancellations (Baja)
Voiding a transaction submits a cancellation record (TipoComunicacion = A4) to the same issued invoices endpoint.
Received invoices (Facturas Recibidas)
To submit a received invoice, set "book_type": "received" in the transaction metadata along with the counterparty details.
Transaction metadata
SII transactions accept optional metadata fields to control invoice details. All fields are optional -- FiscalAPI applies sensible defaults when omitted.
Metadata fields
| Field | Type | Default | Description |
|---|---|---|---|
invoice_number | string | Transaction ID | Invoice number (NumSerieFacturaEmisor) |
series | string | -- | Optional series prefix prepended to invoice number |
issue_date | string | Current date | Invoice date in DD-MM-YYYY format |
description | string | Auto-generated | Operation description (DescripcionOperacion) |
regime_key | string | "01" (general) | Special regime key (ClaveRegimenEspecialOTrascendencia) |
exercise | string | Current year | Fiscal year (Ejercicio) |
period | string | Current month | Tax period: "01"--"12" or "0A" for annual |
simplified | boolean | false | If true, generates an F2 simplified invoice |
book_type | string | "issued" | "issued" or "received" |
Counterparty fields
Required for standard (F1) invoices. Omit for simplified (F2) invoices.
| Field | Type | Description |
|---|---|---|
counterparty_nif | string | Counterparty NIF (domestic) |
counterparty_name | string | Counterparty legal name |
counterparty_id_type | string | Foreign ID document type ("02" = VAT number, "04" = passport) |
counterparty_country | string | ISO 3166-1 alpha-2 country code |
counterparty_id | string | Foreign identifier value |
Credit note fields
| Field | Type | Description |
|---|---|---|
original_invoice_number | string | Number of the invoice being corrected |
original_issue_date | string | DD-MM-YYYY of the original invoice |
Example: standard issued invoice
curl -X POST https://api.fiscalapi.com/v1/transactions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer fsk_test_abc123def456..." \
-d '{
"location_id": "loc_madrid_hq",
"type": "sale",
"amount": 121000,
"currency": "EUR",
"items": [
{
"description": "Consulting services",
"quantity": 1,
"unit_price": 100000,
"total_amount": 121000,
"tax_rate": 2100,
"tax_amount": 21000
}
],
"metadata": {
"invoice_number": "FA-2026/001",
"series": "A-",
"issue_date": "13-03-2026",
"description": "Consulting services Q1 2026",
"regime_key": "01",
"counterparty_nif": "B99999999",
"counterparty_name": "Acme Consulting SL"
}
}'
Example: credit note (refund)
curl -X POST https://api.fiscalapi.com/v1/transactions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer fsk_test_abc123def456..." \
-d '{
"location_id": "loc_madrid_hq",
"type": "refund",
"amount": -121000,
"currency": "EUR",
"items": [
{
"description": "Consulting services - correction",
"quantity": 1,
"unit_price": -100000,
"total_amount": -121000,
"tax_rate": 2100,
"tax_amount": -21000
}
],
"metadata": {
"invoice_number": "RA-2026/001",
"issue_date": "13-03-2026",
"description": "Rectificación FA-2026/001",
"counterparty_nif": "B99999999",
"counterparty_name": "Acme Consulting SL",
"original_invoice_number": "A-FA-2026/001",
"original_issue_date": "10-03-2026"
}
}'
Invoice types
| Code | Name | When to use |
|---|---|---|
| F1 | Factura | Standard invoice (default for sale transactions) |
| F2 | Factura simplificada | Simplified invoice (set "simplified": true) |
| R1 | Factura rectificativa | Credit note (automatic for refund transactions) |
Regime keys
The regime_key metadata field maps to AEAT's ClaveRegimenEspecialOTrascendencia. Common values:
| Key | Description |
|---|---|
01 | General regime (default) |
02 | Export |
03 | Special regime for used goods |
05 | Travel agencies |
07 | Special cash accounting regime |
09 | Intra-community acquisitions |
AEAT endpoints
SII communicates with AEAT via SOAP 1.1 over mutual TLS.
Production
| Book | URL |
|---|---|
| Issued invoices | https://www1.agenciatributaria.gob.es/wlpl/SSII-FACT/ws/fe/SiiFactFEV2SOAP |
| Received invoices | https://www1.agenciatributaria.gob.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV2SOAP |
Sandbox
| Book | URL |
|---|---|
| Issued invoices | https://prewww1.aeat.es/wlpl/SSII-FACT/ws/fe/SiiFactFEV2SOAP |
| Received invoices | https://prewww1.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV2SOAP |
Sandbox endpoints accept test submissions without affecting real tax records. Set test_mode: true on transactions to use the sandbox.
Submission deadline
Invoices must be reported to SII within four calendar days of the invoice issue date (or the accounting date for received invoices). Sundays and national holidays do not count toward this deadline.
FiscalAPI submits invoices to AEAT in real-time when the transaction is created, so you meet the deadline as long as you create the transaction within the four-day window.
Error handling
AEAT responds with one of three statuses:
| Status | Meaning | FiscalAPI mapping |
|---|---|---|
Correcto | All records accepted | success |
ParcialmenteCorrecto | Some records accepted, some rejected | partial |
Incorrecto | All records rejected | failed |
Per-record errors include an error code and description. These are surfaced as warnings in the transaction response. Common errors:
- 1106: Invalid NIF
- 2000: Duplicate invoice (already registered)
- 3000: XML schema validation error
Certificate setup
SII requires a qualified electronic certificate for mutual TLS authentication with AEAT. Upload your certificate through the certificates API:
curl -X POST https://api.fiscalapi.com/v1/certificates \
-H "Authorization: Bearer fsk_test_abc123def456..." \
-F "name=spain-sii-prod-2026" \
-F "type=pkcs12" \
-F "file=@certificate.p12" \
-F "password=cert-password"
Then reference the certificate ID in your location's country_config.certificate_id.