{
  "$schema": "https://govschema.org/spec/v0.3/govschema.schema.json",
  "govschemaVersion": "0.3.0",
  "id": "es/maec/solicitud-visado-nacional",
  "version": "1.0.0",
  "title": "Spain National (Long-Stay) Visa Application",
  "description": "Give the details for Spain's national (long-stay, Type D) visa application: the visa a non-EU/EEA/Swiss national needs before travelling to Spain for a stay exceeding the 90-day Schengen short-stay limit, for purposes including residence without a work permit, family reunification, employed or self-employed work, seasonal work, investment/entrepreneurship, study, internship, research, residence recovery, or accreditation. This document models the Ministerio de Asuntos Exteriores, Unión Europea y Cooperación's (MAEC) own 'Solicitud de visado nacional' / 'Application for a national visa' form, filed at the Spanish consulate with jurisdiction over the applicant's place of residence. The form's opening identity block (items 1-9) follows the same Schengen-harmonized personal-data numbering convention shared with Spain's own Schengen short-stay visa form and other EU member states' visa forms, but the remainder of the form (items 10-30) is genuinely Spain-specific: an 11-category residence-purpose taxonomy distinct from any other national visa form already in this registry, and three purpose-conditional data blocks (family-reunification sponsor, employer/company, educational establishment) with no counterpart in Germany's already-modelled de/auswaertiges-amt/national-visa-application (see VERIFICATION.md for the full field-by-field duplicate-detection comparison). It does not model Spain's own Schengen (Type C) short-stay visa form, a confirmed field-for-field duplicate of the already-modelled fr/france-visas/schengen-visa-application, nor any purpose-specific supplementary annex (e.g. an investor/entrepreneur visa's own economic-activity plan, or a specific bilateral working-holiday agreement) a consulate may request in addition to this base form for a given purpose. It does not submit the application; the live source is always authoritative.",
  "status": "draft",
  "jurisdiction": {
    "country": "ES",
    "level": "national"
  },
  "authority": {
    "name": "Ministerio de Asuntos Exteriores, Unión Europea y Cooperación",
    "abbreviation": "MAEC",
    "url": "https://www.exteriores.gob.es"
  },
  "process": {
    "type": "application",
    "language": "es"
  },
  "source": {
    "url": "https://www.exteriores.gob.es/DocumentosAuxiliaresSC/M%C3%A9xico/M%C3%89XICO%20(C)/VIS/SolicitudVisadoNacional_ES.pdf",
    "retrievedAt": "2026-07-08",
    "documentRef": "Solicitud de visado nacional / Application for a national visa (Spanish national long-stay visa application form, hosted directly by the Ministerio de Asuntos Exteriores and mirrored, byte-for-byte identical in content, across dozens of Spanish consulates' own subdomains worldwide)"
  },
  "verification": {
    "method": "manual-source-review-v1",
    "lastVerifiedAt": "2026-07-08",
    "verifiedBy": "GovSchema Engineering (Standards Engineer)",
    "nextReviewBy": "2027-01-08",
    "notes": "GOV-1861: GovSchema Standard Research cycle, closing Spain's own explicitly-flagged 'open, unscreened backlog candidate' Visa gap (5th of 6 verticals). This cycle independently re-examined a prior cycle's (GOV-1652) screening note, which had characterized this same form as a field-for-field duplicate of de/auswaertiges-amt/national-visa-application and set it aside; a fresh, direct field-by-field re-comparison against both the DE schema's own committed field list and the DE source PDF's own full text (fetched and re-extracted this cycle) found the two forms diverge sharply past their shared ~9-item Schengen-harmonized identity block -- the German form has no counterpart at all for this form's residence-purpose taxonomy or its family-reunification-sponsor, employer/company, or educational-establishment blocks, while the German form's own spouse/children/parents/previous-Germany-stays/health/criminal-history sections have no counterpart here. See VERIFICATION.md for the full side-by-side comparison. Authored on the corrected finding that this is a genuine, non-duplicate candidate."
  },
  "maturity": {
    "level": "structural-reference",
    "criteria": {
      "structuralReference": true,
      "verifiedSchema": false,
      "agentReadySchema": false,
      "executionTestedSchema": false
    },
    "method": "maturity-self-assessment-v1",
    "assertedBy": "GovSchema Engineering (Standards Engineer)",
    "assertedAt": "2026-07-08"
  },
  "license": "CC-BY-4.0",
  "fields": [
    {
      "name": "surname",
      "label": "Apellido(s) / Surname(s)",
      "type": "string",
      "required": true,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 1",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "surnameAtBirth",
      "label": "Apellido(s) de nacimiento [apellido(s) anterior(es)] / Surname at birth (former surname(s))",
      "type": "string",
      "required": false,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 2",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "firstNames",
      "label": "Nombre(s) / First name(s)",
      "type": "string",
      "required": true,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 3",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "dateOfBirth",
      "label": "Fecha de nacimiento (día-mes-año) / Date of birth",
      "type": "date",
      "required": true,
      "classification": "sensitive-pii",
      "sourceRef": "Solicitud de visado nacional -- item 4"
    },
    {
      "name": "placeOfBirth",
      "label": "Lugar de nacimiento / Place of birth",
      "type": "string",
      "required": true,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 5",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "countryOfBirth",
      "label": "País de nacimiento / Country of birth",
      "type": "string",
      "required": true,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 6",
      "validation": {
        "maxLength": 100
      }
    },
    {
      "name": "currentNationality",
      "label": "Nacionalidad actual / Current nationality",
      "type": "string",
      "required": true,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 7",
      "validation": {
        "maxLength": 100
      }
    },
    {
      "name": "nationalityAtBirth",
      "label": "Nacionalidad de nacimiento, si difiere de la actual / Nationality at birth, if different",
      "type": "string",
      "required": false,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 7",
      "validation": {
        "maxLength": 100
      }
    },
    {
      "name": "otherNationalities",
      "label": "Otras nacionalidades / Other nationalities",
      "type": "string",
      "required": false,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 7",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "sex",
      "label": "Sexo / Sex",
      "type": "enum",
      "required": true,
      "sourceRef": "Solicitud de visado nacional -- item 8",
      "validation": {
        "enum": [
          "male",
          "female"
        ]
      }
    },
    {
      "name": "maritalStatus",
      "label": "Estado civil / Marital status",
      "type": "enum",
      "required": true,
      "description": "The form's own checkbox list: Soltero-a/Single, Casado-a/Married, Unión registrada/Registered union, Separado-a/Separated, Divorciado-a/Divorced, Viudo-a/Widow(er), Otros/Other (with a free-text specify line). These are seven independent AcroForm checkbox widgets, not a native radio-button group; modelled as a single enum since the form's own layout presents them as one mutually exclusive choice, per this registry's established convention for this widget class.",
      "sourceRef": "Solicitud de visado nacional -- item 9",
      "validation": {
        "enum": [
          "single",
          "married",
          "registered-partnership",
          "separated",
          "divorced",
          "widowed",
          "other"
        ]
      }
    },
    {
      "name": "otherMaritalStatusDetails",
      "label": "Estado civil -- Otros (especifíquese) / Marital status -- other (please specify)",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "maritalStatus",
        "equals": "other"
      },
      "sourceRef": "Solicitud de visado nacional -- item 9",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "guardianDetails",
      "label": "En caso de menores de edad: persona que ejerce la patria potestad o tutor legal / In the case of minors: parental authority or legal guardian (surname, first name, address if different from applicant's, phone number, e-mail address and nationality)",
      "type": "string",
      "required": false,
      "classification": "pii",
      "description": "A single free-text box collecting the legal guardian's full details, applicable only when the applicant is a minor. The form does not itself carry a separate 'is the applicant a minor?' checkbox to gate this field on, so it is left ungated rather than fabricating a condition the source does not state.",
      "sourceRef": "Solicitud de visado nacional -- item 10",
      "validation": {
        "maxLength": 500
      }
    },
    {
      "name": "nationalIdentityNumber",
      "label": "Número de documento nacional de identidad, si procede / National identity number, where applicable",
      "type": "string",
      "required": false,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 11",
      "validation": {
        "maxLength": 50
      }
    },
    {
      "name": "travelDocumentType",
      "label": "Tipo de documento de viaje / Type of travel document",
      "type": "enum",
      "required": true,
      "description": "The form's own checkbox list: Pasaporte ordinario/Ordinary passport, Pasaporte diplomático/Diplomatic passport, Pasaporte de servicio/Service passport, Pasaporte oficial/Official passport, Pasaporte especial/Special passport, Otro documento de viaje/Other (with a free-text specify line). Six independent AcroForm checkbox widgets, modelled as one enum per the same convention noted on maritalStatus.",
      "sourceRef": "Solicitud de visado nacional -- item 12",
      "validation": {
        "enum": [
          "ordinary-passport",
          "diplomatic-passport",
          "service-passport",
          "official-passport",
          "special-passport",
          "other"
        ]
      }
    },
    {
      "name": "otherTravelDocumentTypeDetails",
      "label": "Otro documento de viaje (especifíquese) / Other travel document (please specify)",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "travelDocumentType",
        "equals": "other"
      },
      "sourceRef": "Solicitud de visado nacional -- item 12",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "travelDocumentNumber",
      "label": "Número del documento de viaje / Number of travel document",
      "type": "string",
      "required": true,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 13",
      "validation": {
        "maxLength": 50
      }
    },
    {
      "name": "travelDocumentDateOfIssue",
      "label": "Fecha de expedición / Date of issue",
      "type": "date",
      "required": true,
      "sourceRef": "Solicitud de visado nacional -- item 14"
    },
    {
      "name": "travelDocumentValidUntil",
      "label": "Válido hasta / Valid until",
      "type": "date",
      "required": true,
      "sourceRef": "Solicitud de visado nacional -- item 15"
    },
    {
      "name": "travelDocumentIssuedBy",
      "label": "Expedido por (país) / Issued by (country)",
      "type": "string",
      "required": true,
      "sourceRef": "Solicitud de visado nacional -- item 16",
      "validation": {
        "maxLength": 100
      }
    },
    {
      "name": "homeAddressAndEmail",
      "label": "Domicilio postal y dirección de correo electrónico del solicitante / Applicant's home address and e-mail address",
      "type": "string",
      "required": true,
      "classification": "pii",
      "description": "The source presents postal address and e-mail address as a single combined free-text box (one AcroForm field), not two separate boxes; modelled as one field rather than splitting a structure the source itself does not split.",
      "sourceRef": "Solicitud de visado nacional -- item 17",
      "validation": {
        "maxLength": 400
      }
    },
    {
      "name": "phoneNumbers",
      "label": "Número(s) de teléfono / Telephone number(s)",
      "type": "string",
      "required": true,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 17",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "residesInCountryOtherThanNationality",
      "label": "Residente en un país distinto del país de nacionalidad actual / Residence in a country other than the country of current nationality",
      "type": "boolean",
      "required": true,
      "description": "A genuine native AcroForm radio-button pair (No/Sí), unlike the independent-checkbox groups elsewhere on this form.",
      "sourceRef": "Solicitud de visado nacional -- item 18"
    },
    {
      "name": "residencePermitNumber",
      "label": "Permiso de residencia o documento equivalente -- número / Residence permit or equivalent document -- number",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "residesInCountryOtherThanNationality",
        "equals": true
      },
      "sourceRef": "Solicitud de visado nacional -- item 18",
      "validation": {
        "maxLength": 50
      }
    },
    {
      "name": "residencePermitValidUntil",
      "label": "Permiso de residencia -- válido hasta / Residence permit -- valid until",
      "type": "date",
      "required": false,
      "requiredWhen": {
        "field": "residesInCountryOtherThanNationality",
        "equals": true
      },
      "sourceRef": "Solicitud de visado nacional -- item 18"
    },
    {
      "name": "currentOccupation",
      "label": "Profesión actual / Current occupation",
      "type": "string",
      "required": true,
      "sourceRef": "Solicitud de visado nacional -- item 19",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "purposeOfJourney",
      "label": "Motivo(s) del viaje / Purpose(s) of the journey",
      "type": "enum",
      "required": true,
      "description": "The form's own 12-option checkbox list, Spain's own residence-purpose taxonomy: Residencia sin finalidad laboral (no habilita para trabajar)/Residence without a work permit; Residencia para reagrupación familiar/Family reunification; Residencia y trabajo por cuenta ajena/Residence and employment; Residencia y trabajo por cuenta propia/Residence and self-employment; Residencia y trabajo de temporada por cuenta ajena (max. 9 meses al ano)/Seasonal employment (max. 9 months/year); Inversor/Emprendedor/Investor-entrepreneur; Estudios/Study; Prácticas/Internship; Investigación (en el marco de un convenio de acogida firmado por un organismo de investigación)/Research (under a hosting agreement signed by a research body); Recuperación de la residencia/Residence recovery; Acreditación/Accreditation; Otros/Other (with a free-text specify line). Twelve independent AcroForm checkbox widgets, modelled as one enum per the same convention noted on maritalStatus. This taxonomy has no equivalent structure in de/auswaertiges-amt/national-visa-application's own purpose enum (Employment/Study/Au-pair/Language course/Family reunion/Other) -- see VERIFICATION.md's duplicate-detection comparison.",
      "sourceRef": "Solicitud de visado nacional -- item 20",
      "validation": {
        "enum": [
          "residence-without-work-permit",
          "family-reunification",
          "residence-and-employment",
          "residence-and-self-employment",
          "seasonal-employment",
          "investor-entrepreneur",
          "study",
          "internship",
          "research",
          "residence-recovery",
          "accreditation",
          "other"
        ]
      }
    },
    {
      "name": "otherPurposeDetails",
      "label": "Motivo del viaje -- Otros (especifíquese) / Purpose of journey -- other (please specify)",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "other"
      },
      "sourceRef": "Solicitud de visado nacional -- item 20",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "intendedDateOfArrival",
      "label": "Fecha prevista de entrada en España / Intended date of arrival in Spain",
      "type": "date",
      "required": true,
      "sourceRef": "Solicitud de visado nacional -- item 21"
    },
    {
      "name": "numberOfEntriesRequested",
      "label": "Número de entradas que solicita / Number of entries requested",
      "type": "enum",
      "required": true,
      "description": "Three independent AcroForm checkbox widgets (Una/Dos/Multiples entradas), modelled as one enum per the same convention noted on maritalStatus.",
      "sourceRef": "Solicitud de visado nacional -- item 22",
      "validation": {
        "enum": [
          "single",
          "two",
          "multiple"
        ]
      }
    },
    {
      "name": "addressInSpain",
      "label": "Domicilio postal del solicitante en España / Applicant's address in Spain",
      "type": "string",
      "required": true,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 23",
      "validation": {
        "maxLength": 400
      }
    },
    {
      "name": "nieNumber",
      "label": "Número de Identificación de Extranjero (NIE) / Foreigner Identity Number (NIE)",
      "type": "string",
      "required": false,
      "classification": "pii",
      "description": "Per the form's own footnote, only required when a prior ruling by the competent immigration authority (órgano de extranjería) has already authorized the applicant to reside or work in Spain -- the form does not gate this with a separate yes/no checkbox, so it is left ungated rather than fabricating that condition.",
      "sourceRef": "Solicitud de visado nacional -- item 24",
      "validation": {
        "pattern": "^[XYZ][0-9]{7}[A-Z]$"
      }
    },
    {
      "name": "extranjeriaResolutionNotificationDate",
      "label": "Fecha de notificación de la resolución dictada por el órgano de extranjería competente / Date of notification of the ruling issued by the competent immigration authority",
      "type": "date",
      "required": false,
      "description": "Same conditional applicability as nieNumber (see its own description) -- left ungated for the same reason.",
      "sourceRef": "Solicitud de visado nacional -- item 25"
    },
    {
      "name": "sponsorFullName",
      "label": "Apellidos y nombre del reagrupante / Surname and first name of the sponsor (family reunification)",
      "type": "string",
      "required": false,
      "classification": "pii",
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "family-reunification"
      },
      "sourceRef": "Solicitud de visado nacional -- item 26",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "sponsorRelationship",
      "label": "Parentesco (relación del solicitante con el reagrupante) / Family relationship (of the applicant with the sponsor)",
      "type": "enum",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "family-reunification"
      },
      "description": "The form's own checkbox list: Cónyuge/Spouse, Pareja de hecho/Registered (de facto) partner, Hijo/a (del reagrupante o cónyuge)/Child (of the sponsor or spouse), Ascendiente de primer grado (del reagrupante o cónyuge) a su cargo/Dependent first-degree ascendant (of the sponsor or spouse), Persona dependiente sujeta a representación legal del reagrupante/Dependent person under the sponsor's legal representation, Otro (especifíquese)/Other (please specify). Six independent AcroForm checkbox widgets, modelled as one enum per the same convention noted on maritalStatus.",
      "sourceRef": "Solicitud de visado nacional -- item 26",
      "validation": {
        "enum": [
          "spouse",
          "registered-partner",
          "child",
          "dependent-ascendant",
          "dependent-under-legal-representation",
          "other"
        ]
      }
    },
    {
      "name": "otherSponsorRelationshipDetails",
      "label": "Parentesco -- Otro (especifíquese) / Family relationship -- other (please specify)",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "sponsorRelationship",
        "equals": "other"
      },
      "sourceRef": "Solicitud de visado nacional -- item 26",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "sponsorDateOfBirth",
      "label": "Fecha de nacimiento del reagrupante / Sponsor's date of birth",
      "type": "date",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "family-reunification"
      },
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 26"
    },
    {
      "name": "sponsorNationality",
      "label": "Nacionalidad del reagrupante / Sponsor's nationality",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "family-reunification"
      },
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 26",
      "validation": {
        "maxLength": 100
      }
    },
    {
      "name": "sponsorTravelDocumentOrIdNumber",
      "label": "Número de documento de viaje o del documento de identidad del reagrupante / Sponsor's travel document or identity document number",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "family-reunification"
      },
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 26",
      "validation": {
        "maxLength": 50
      }
    },
    {
      "name": "sponsorAddress",
      "label": "Dirección postal del reagrupante / Sponsor's postal address",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "family-reunification"
      },
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 26",
      "validation": {
        "maxLength": 400
      }
    },
    {
      "name": "sponsorPhone",
      "label": "Número(s) de teléfono del reagrupante / Sponsor's telephone number(s)",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "family-reunification"
      },
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 26",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "sponsorEmail",
      "label": "Dirección de correo electrónico del reagrupante / Sponsor's e-mail address",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "equals": "family-reunification"
      },
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 26",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "employerOrCompanyContactName",
      "label": "Apellidos y nombre del empleador o nombre de la empresa/institución y apellidos y nombre de la persona de contacto / Employer's or company's/institution's name and surname of the employer, or name of the company/institution and surname and first name of its contact person",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "residence-and-employment",
          "residence-and-self-employment",
          "seasonal-employment",
          "internship"
        ]
      },
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 27",
      "validation": {
        "maxLength": 300
      }
    },
    {
      "name": "employerOrCompanyAddress",
      "label": "Dirección postal del empleador o de la empresa/institución / Employer's or company's/institution's postal address",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "residence-and-employment",
          "residence-and-self-employment",
          "seasonal-employment",
          "internship"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 27",
      "validation": {
        "maxLength": 400
      }
    },
    {
      "name": "employerOrCompanyPhone",
      "label": "Número de teléfono del empleador o de la empresa/institución / Employer's or company's/institution's telephone number",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "residence-and-employment",
          "residence-and-self-employment",
          "seasonal-employment",
          "internship"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 27",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "employerOrCompanyEmail",
      "label": "Correo electrónico del empresario o de la empresa/institución / Employer's or company's/institution's e-mail address",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "residence-and-employment",
          "residence-and-self-employment",
          "seasonal-employment",
          "internship"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 27",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "employerOrCompanyRepresentativeIdNumber",
      "label": "Número de Identidad de Extranjero o Documento Nacional de Identidad del empleador o de la persona de contacto / Employer's or contact person's NIE or DNI number",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "residence-and-employment",
          "residence-and-self-employment",
          "seasonal-employment",
          "internship"
        ]
      },
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 27",
      "validation": {
        "maxLength": 50
      }
    },
    {
      "name": "employerCompanyTaxId",
      "label": "Código de Identificación Fiscal de la empresa / Company's Tax Identification Code (CIF)",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "residence-and-employment",
          "residence-and-self-employment",
          "seasonal-employment",
          "internship"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 27",
      "validation": {
        "maxLength": 20
      }
    },
    {
      "name": "educationalEstablishmentName",
      "label": "Nombre del centro de estudios o investigación / Name of the educational establishment or research centre",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "study",
          "research"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 28",
      "validation": {
        "maxLength": 300
      }
    },
    {
      "name": "educationalEstablishmentAddress",
      "label": "Dirección postal del centro de estudios o investigación / Educational establishment's or research centre's postal address",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "study",
          "research"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 28",
      "validation": {
        "maxLength": 400
      }
    },
    {
      "name": "educationalEstablishmentPhone",
      "label": "Número de teléfono del centro de estudios o investigación / Educational establishment's or research centre's telephone number",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "study",
          "research"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 28",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "educationalEstablishmentEmail",
      "label": "Correo electrónico del centro de estudios o investigación / Educational establishment's or research centre's e-mail address",
      "type": "string",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "study",
          "research"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 28",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "studiesStartDate",
      "label": "Fecha prevista de inicio de los estudios o investigación / Intended date of start of studies or research",
      "type": "date",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "study",
          "research"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 28"
    },
    {
      "name": "studiesEndDate",
      "label": "Fecha prevista de finalización de los estudios o investigación / Intended date of end of studies or research",
      "type": "date",
      "required": false,
      "requiredWhen": {
        "field": "purposeOfJourney",
        "in": [
          "study",
          "research"
        ]
      },
      "sourceRef": "Solicitud de visado nacional -- item 28"
    },
    {
      "name": "minorHostName",
      "label": "Apellidos y nombre de la persona que vaya a acoger al menor o nombre de la entidad de acogida / Surname and first name of the person hosting the minor, or name of the hosting entity",
      "type": "string",
      "required": false,
      "classification": "pii",
      "description": "Applies only to the temporary displacement of minors for educational purposes under a program promoted/financed by a public administration, non-profit association, foundation, or other entity other than the persons holding parental authority/guardianship. The form does not gate this block with its own checkbox distinct from purposeOfJourney, so it is left ungated rather than fabricating a condition the source does not state.",
      "sourceRef": "Solicitud de visado nacional -- item 29",
      "validation": {
        "maxLength": 300
      }
    },
    {
      "name": "minorHostAddress",
      "label": "Dirección postal de la persona que vaya a acoger al menor o de la entidad de acogida / Postal address of the host person or hosting entity",
      "type": "string",
      "required": false,
      "sourceRef": "Solicitud de visado nacional -- item 29",
      "validation": {
        "maxLength": 400
      }
    },
    {
      "name": "minorHostPhone",
      "label": "Número de teléfono de la persona que vaya a acoger al menor o de la entidad de acogida / Telephone number of the host person or hosting entity",
      "type": "string",
      "required": false,
      "sourceRef": "Solicitud de visado nacional -- item 29",
      "validation": {
        "maxLength": 150
      }
    },
    {
      "name": "minorHostEmail",
      "label": "Correo electrónico de la persona que vaya a acoger al menor o de la entidad de acogida / E-mail address of the host person or hosting entity",
      "type": "string",
      "required": false,
      "sourceRef": "Solicitud de visado nacional -- item 29",
      "validation": {
        "maxLength": 200
      }
    },
    {
      "name": "minorHostIdNumber",
      "label": "Número de Identidad de Extranjero o Documento Nacional de Identidad de la persona que vaya a acoger al menor / Host person's or contact person's NIE or DNI number",
      "type": "string",
      "required": false,
      "classification": "pii",
      "sourceRef": "Solicitud de visado nacional -- item 29",
      "validation": {
        "maxLength": 50
      }
    },
    {
      "name": "placeAndDateOfSigning",
      "label": "Lugar y fecha / Place and date",
      "type": "string",
      "required": true,
      "sourceRef": "Solicitud de visado nacional -- item 30",
      "validation": {
        "maxLength": 150
      }
    }
  ],
  "documents": [
    {
      "id": "applicantPhoto",
      "label": "Fotografia reciente / Recent passport-style photo",
      "category": "supporting-evidence",
      "required": true,
      "belongsTo": "applicant",
      "sourceRef": "Solicitud de visado nacional -- page 1 header 'FOTO'"
    },
    {
      "id": "travelDocument",
      "label": "Documento de viaje / Travel document",
      "category": "identity-document",
      "required": true,
      "belongsTo": "applicant",
      "sourceRef": "Solicitud de visado nacional -- 'PARTE RESERVADA A LA ADMINISTRACIÓN' supporting-documents checklist: 'Documento de viaje'"
    },
    {
      "id": "subsistenceMeansProof",
      "label": "Prueba de medios de subsistencia / Evidence of means of subsistence",
      "category": "supporting-evidence",
      "required": true,
      "belongsTo": "applicant",
      "sourceRef": "Solicitud de visado nacional -- 'PARTE RESERVADA A LA ADMINISTRACIÓN' supporting-documents checklist: 'Medios de subsistencia'"
    },
    {
      "id": "accommodationProof",
      "label": "Prueba de alojamiento / Proof of accommodation",
      "category": "supporting-evidence",
      "required": true,
      "belongsTo": "applicant",
      "sourceRef": "Solicitud de visado nacional -- 'PARTE RESERVADA A LA ADMINISTRACIÓN' supporting-documents checklist: 'Prueba de alojamiento'"
    },
    {
      "id": "medicalCertificate",
      "label": "Certificado médico / Medical certificate",
      "category": "supporting-evidence",
      "required": false,
      "belongsTo": "applicant",
      "sourceRef": "Solicitud de visado nacional -- 'PARTE RESERVADA A LA ADMINISTRACIÓN' supporting-documents checklist: 'Certificado médico'. Listed on the checklist without a stated universal trigger; this cycle could not confirm which purposeOfJourney value(s) make it mandatory, so it is modelled as optional rather than asserting a gate the source does not state."
    },
    {
      "id": "criminalRecordCertificate",
      "label": "Certificado de antecedentes penales / Certificate of criminal record",
      "category": "supporting-evidence",
      "required": false,
      "belongsTo": "applicant",
      "sourceRef": "Solicitud de visado nacional -- 'PARTE RESERVADA A LA ADMINISTRACIÓN' supporting-documents checklist: 'Certificado de antecedentes penales'. Same disclosed scope note as medicalCertificate."
    },
    {
      "id": "travelMedicalInsurance",
      "label": "Seguro médico de viaje / Travel medical insurance",
      "category": "supporting-evidence",
      "required": false,
      "belongsTo": "applicant",
      "sourceRef": "Solicitud de visado nacional -- 'PARTE RESERVADA A LA ADMINISTRACIÓN' supporting-documents checklist: 'Seguro médico de viaje'. Same disclosed scope note as medicalCertificate."
    }
  ],
  "crossFieldValidation": [
    {
      "id": "travelDocumentValidAfterIssue",
      "compare": {
        "field": "travelDocumentValidUntil",
        "operator": "greaterThan",
        "compareTo": "travelDocumentDateOfIssue"
      }
    },
    {
      "id": "studiesEndAfterStart",
      "compare": {
        "field": "studiesEndDate",
        "operator": "greaterThan",
        "compareTo": "studiesStartDate"
      }
    }
  ],
  "steps": [
    {
      "id": "applicant_identity",
      "title": "Datos del solicitante / Applicant's identity",
      "fields": [
        "surname",
        "surnameAtBirth",
        "firstNames",
        "dateOfBirth",
        "placeOfBirth",
        "countryOfBirth",
        "currentNationality",
        "nationalityAtBirth",
        "otherNationalities",
        "sex",
        "maritalStatus",
        "otherMaritalStatusDetails"
      ],
      "next": "minor_and_travel_document"
    },
    {
      "id": "minor_and_travel_document",
      "title": "Menores y documento de viaje / Minors and travel document",
      "fields": [
        "guardianDetails",
        "nationalIdentityNumber",
        "travelDocumentType",
        "otherTravelDocumentTypeDetails",
        "travelDocumentNumber",
        "travelDocumentDateOfIssue",
        "travelDocumentValidUntil",
        "travelDocumentIssuedBy"
      ],
      "next": "contact_and_residence"
    },
    {
      "id": "contact_and_residence",
      "title": "Contacto y residencia / Contact and residence",
      "fields": [
        "homeAddressAndEmail",
        "phoneNumbers",
        "residesInCountryOtherThanNationality",
        "residencePermitNumber",
        "residencePermitValidUntil",
        "currentOccupation"
      ],
      "next": "journey_details"
    },
    {
      "id": "journey_details",
      "title": "Motivo y datos del viaje / Purpose and journey details",
      "fields": [
        "purposeOfJourney",
        "otherPurposeDetails",
        "intendedDateOfArrival",
        "numberOfEntriesRequested",
        "addressInSpain"
      ],
      "next": "prior_extranjeria_resolution"
    },
    {
      "id": "prior_extranjeria_resolution",
      "title": "Resolución previa del órgano de extranjería / Prior immigration-authority ruling",
      "fields": [
        "nieNumber",
        "extranjeriaResolutionNotificationDate"
      ],
      "next": "family_reunification_sponsor"
    },
    {
      "id": "family_reunification_sponsor",
      "title": "Datos del reagrupante / Family-reunification sponsor's details",
      "fields": [
        "sponsorFullName",
        "sponsorRelationship",
        "otherSponsorRelationshipDetails",
        "sponsorDateOfBirth",
        "sponsorNationality",
        "sponsorTravelDocumentOrIdNumber",
        "sponsorAddress",
        "sponsorPhone",
        "sponsorEmail"
      ],
      "next": "employer_or_company"
    },
    {
      "id": "employer_or_company",
      "title": "Datos del empleador o de la empresa / Employer's or company's details",
      "fields": [
        "employerOrCompanyContactName",
        "employerOrCompanyAddress",
        "employerOrCompanyPhone",
        "employerOrCompanyEmail",
        "employerOrCompanyRepresentativeIdNumber",
        "employerCompanyTaxId"
      ],
      "next": "educational_establishment"
    },
    {
      "id": "educational_establishment",
      "title": "Datos del centro de estudios o investigación / Educational establishment's or research centre's details",
      "fields": [
        "educationalEstablishmentName",
        "educationalEstablishmentAddress",
        "educationalEstablishmentPhone",
        "educationalEstablishmentEmail",
        "studiesStartDate",
        "studiesEndDate"
      ],
      "next": "minor_temporary_educational_displacement"
    },
    {
      "id": "minor_temporary_educational_displacement",
      "title": "Desplazamiento temporal de menores con fines educativos / Temporary displacement of minors for educational purposes",
      "fields": [
        "minorHostName",
        "minorHostAddress",
        "minorHostPhone",
        "minorHostEmail",
        "minorHostIdNumber"
      ],
      "next": "signature"
    },
    {
      "id": "signature",
      "title": "Firma / Signature",
      "fields": [
        "placeAndDateOfSigning"
      ]
    }
  ]
}
