Skip to content

Spain Address Standard

Overview

A Spanish address puts the building number on the street line and, behind it, a small code for the position inside the building: Calle Mayor, 12, 3º Izda. reads as number 12, third floor, left-hand door. That tail, together with an address that may have no number at all (s/n) and a street type that changes with the language of the region, is where Spanish addresses are most often damaged.

This article describes the Spanish address format, how CDQ represents it in the CDQ address model, how the floor and the door are delivered, how the Canary Islands, Ceuta and Melilla are handled, and which reference data CDQ maintains for Spain. It is the reference for anyone mapping Spanish business partner data into CDQ, or consuming curated Spanish addresses from CDQ.

In this article, you will understand:

  • How a Spanish address is structured, and what the part after the house number means
  • Which administrative levels are written on an address, and which one an SAP region field is keyed on
  • How each Spanish level maps to a concept in the CDQ address model, and which SAP field it reaches
  • Which output fields receive the floor and the door, and why the door can appear twice
  • Why the Canary Islands, Ceuta and Melilla stay in country ES, and how a customs free zone differs from them
  • Which reference data CDQ maintains for Spain, and where it is incomplete

Available in:


How a Spanish address is built

A Spanish address has the ordinary European shape: a street, a number, a post code and a place. Most of it needs no special handling.

What is specific to Spain is narrower, and it is where integrations actually go wrong:

Specific to SpainWhy it matters
The position inside the building is written on the street line3º Izda. is a floor and a door, and it arrives inside the street value where it corrupts every comparison on that field
An address can legitimately have no numbers/n (sin número) is a complete answer, and it is not a missing value
A road address is a point on a roadCtra. N-II, km 23 names a road and a kilometre, and the N-II is not a house number
The street type follows the language of the regionCalle, Carrer, Rúa and Kalea are the same kind of thing
The first two digits of the post code are the provincethe province is already inside the post code, and a province written on an address is often redundant
Municipality and province names exist in two languagesLleida and Lérida, A Coruña and La Coruña are one place

The administrative levels

Spain has three levels of administrative area below the country, and below them the places an address names. Only the municipality is written on an address.

LevelSpanishWhat it isUsed to address mailExample
1comunidad autónomaautonomous community, 17 of them, plus the autonomous cities Ceuta and Melilla at the same levelnoCataluña
2provinciaprovince, 50 of them, and the first two digits of the post codeno, it is encoded in the post codeBarcelona (08)
3municipiomunicipality, the unit a post code is issued for and the place on the last lineyesSabadell
belowentidad, núcleo, barrioa settlement or neighbourhood inside a municipalityyes, where it is the better known namePoblenou

Ceuta and Melilla are autonomous cities rather than communities, and each is also its own postal province: post code numbers 51 and 52 follow the 50 provinces numbered 01 to 50, so the full range is 01 to 52. A province and a community can also share a name, as Madrid, Murcia and Asturias do, because those communities consist of one province.

The levels that are not written on an address are still business data. The province is the level an SAP region field is keyed on and the level reporting is cut by, and the community is the level at which regional legislation and registers apply. The province is the cheaper of the two to obtain, because it is the first two digits of the post code.

The postal address

Empresa Ejemplo, S.L.
Calle Mayor, 12, 3º Izda.
28013 MADRID

The street type comes first, then the name, a comma and the number, then the floor and the door. The post code precedes the municipality on the last line, and the province is optional.

The part after the number

3º Izda. is not a suffix on the house number. It is two separate facts, and the building can have more levels of its own before them:

WrittenSpanishMeans
3º, Planta 3piso or plantathe floor
Bajo, Bj.bajothe ground floor
Entlo.entresuelothe mezzanine above the ground floor
Pral.principalthe first floor of an older building
Áticoáticothe top floor
Izda., Izq.izquierdathe left-hand door on that floor
Dcha., Der.derechathe right-hand door
Centrocentrothe middle door
A, B, 1ªletra or número de puertathe door, where there are more than two per floor
Esc.escalerathe staircase, in a building with several
Portal, Bloqueportal, bloquethe entrance and the block of a development
Local, Navelocal, navea commercial unit or a warehouse in an industrial area

So Calle Mayor, 12, Esc. 2, 3º Izda. reads: number 12 on Calle Mayor, staircase 2, third floor, left-hand door.

Izda and Dcha are not part of the street name

Izquierda and Derecha describe which door you knock on. Left in the street field they turn Calle Mayor into Calle Mayor 3 Izda, which matches nothing, and two flats in one building become two different streets. They are premises and belong in premises fields.

Roads, industrial estates and boxes

No number. Calle Mayor, s/n means the address has no number. It is a statement, and it is kept as one rather than read as a missing house number.

A kilometre on a road. Out of town the address is a point on a road: Ctra. N-II, km 23, Autovía A-6, km 18,5. The road designation (N-II, A-6, M-40) is part of the road name and the kilometre takes the place of the number. N-II is never a house number.

An industrial estate. Polígono Industrial Las Mercedes, Nave 14 has no street. The estate is an area, and the unit inside it is a warehouse or a plot.

A post office box. Apartado de Correos 123 replaces the street, and the post code is the one of the post office.


How CDQ models a Spanish address

The CDQ address model has two parallel hierarchies. Administrative areas represent the political containers, typed REGION and COUNTY. Localities represent the places themselves, typed CITY, DISTRICT, QUARTER or BLOCK. Streets are held as thoroughfares with the number in its own field, and the position inside the building as typed premises.

Spain maps as follows:

Spanish levelCDQ conceptTypeSAP field
comunidad autónoma, ciudad autónomaadministrative area, level 1REGIONregion
provinciaadministrative area, level 2COUNTYcounty
municipiolocality, level 1CITYcity
entidad, núcleolocality, level 2DISTRICTdistrict
barriolocalityQUARTERdistrict
polígono industrialthoroughfareINDUSTRIAL_ZONEappended to district
street type and namethoroughfareSTREETstreet
number, or s/nthoroughfare numbern/ahouse number, HOUSE_NUM1
piso, plantapremiseLEVELfloor
puerta, izquierda, derecha, letrapremiseDOORhouse number supplement, HOUSE_NUM2, and room number
apartamentopremiseAPARTMENThouse number supplement, HOUSE_NUM2, and room number
bloque, edificio, navepremiseBUILDINGbuilding
apartado de correospostal delivery pointPOST_OFFICE_BOXPO box
código postalpost codeREGULARpost code

Why the door goes to the house number supplement

SAP reserves a second house number field, HOUSE_NUM2, for the Iberian and Latin American convention of a supplement to the house number. Spain is one of the five countries for which CDQ fills it, with Portugal, Brazil, Mexico and Argentina. What goes in there is the door, and the floor goes to the dedicated floor field, because SAP has one and because the floor is a different fact from the door.

Three details of today's delivery are worth knowing:

  • Which premises reach HOUSE_NUM2. The premises typed room, door and apartment, in that order, joined by a comma when more than one is present. A floor is never part of it.
  • The door is delivered twice. The SAP room number field takes the first of room, door and apartment as well, so the same value is in the house number supplement and in the room number. A consumer that reads both fields sees one door, not two.
  • The floor stays in its own field. Only a premise typed LEVEL reaches the floor field, which is why a floor that was not recognised as one stays in the street value.

So 12, 3º Izda. is delivered as:

Output fieldValue
house number, HOUSE_NUM112
floor3º
house number supplement, HOUSE_NUM2Izda.
room numberIzda.
Why not keep the whole thing in the house number

12 3º Izda. answers two different questions in one field: which building on the street, and which unit inside that building. Splitting them is what makes either question answerable on its own.

Keeping them together fails in both directions at once. An exact comparison on street and number stops recognising that a partner at 12 3º Izda. and a partner at 12 4º Dcha. are in the same building, which is what site consolidation and hierarchy detection look for. A fuzzy comparison has the opposite problem: most of the characters agree, so it reads them as near identical and can treat two different flats as one partner.

Rejected alternatives

Rejected alternativeWhy
Treat Izda. and Dcha. as part of the street nameIt is where they arrive, and it is the thing that has to be corrected. A street is a line on the ground shared by every building on it; a door is a property of one flat.
Put the floor in the house number supplement together with the doorThe supplement is one field, and packing two facts into it recreates the problem it exists to solve. SAP has a floor field, and it takes the floor.
Read s/n as an empty house numberAn empty value says the number was lost. s/n says there is none. The two are different findings, and only the first is a defect.

The Canary Islands, Ceuta and Melilla

These three territories are part of Spain and are addressed as Spain. The address stays country ES, with the Canary Islands as the community ES-CN and the provinces Las Palmas (ES-GC) and Santa Cruz de Tenerife (ES-TF), and with the autonomous cities ES-CE and ES-ML as the region. Their post codes follow the national numbering: 35 and 38 for the two Canary provinces, 51 for Ceuta and 52 for Melilla.

What sets them apart is tax, not address. The Canary Islands, Ceuta and Melilla are outside the EU VAT area, and they apply their own indirect taxes instead (IGIC in the Canary Islands, IPSI in Ceuta and Melilla). That is a property of the region, so it travels with the region and with no change to the country.

The codes IC (Canary Islands) and EA (Ceuta and Melilla) exist only as exceptional reservations in ISO 3166-1, requested by the World Customs Organization, and are not officially assigned country codes. The standard treats them as input forms of ES with the matching region, and never as a country to deliver. The conversion is not yet in place: see Current limitations.

A customs free zone is not a special territory

The Zona Franca de Barcelona, Vigo or Cádiz is an area inside a municipality. It is address content, an area or industrial zone name, and changes nothing about the country or the region. A partner in the Zona Franca de Barcelona is an ES address in the province of Barcelona, inside the EU VAT area. Do not confuse it with the three territories above, which are outside the VAT area as a whole.

Mapping the region to an SAP region key

CDQ delivers the province and the community with their ISO 3166-2 codes. An SAP system does not validate against ISO: it validates the region field against its own region key table, T005S, which is part of a customer's configuration. That key exists for tax and jurisdiction purposes, which is why it follows national tax or statistical numbering rather than ISO, and why the level it sits at differs from one country to the next.

The region key is customer-specific configuration, so this standard does not define one: a T005S is specific to a customer and to a client, and no single value would be correct everywhere. What this standard fixes is the ISO 3166-2 code. The mapping from it to the key your system expects is yours to maintain.

For Spain the key your configuration holds is conventionally the province number, the two digits that open the post code, so it sits one level below the community. The Canary Islands, Ceuta and Melilla are ordinary entries in that table under country ES, with the numbers of their provinces and cities. A Spanish address reaching SAP therefore needs the province, which CDQ delivers as administrative area level 2, and the community has no key of its own to map to. Where a community consists of one province, the two share the key.

Treat the ISO code as the value CDQ guarantees and the SAP key as a mapping you own. Confirm which level your configuration uses before deciding which CDQ field feeds it.

Worked example

Calle Mayor, 12, 3º Izda., 08201 Sabadell, in the CDQ address model:

FieldValue
CountryES
Administrative area 1 (REGION)Cataluña
Administrative area 1 codeES-CT
Administrative area 2 (COUNTY)Barcelona
Administrative area 2 codeES-B
Locality 1 (CITY)Sabadell
Thoroughfare (STREET)Calle Mayor
Thoroughfare number12
Premise (LEVEL)3º
Premise (DOOR)Izda.
Post code08201

Reference data CDQ maintains for Spain

These tables are extracts

The examples below show the shape of each dataset, not its full contents. The complete published lists for Spain are on the CDQ Wiki page business partner metadata for Spain, which also covers legal forms, identifier types and the integrated data sources.

Autonomous communities and cities

19 entries: the 17 autonomous communities, Ceuta and Melilla. Each carries its ISO 3166-2 code and names in Spanish, English, German, French, Catalan, Basque, Galician, Occitan and Chinese.

CodeSpanishEnglishAlso matched as
ES-ANAndalucíaAndalusiaAndalucia
ES-CTCataluñaCataloniaCatalunya
ES-PVPaís VascoBasque CountryEuskal Autonomia Erkidegoa
ES-CNCanariasCanary IslandsIslas Canarias
ES-CECeutaCeutaAutonomous City of Ceuta

Provinces

50 entries, held as administrative area level 2 and each linked to its community. Ceuta and Melilla are not repeated here: they are the autonomous cities of the table above. The province code is the ISO code, which is a letter code and not the postal number.

CodeCommunityName
ES-MES-MDMadrid
ES-BES-CTBarcelona
ES-GCES-CNLas Palmas
ES-TFES-CNSanta Cruz de Tenerife
ES-SSES-PVGipuzkoa

The 50 are spread unevenly: Castilla y León has nine, Andalusia eight, and seven communities have one.

Address terms

10 entries, covering four street words, three post office box words and a door word. This is the smallest vocabulary of the countries described in this series.

IdentifiesTermAbbreviation
StreetCalleC/
StreetCarrerC/
StreetAvenidaAv.
StreetCarreteraCtra
Post office boxApartado de CorreosApdo. Correos
Post office boxApartado postalnone
DoorPuertanone

Where a term is recognised, the expanded form is written to the thoroughfare value and the abbreviated form to the thoroughfare short name, and the short name is what the SAP street line takes.

Post code format

Five digits, the first two being the province number from 01 to 52. Separators between the last three digits are tolerated by the published format.

What CDQ standardises

The community and the province are standardised against reference data: whether they arrive in Spanish, English or a co-official language, the canonical name and the ISO code are written back.

Street terms are recognised in the street text and rewritten to the abbreviation, so Avenida and Av. produce the same delivered value.

Post codes are validated against the five digit format.

The municipality and the levels below it are preserved as submitted. Where an address provider is enabled, it can enrich and complete them.


Current limitations

These are the gaps worth knowing about before designing an integration.

LimitationWhat it means for an integration
The Spanish premises vocabulary is almost emptyApart from Puerta, none of the words that carry the floor and the door (Planta, Piso, Bajo, Izda., Dcha., Esc.) is published as reference data. A floor and a door arriving inside the street value stay there: they are never discarded, but the floor field and the house number supplement can be empty for an address that clearly has both. This is the single most important thing to know before loading Spanish addresses.
IC and EA are not yet converted to ESA record supplied with the country IC or EA is not converted to ES today. Supply these addresses as ES with the province or the autonomous city, which is also what an SAP system expects.
The street vocabulary is shortCalle, Carrer, Avenida and Carretera are published; Plaza, Paseo, Camino, Ronda, Travesía and the Galician and Basque types Rúa and Kalea are not yet. Where a type is not published, the street is preserved exactly as submitted and no short name is produced.
Some province names carry the co-official name inside the valueSeveral Catalan, Galician and Basque provinces are published with the language tag and the Spanish name inside the name value, for example Illes Balears (ca) [Islas Baleares]. A name that arrives without those additions can fail to match the published one, so confirm that your province values resolve before relying on the SAP mapping.
The SAP region key cannot be held at province levelThe reference data carries a default SAP key only at community level, and for one community only. Provinces have no such field, so the province number your configuration expects is yours to supply.
The community and the province are standardised, and not derivedOne that arrives is matched against reference data and completed. One that is absent stays absent, because CDQ standardises a supplied value rather than deriving one from the post code. Since neither level is part of a Spanish postal address, absent is the normal case, and the first two digits of the post code give the province from your own side.
s/n and kilometre addresses have no reference data of their ownThey are carried as supplied. They are kept, but nothing yet checks that an address without a number is intended.
Check the street field before you load Spain

Until the Spanish premises vocabulary is published, the position inside the building generally arrives in the street value and stays there. Before an SAP load, check the street values of your Spanish records for a trailing floor and door, and expect the floor field and the house number supplement to be empty. Where your source already holds the floor and the door in their own fields, supply them that way and they will reach the right output fields.


Summary

A Spanish address writes the street type first, the number after a comma, and then the floor and the door, which are separate facts. It can have no number at all (s/n), and out of town it is a kilometre on a road. The province is the first two digits of the post code.

Of the Spanish levels below the country, only the municipality is written on an address. The community and the province are carried because a company is registered in a province, because an SAP region field is conventionally keyed on the province number, and because reporting is cut by both.

CDQ places the community in administrative area level 1 and the province in level 2, the municipality in locality level 1. The building number goes to the house number, the floor to the floor field, and the door to the house number supplement, which is the field SAP reserves for it in Spain, and to the room number as well. The Canary Islands, Ceuta and Melilla stay in country ES and carry their special tax status through their region, while a customs free zone is only a place inside a municipality.

The 19 communities and cities and the 50 provinces are maintained as CDQ reference data, with a short street vocabulary of 10 terms. The premises vocabulary is where the current coverage is weakest, and it is the part a Spanish address depends on most.



Your opinion matters!

We are constantly working on providing an outstanding user experience with our products. Please share your opinion about this tutorial!