Skip to main content
Key: es-sii-v1

Sources

Correction Definitions

Auto-generation of corrective invoices or credit and debit notes is supported.

Extension Keys

One or all of the following extensions may be required as part of the correction options. See the Extensions section for possible values.
  • es-sii-doc-type

Extensions

Invoice Type

Code used to identify the type of invoice being sent or received. This will be determined automatically by GOBL during normalization according to the scenario definitions. The following codes are not covered by GOBL’s scenarios and will need to be set manually if needed: F4, F5, F6, R2, R3, R4, AJ, LC. Maps to the TipoFactura field. Values correspond to the L2_EMI (issued invoices) and L2_RECI (received invoices) lists.
CodeName
F1Invoice (Article 6, 7.2 and 7.3 of RD 1619/2012)
F2Simplified invoice (Article 6.1.d) of RD 1619/2012)
F3Invoice issued as replacement of simplified invoice
F4Summary entry of invoices
F5Imports (DUA)
F6Accounting justifications
R1Rectified invoice: articles 80.1, 80.2, and 80.6
R2Rectified invoice: article 80.3
R3Rectified invoice: article 80.4
R4Rectified invoice: other
R5Rectified invoice: simplified invoices
AJProfit margin adjustment
LCCustoms - Complementary settlement

Corrective Invoice Type

Correction type code used to identify the type of correction being made. Code is determined automatically according to the invoice type:
Invoice TypeCode
correctiveS
credit-noteI
debit-noteI
Maps to the TipoRectificativa field. Values correspond to the L5 list.
CodeName
SSubstitution
IDifferences

Exemption Reason

Exemption code used to explain why the operation is exempt from taxes. The follow mappings will be made automatically by GOBL during normalization:
Tax KeyExemption Codes
exemptE1 (default), E6
exportE2 (default), E3, E4
intra-communityE5
Maps to the field CausaExencion. Values correspond to the L9 list. Note: This extension is mutually exclusive with es-sii-outside-scope.
CodeName
E1Exempt pursuant to Art. 20 (internal operations).
E2Exempt pursuant to Art. 21 (exports of goods).
E3Exempt pursuant to Art. 22 (operations asimilated to exports).
E4Exempt pursuant to Art. 23 and 24 (temporary deposit, customs and fiscal regimes, and other situations).
E5Exempt pursuant to Art. 25 (delivery of goods destined to another Member State).
E6Exempt pursuant to other reasons

Type of Operation Outside Scope

Type of operation not subject to VAT. This extension is used to determine which tax amount field should be reported in the SII payload:
  • other will set the ImportePorArticulos7_14_Otros field.
  • location will set the ImporteTAIReglasLocalizacion field.
GOBL will attempt to automatically assign operation type codes based on tax key:
Operation TypeTax Key
otheroutside-scope
locationoutside-scope (default)
Doesn’t map directly to any field. Used internally to determine how to report the tax amount. Note: This extension is mutually exclusive with es-sii-exempt.
CodeName
otherOutside scope - Articles 7, 14, others
locationOutside scope - Due to location rules

Special Regime or Relevance Key

Identify the regime applied to the operation. The regime key must be assigned for each tax combo. If no regime key is provided, GOBL will try to assign a code from the following tax combo contexts:
Combo ContextRegime Code
Key standard01
Key export02
Maps to the field ClaveRegimenEspecialOTrascendencia. Values correspond to the L3.1 (issued invoices) and L3.2 (received invoices) lists.
CodeName
01General regime operation
02Export (L3.1) / Operations for which businesses pay compensation in acquisitions from individuals under the special regime for agriculture, livestock, and fishing (L3.2)
03Special regime for used goods, art objects, antiques and collectibles
04Special regime for investment gold
05Special regime for travel agencies
06Special regime for VAT/IGIC groups (Advanced Level)
07Special cash accounting regime
08Operations subject to IPSI / IGIC (Tax on Production, Services and Imports / Canary Islands General Indirect Tax)
09Billing of travel agency services acting as mediators in name and on behalf of others
10Collection of professional fees or rights on behalf of third parties
11Business premises rental operations
12Business premises rental operations not subject to withholding
13Business premises rental operations subject and not subject to withholding (L3.1) / Invoice corresponding to an import (reported without being associated with a DUA) (L3.2)
14Invoice with pending VAT/IGIC accrual in work certifications for Public Administration (L3.1) / First half of 2017 and other invoices prior to inclusion in the SII (L3.2)
15Invoice with pending VAT/IGIC accrual in successive tract operations
16First half of 2017 and other invoices prior to inclusion in the SII
17Operation covered by one of the regimes provided for in Chapter XI of Title IX (OSS and IOSS)

Identification Type

Identity code used to identify the type of identity document used by the customer. The regular Party Tax Identity is preferred over using a specific identity type code, and will be mapped automatically as follows:
  • Spanish Tax IDs will be mapped to the NIF field.
  • EU Tax IDs will be mapped to the IDOtro\IDType field with code 02.
  • Non-EU Tax IDs will be mapped to the IDOtro\IDType field with code 04.
SII will perform validation on both Spanish and EU Tax IDs, so it is important to provide the correct details. The following identity key values will be mapped automatically to an extension by the addon:
Identity KeyCode
passport03
foreign04
resident05
other06
The 07 “not registered in census” code is not mapped automatically, but can be provided directly if needed. Example identity of a UK passport:
{
	"identities": [
		{
			"key": "passport",
			"country": "GB",
			"code": "123456789"
		}
	]
}
Will be normalized to:
{
	"identities": [
		{
			"key": "passport",
			"country": "GB",
			"code": "123456789",
			"ext": {
				"es-sii-identity-type": "03"
			}
		}
	]
}
Maps to the field IDOtro\IDType. Values correspond to the L4 list.
CodeName
02NIF-VAT Identity (VIES)
03Passport
04Foreign Identity Document
05Residential Certificate
06Other Identity Document
07Not registered in census

Simplified Invoice Art. 7.2 and 7.3, RD 1619/2012

This extension covers a specific use-case when the customer specifically requests that the invoice includes their fiscal details, but they are not registered for tax. Can only be true when the invoice type (TipoFactura) is one of: F1, F3, R1, R2, R3, or R4. Maps to the FacturaSimplificadaArticulos7.2_7.3 field. Values correspond to the L26 list.
CodeName
SYes
NNo

Issued by Third Party or Recipient

Indicates whether the invoice is issued by a third party or by the customer themselves. The default value is N (No). The self-billed tag will automatically set this extension in the invoice to S (Yes). If the issuer field is set in the invoice’s ordering section, then this extension will be set to S (Yes) too. Maps to the field EmitidaPorTercerosODestinatario. Values correspond to the L10 list.
CodeName
SYes
NNo

Product Type

Product type code used to differentiate between goods and services for the purpose of reporting breakdowns in the SII format. This extension is used to determine the type of operation breakdown when generating the SII report. When provided, the value will be used to generate the DesgloseTipoOperacion field, selecting between PrestacionServices (provision of services) or Entrega (delivery of goods). This extension is optional; if not provided, the breakdown will use DesgloseFactura instead of DesgloseTipoOperacion. Doesn’t map directly to any field. Used internally to structure the breakdown data.
CodeName
goodsDelivery of goods
servicesProvision of services