Upgrade from GET /v1/bookings to GET /v2/bookings
- Outdated
- May 3, 2024
- 1 related route
Context
Upgrade from GET - /v1/bookings to GET - /v2/bookings
⭐ Key benefits : Having more details about participants and transport ⚠️ Called backs: CLIC
ℹ️ in the response body=> new object: households with number of attendees and a new field is_transport_included which indicates whether the booking is with transport or without transport.
As a BE B2B DEV I want to add more information about the participants and the transport In order to have you more details about the listed booking
Impacts
=> Resource to call: GET/v2/bookings
Body
[
{
"id": "12345",
"creation_date": "20160415",
"departure_date": "20160415",
"return_date": "20160415",
"booking_status": "VALIDATED",
"payment_status": "PAID",
+ "is_transport_included": false,
"products": [
{
"id": "ALHC_WINTER",
"label": "ALPES HUEZ",
"type": "VILLAGE",
"_links": [
{
"method": "GET",
"href": "https://api.clubmed.com/v1/products/AGAC",
"rel": "product_detail"
}
]
}
],
"salesman_id": "987654",
"validation_date": "20160415",
"country_code": "FR",
"price": {
"total": 80,
"currency": "EUR"
},
"commission": {
"total": 80,
"currency": "EUR"
},
"seller_email": "pierre.dupont@partner.com",
"multiple_sale_contracts": true,
"option_durability": {
"expiration_date_time": "20160415T10:23:00.234Z",
"is_reliable": true
},
+ "households": [
+ {
+ "number_attendees": 3,
+ "household_id": "2443",
+ "main_attendee": [
+ {
+ "customer_id": 987654,
+ "civility": "MR",
+ "last_name": "Dupont",
+ "first_name": "Martin",
+ }
+ ]
+ }
+ ],
- "attendees": [
- {
- "customer_id": 987654,
- "household_id": "Id of the household",
- "civility": "MR",
- "last_name": "Dupont",
- "first_name": "Martin",
- "type": "MAIN"
- }
- ],
"_links": [
{
"method": "GET",
"href": "https://api.clubmed.com/v2/customers/1234567/bookings/687687",
"rel": "customer_booking_v2"
},
{
"method": "GET",
"href": "https://api.clubmed.com/v0/customers/1234567/bookings/687687/payment_schedules",
"rel": "payment_schedules"
},
{
"method": "GET",
"href": "https://api.clubmed.com/v0/customers/1234567/bookings/687687/sell_contracts",
"rel": "sell_contracts"
},
{
"method": "GET",
"href": "https://api.clubmed.com/v1/customers/1234567/bookings/687687/price_details",
"rel": "price_details"
},
{
"method": "GET",
"href": "https://api.clubmed.com/v1/customers/1234567/bookings/687687/services",
"rel": "services"
},
{
"method": "GET",
"href": "https://api.clubmed.com/v1/customers/1234567/bookings/687687/transport_details",
"rel": "transport_details"
}
]
}
]