Impact migration of the route GET /v0/bookings/{booking_id}
- Outdated
- September 15, 2023
- 1 related route
Context
Upgrade from GET - /v0/bookings/{booking_id} to ** GET** - /v1/bookings/{booking_id}
⭐ Key benefits : Retrieve the expiration date time of the bookings
ℹ️ expiration_date_time is inside an object "option_durability" that contains "expiration_date_time" & "is_reliable"
As CMTA I want to retrieve the expiration date and time of a booking in option In order to show it on the front end
Impacts
Route to call :
- GET -
/v1/bookings/{booking_id}
OUTPUT WAS:
{
"id": "12345",
"creation_date": "20160415",
"departure_date": "20160415",
"return_date": "20160415",
"duration": 7,
"expiration_date_time": "20160415T10:23:00.234Z",
"booking_status": "VALIDATED",
"locale": "fr-FR",
"multiple_sale_contracts": true,
"vendor": {
"sold_by": "CLUBMED",
"name": "CLUB MEDITERRANEE INTERNET SCA",
"contact": "0850 644 364",
"type": "WEB"
},
"attendees": {
"adults_count": 4,
"children_count": 4,
"details_attendees": [
{
"gm_number": "123456789",
"booking_status": "VALIDATED",
"bulletin_number": "12123",
"expiration_date_time": "20160415T10:23:00.234Z",
"start_date": "20191027",
"end_date": "20191028",
"duration": 7,
"adults_count": 4,
"children_count": 4,
"payment_status": "PAID",
"allowed_to_pay": true,
"price": {
"total": 80,
"currency": "EUR"
},
"stays": [
{
"start_date": "20191027",
"end_date": "20191028",
"duration": 7,
"product_id": "AGAC",
"adults_count": 4,
"children_count": 4,
"accommodations": [
{
"quantity": 1,
"baby_bed": true,
"occupation": 2,
"accommodation_id": "C2",
"shared_room": true,
"rooms": [
{
"number": "1421",
"building": "Grand Yabuli",
"orientation": "Sud",
"floor": "24",
"status": "NOT_READY"
}
],
"_links": [
{
"method": "GET",
"href": "https://api.clubmed.com/v1/products/AGAC",
"rel": "product_detail"
}
]
}
],
"_links": [
{
"method": "GET",
"href": "https://api.clubmed.com/v1/products/AGAC",
"rel": "product_detail"
}
]
}
],
"outward_trip": [
{
"type": "INBOUND",
"departure_city": "Paris",
"arrival_city": "Paris",
"transportation": [
"[TRAIN]"
]
}
],
"attendee_ids": [
{
"customer_id": 987654,
"id": "A"
}
]
}
]
},
"total_price": {
"total": 80,
"currency": "EUR"
}
}
OUTPUT BECAME:
{
"id": "12345",
"creation_date": "20160415",
"departure_date": "20160415",
"return_date": "20160415",
"duration": 7,
+ "option_durability": {
+ "expiration_date_time": "20230101T01:00:00Z",
+ "is_reliable": "true"
+ },
- "expiration_date_time": "20160415T10:23:00.234Z",
"booking_status": "VALIDATED",
"locale": "fr-FR",
"multiple_sale_contracts": true,
"vendor": {
"sold_by": "CLUBMED",
"name": "CLUB MEDITERRANEE INTERNET SCA",
"contact": "0850 644 364",
"type": "WEB"
},
"attendees": {
"adults_count": 4,
"children_count": 4,
"details_attendees": [
{
"gm_number": "123456789",
"booking_status": "VALIDATED",
"bulletin_number": "12123",
"start_date": "20191027",
"end_date": "20191028",
"duration": 7,
"adults_count": 4,
"children_count": 4,
"payment_status": "PAID",
"allowed_to_pay": true,
"price": {
"total": 80,
"currency": "EUR"
},
"stays": [
{
"start_date": "20191027",
"end_date": "20191028",
"duration": 7,
"product_id": "AGAC",
"adults_count": 4,
"children_count": 4,
"accommodations": [
{
"quantity": 1,
"baby_bed": true,
"occupation": 2,
"accommodation_id": "C2",
"shared_room": true,
"rooms": [
{
"number": "1421",
"building": "Grand Yabuli",
"orientation": "Sud",
"floor": "24",
"status": "NOT_READY"
}
],
"_links": [
{
"method": "GET",
"href": "https://api.clubmed.com/v1/products/AGAC",
"rel": "product_detail"
}
]
}
],
"_links": [
{
"method": "GET",
"href": "https://api.clubmed.com/v1/products/AGAC",
"rel": "product_detail"
}
]
}
],
"outward_trip": [
{
"type": "INBOUND",
"departure_city": "Paris",
"arrival_city": "Paris",
"transportation": [
"[TRAIN]"
]
}
],
"attendee_ids": [
{
"customer_id": 987654,
"id": "A"
}
]
}
]
},
"total_price": {
"total": 80,
"currency": "EUR"
}
}
Model
| Champ API | Définition | Example | Type |
|---|---|---|---|
| option_durability.expiration_date_time | Booking expiration date and time | 20230101T01:00 | Date Timestamp format TZ |
| option_durability.is_reliable | Indicates if the expiration date is reliable or not. The expiration date of a booking in option with transportation included will automatically be less reliable than one without transportation | True | Bolean |