Examples of sending invoices to the SII with the API
Here are 27 examples of sending issued invoices to the SII, one per invoice type or key (full, simplified, corrective, intra-EU, exports, exempt, IGIC or IPSI, summary entries, rentals, VAT groups, modification and cancellation), with the JSON request to the Verifacti SII API ready to copy.
SII invoice types and keys
| Case | Invoice type or key | When to use it |
|---|---|---|
| Full invoice | F1 · clave 01 | Ordinary invoice to a customer with a Spanish NIF. |
| Simplified invoice | F2 · clave 01 | Receipts and simplified invoices, with no recipient details. |
| Several VAT rates | F1 · S1 con varios tipos | Invoice with lines at 21%, 10% and 4%. |
| Intra-EU B2B goods | F1 · entrega exenta E5 | Sale of goods to a business in another Member State. |
| Intra-EU B2B services | F1 · prestacion_servicios no sujeta | Service to a business in another Member State. |
| Intra-EU B2C below the threshold | F1 · entrega S1 | Distance sale to a consumer in another Member State while EU-wide distance sales and TBE services stay under €10,000 a year. |
| Intra-EU B2C with OSS | F1 · clave 17 | Sale to a consumer in another Member State declared through the One-Stop Shop (OSS). |
| Export of goods | F1 · clave 02 · exenta E2 | Sale of goods to a customer outside the EU. |
| Services outside the EU | F1 · prestacion_servicios no sujeta | Service to a customer in a non-EU country. |
| Exempt invoice | F1 · exenta E1 | Subject and exempt operation, such as those under art. 20 LIVA. |
| Operation not subject to VAT | F1 · no sujeta | Operation outside the scope of VAT. |
| IGIC or IPSI | F1 · clave 08 | Operations located in the Canary Islands, Ceuta or Melilla that are subject to IGIC or IPSI rather than VAT (for example, services deemed supplied there). Shipments of goods from the mainland to those territories are exports: key 02 and exempt E2. |
| Credit note | F1 con importes negativos | A new invoice with a negative amount that does not correct another invoice. Returns and later discounts on an invoice already issued go in an R1 corrective invoice. |
| Exchange invoice | F3 · facturas_sustituidas | When the customer asks for a full invoice instead of the receipt. |
| Corrective invoices | R1–R5 | Correcting an invoice already issued. |
| ↳ By replacement | R1 · tipo_rectificativa S | The corrective invoice fully replaces the original one. |
| ↳ By differences | R1 · tipo_rectificativa I | Only the difference in amounts is corrected. |
| Equivalence surcharge | F1 · S1 con recargo | Sale to a retailer under the equivalence surcharge scheme. |
| Issued by third parties or recipient | especial.emitida_por_tercero_o_destinatario S | Third-party invoicing or self-billing. |
| REBU | F1 · clave 03 | Sale of second-hand goods, works of art, antiques or collectors’ items. |
| Reverse charge | F1 · S2 | Operations where the customer is the taxable person. |
| Summary entry | F4 · numero_fin | Many receipts from the same day, numbered consecutively. |
| Cash accounting | F1 · clave 07 | Whoever applies the special cash accounting scheme. |
| Business premises rental | F1 · clave 12 · inmuebles | Rental of business premises. |
| Group of entities | F1 · clave 06 · base_imponible_a_coste | Operations between entities of a VAT group at advanced level. |
| Modification | A1 | Correcting an invoice that is Correcto, Aceptado con errores or Duplicado. |
| Cancellation | — | Removing an invoice registered in the SII. |
What an SII example looks like
Each case comes with the JSON request to the SII API, with tabs for cURL, Python, JavaScript, Node.js, PHP, Go, Java, C# and VB6. Dates, ejercicio and periodo are already today’s: copy it and try it with the test API key of the SII test NIF, which you request from soporte@verifacti.com with your free account.
New records are sent with POST /sii/create. An invoice the AEAT has already registered is corrected with PUT /sii/modify and cancelled with POST /sii/cancel.
The SII API sends the record book of issued invoices: all the examples are issued invoices.
Questions about the examples
FAQ SIIWhich book does the SII API send?
The issued-invoices record book, and only that one. The SII API does not send received invoices or the other SII books. Which books exist and who keeps them is in SII record books.
Can I test the SII without sending real data?
Yes. The free account includes the SII test environment; you request the SII test NIF from soporte@verifacti.com. There are requests ready to copy in the SII examples.
How do I get the AEAT’s response?
Through a webhook or by checking the status. When the AEAT replies, Verifacti updates the record’s status: you receive it in your webhooks or check it with GET /sii/status. The possible statuses (Correcto, Aceptado con errores, Incorrecto…) are in the documentation.
How do I modify or cancel a record?
With PUT /sii/modify to modify a record (for example, one Aceptado con errores) and with POST /sii/cancel to cancel it. If the AEAT rejected it (Incorrecto), it was not registered: fix the data and send it again with /sii/create. Examples in modification and cancellation.
Try the examples in the test environment
Create your free account, ask soporte@verifacti.com for an SII test NIF and send any of these requests with its test API key.