How to obtain the EORI?
If the company is Spanish, whose NIF begins with A or B, the VAT NIF must match your EORI number. The Spanish Administration registers a large part of the applicant companies in the EORI database. The process is automatic in the office for legal entities that are a Anonymous Society or Limited Society.
However, there are Spanish NIFs that do not have EORI identification, so it is advisable to check the validity of the Spanish EORI number on the official website of the European Union.