Upgrade from PUT /v1/proposals/{proposal_id}/attendees to PUT /v2/proposals/{proposal_id}/attendees
- Obsolète
- 1 juin 2024
- 1 route liée
Context
Upgrade from PUT - /v1/proposals/{proposal_id}/attendees to PUT - /v2/proposals/{proposal_id}/attendees
⭐ Key benefits : Removing the notion of household_id and having uniform values in our API endpoints
As a BE B2B Dev I want to be able to distribute my households according to their position in the array and not an id In order to facilitate my repartition
Impacts
Route to call :
- PUT - /v2/proposals/{proposal_id}/attendees
Input was:
[
{
"household_id": "A",
"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"
},
"attendees": [
{
"id": "A",
"customer_id": "123456789",
"first_name": "Marc",
"unicode_first_name": "北",
"last_name": "Dupont",
"unicode_last_name": "王",
"email": "bei.wang@123.com",
"civility_code": "MR",
"health_pass_id": "1234567892",
"identity": {
"number": "E001241",
"type": "TAX_NUMBER"
},
"birthdate": "2022-04-15",
"travel_documents": [
{
"document_number": "09PR5121F",
"type": "PASSPORT",
"expiration_date": "20281015",
"issuing_date": "20181015",
"nationality": "FR",
"issuing_country": "FR",
"birth_country": "FR",
"authority": "Prefecture de Torcy"
}
],
"phones": [
{
"number": "0623456789",
"type": "MOBILE"
}
],
"optins": [
{
"channel": "EMAIL",
"optin": true,
"optin_partners": true
}
]
}
],
"language_code": "FR"
}
]
Input became:
[
{
"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"
},
"attendees": [
{
"id": "A",
"customer_id": "123456789",
"first_name": "Marc",
"unicode_first_name": "北",
"last_name": "Dupont",
"unicode_last_name": "王",
"email": "bei.wang@123.com",
"civility_code": "MR",
"health_pass_id": "1234567892",
"identity": {
"number": "E001241",
"type": "TAX_NUMBER"
},
"birthdate": "2022-04-15T10:23:00.234Z",
"travel_documents": [
{
"document_number": "09PR5121F",
"type": "PASSPORT",
"expiration_date": "20281015",
"issuing_date": "20181015",
"nationality": "FR",
"issuing_country": "FR",
"birth_country": "FR",
"authority": "Prefecture de Torcy"
}
],
"phones": [
{
"number": "0623456789",
"type": "MOBILE"
}
],
"optins": [
{
"channel": "EMAIL",
"optin": true,
"optin_partners": true
}
]
}
],
"language_code": "FR"
}
]
Output was:
[
{
"household_id": "string",
"attendees": [
{
"id": "A",
"customer_id": "123456789",
"customer_type": "NEW_CUSTOMER",
"loyalty_status": "GOLD"
}
]
}
]
Output became:
[
{
"attendees": [
{
"id": "A",
"customer_id": "123456789",
"customer_type": "NEW_CUSTOMER",
"loyalty_status": "GOLD"
}
]
}
]