---
uuid: 5009271a-a40b-4428-8537-73ddf483ad0a
date_created: 2025-07-05T08:07:50.728Z
date_updated: 2026-03-11T09:25:34.696Z
outdated: true
end_of_support_date: 2025-05-30
routes: 
  - GET /v2/schemas/{resource}/{localeOrCountry}
---

# Migration of the route GET /v2/schemas/{resource}/{localeOrCountry} to GET /v3/schemas/{resource}/{localeOrCountry}

## Context

Upgrade from **GET** - `​/v2/schemas/{resource}/{localeOrCountry}` to **GET** -  `​/v3/schemas/{resource}/{localeOrCountry}`

⭐  **3 Key benefits :**

* Renaming of the fields *states\_or\_district.**$values*** to field *states\_or\_district.**x-choices***, and ***$meta*** to ***x-meta*** to match the json schema validator standard
* Standardize the schema travel\_documents issue\_date property to issuing\_date to match the PUT /v3/proposals/{proposal\_id}/attendees issuing\_date field naming + new pattern for authority field
* Specify the expected identity type + add pattern to identity number + change of identity description

## Impacts

Route to call :

* **GET** -  `​/v3/schemas/{resource}/{localeOrCountry}`

## Output

1️⃣ First modification : Renaming of the fields *states\_or\_district.**$values*** to field *states\_or\_district.**x-choices***, and ***$meta*** to ***x-meta*** to match the json schema validator standard

```diff
"state_or_district": {
  "type": "string",
  "description": "administrative division",
  "examples": [
    "CA"
  ],
  "maxLength": 10,
-  "$values": [  
+  "x-choices": [
    {
      "code": "AA",
      "label": "ARMED FORCES AMERICAS"
    },
    {
      "code": "AE",
      "label": "ARMED FORCES AMERICAS"
    }
  ],
  "enum": [
    "AA",
    "AE"
  ]
}
```

```diff
{
!  "$meta": {
+  "x-meta": {
    "reference": "A",
    "id": 46282225,
    "type": "MAIN"
  }
}
```

2️⃣ Standardize the schema travel\_documents issue\_date property to issuing\_date to match the PUT /v3/proposals/{proposal\_id}/attendees issuing\_date field naming + new pattern for authority field :

* issue\_date becomes issuing\_date (which is the actual field in our PUT v3/attendees)
* added pattern for authority property

```diff
"travel_documents": {
  "type": "object",
  "additionalProperties": false,
  "required": [
    "passport"
  ],
  "properties": {
    "passport": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "document_number",
        "expiration_date",
        "issue_date",
        "nationality",
        "authority",
        "issuing_country"
      ],
      "properties": {
        "document_number": {
          "type": "string",
          "description": "Document number",
          "examples": [
            "242343"
          ],
          "pattern": "^.{1,30}$"
        },
        "expiration_date": {
          "type": "string",
          "description": "Expiration date",
          "examples": [
            "20230624"
          ]
        },
        "issue_date": {
!       "issuing_date": {
          "type": "string",
          "description": "Issue date",
          "examples": [
            "20230624"
          ]
        },
        "nationality": {
          "type": "string",
          "description": "Nationality",
          "examples": [
            "French"
          ]
        },
        "authority": {
          "type": "string",
          "description": "Authority",
          "examples": [
            "France"
          ],
+         "pattern": "^.{1,35}$",
        },
        "issuing_country": {
          "type": "string",
          "description": "Issuing country",
          "examples": [
            "FR"
          ]
        }
      }
    }
  }
}
```

3️⃣ Third modification : Specify the expected identity type + add pattern to identity number + change of identity description

```diff
"identity": {
  "type": "object",
! "description": "Identity number" --> "National identifier code"
  "properties": {
    "number": {
      "type": "string"
+     "pattern" : "^.{1,30}$"
    },
    "type": {
      "type": "string",
      "enum": [
        "CPF",
-       "CUIL",
-       "TAX_NUMBER",
-       "SECURITY_NUMBER",
-       "ID_NUMBER",
-       "NATIONAL_REGISTER",
-       "DNI"
      ]
    }
  },
  "required": [
    "number",
    "type"
  ],
  "examples": [
    {
      "number": "1234",
      "type": "CPF"
    }
  ]
}
```
