Impact migration of the route GET v0/customers/{customer_id}/travelers

  • Outdated
  • June 30, 2023
  • 1 related route

Context

Upgrade from GET - v0/customers/{customer_id}/travelers to GET - v1/customers/{customer_id}/travelers

Key benefits : Give the ability to specify the type of identity number ℹ️ identity_number becomes an object that contains two keys and had a new name : identity


As a CxO dev I want to be able to enter an identity number for a traveler and an associated typology In order to modify this number and specify its type


Impacts

Route to call :

  • GET - v1/customers/{customer_id}/travelers

identity_number got a new name : identityidentity is an object that contains two keys : number and typetype Allows you to specify type of identity number in an enumeration

Model

id: identity
description : National identifier code
id: number
description : National identifier code attached to the identity document
type : String
example : E001241
key : type   
type : ENUM
ENUM : [CPF, CUIL, TAX_NUMBER, SECURITY_NUMBER, ID_NUMBER, NATIONAL_REGISTER]

ENUM Spotlight

ENUM APIDescription
CPFCadastro de pessoas fisicas (mandatory for Brasil)
CUILArgentine Tax Identification Number
TAX_NUMBERItalian Tax Code
SECURITY_NUMBERFrench social security number
ID_NUMBERUnique identifier (China)
NATIONAL_REGISTERBelgian social security number

Output - GET v1/customers/{customer_id}/travelers

Response : ⚠️ Evolved

[
  {
    "first_name": "Tom",
    "unicode_first_name": "北",
    "last_name": "Smith",
    "unicode_last_name": "王",
    "email": "tom@example.com",
    "phones": [
      {
        "number": "0623456789",
        "type": "MOBILE"
      }
    ],
    "civility": "MR",
    "birthdate": "19870625",
    "optins": [
      {
        "channel": "EMAIL",
        "optin": true
      }
    ],
    "birth_country_code": "FR",
    "health_pass_id": "654FFQDF",
-    "identity_number": "E001241",
+ "identity": {
+     "number": "E001241",
+     "type": "CUIL"
+   },
    "address": {
      "number": "15",
      "street": "AVENUE DES CHAMPS ELYSEES",
      "add_on": "6A",
      "town": "Luynes",
      "city": "Aix-en-Provence",
      "zip_code": "75000",
      "state_or_district": "CA",
      "country": "FRANCE",
      "country_code": "FR",
      "additional_information_1": "Chez M. Dupont",
      "additional_information_2": "Entreprise Clubmed"
    },
    "passport": {
      "first_name": "string",
      "unicode_first_name": "string",
      "last_name": "string",
      "unicode_last_name": "string",
      "birthdate": "string",
      "document_number": "09PR5121E",
      "authority": "prefecture de paris",
      "birthplace": "Paris",
      "nationality": "FR",
      "issuing_date": "20150225",
      "expiration_date": "20250224",
      "serial_number": "123456789",
      "birth_country": "FR",
      "residence_city": "Paris",
      "issuing_country": "FR"
    },
    "id_card": {
      "first_name": "string",
      "unicode_first_name": "string",
      "last_name": "string",
      "unicode_last_name": "string",
      "birthdate": "string",
      "document_number": "09PR5121E",
      "authority": "prefecture de paris",
      "birthplace": "Paris",
      "nationality": "FR",
      "issuing_date": "20150205",
      "expiration_date": "20250204",
      "birth_country": "FR",
      "residence_city": "Paris",
      "issuing_country": "FR"
    },
    "driving_licence": {
      "first_name": "string",
      "unicode_first_name": "string",
      "last_name": "string",
      "unicode_last_name": "string",
      "birthdate": "string",
      "document_number": "09PR5121E",
      "authority": "prefecture de paris",
      "birthplace": "Paris",
      "issuing_date": "19590101",
      "expiration_date": "20010101"
    },
    "customer_id": "123456789",
    "_links": [
      {
        "method": "GET",
        "href": "https://api.clubmed.com/v1/products/AGAC",
        "rel": "product_detail"
      }
    ]
  }
]