Impact migration of the route GET /v1/customers/{customer_id}/profile
- Obsolète
- 24 décembre 2024
- 1 route liée
Context
Upgrade from GET - /v1/customers/{customer_id}/profile to GET - /v2/customers/{customer_id}/profile
⭐ Key benefits : Standardize the get profile output with the api schema output ℹ️ By default, the value of an empty field will be null instead of ""
Impacts
Route to call :
- GET -
/v2/customers/{customer_id}/profile
❗ When a field has no value in database, we will output it with a null value instead of an empty string ("")
Output Became
{
"gm_number": "22073382",
! "email": null,
"gender": "M",
"civility": "MR",
! "unicode_civility": null,
"first_name": "AUTRE",
! "unicode_first_name": null,
"last_name": "ADULT",
! "unicode_last_name": null,
"identity": null,
! "health_pass_id": null,
"language_code": "FR",
! "birth_country_code": null,
"customer_type": "CLIENT",
"customer_status": "PROSPECT",
"birthdate": "19840101",
"birthday": "19840101",
"personal_data_usage_allowed": true,
"address": {
"number": "45",
"street": "AA",
"town": "ZAZA",
"city": "ZAZ",
"country": "BRASIL",
! "add_on": null,
"zip_code": "45669872",
"state_or_district": "ZAZA",
"country_code": "BR",
! "additional_information_1": null,
! "additional_information_2": null
},
"loyalty_program": {
"points": 0,
"status": "NONE"
},
"optins": [
{
"channel": "MAIL",
"optin": false,
"optin_partners": false
}
],
"phones": [],
"blacklisted": false,
"filiation_number": "1",
"locale": "pt-BR",
"_links": [
{
"rel": "self",
"method": "GET",
"href": "https://api.staging.clubmed.com/v2/customers/152580646/profile"
},
{
"rel": "schema_v1",
"method": "GET",
"href": "https://api.staging.clubmed.com/v1/schemas/profile/fr-FR"
}
]
}