Impact migration of the route POST /v1/proposals/{proposal_id}/transport_details
- Outdated
- September 16, 2023
- 1 related route
Context
Upgrade from POST - /v1/proposals/{proposal_id}/transport_details to POST - /v3/proposals/{proposal_id}/transport_details
⭐ Key benefits : Having the same values in travel_sections.transport.class like all our API endpoints
ℹ️ Values of travel_sections.transport.class field become: PLANE_ECONOMY, PLANE_ECONOMY_PLUS, PLANE_BUSINESS, PLANE_PREMIUM, PLANE_FIRST, TRAIN_FIRST, TRAIN_SECOND instead of ECO, BUS, FIR, 1CL, 2CL, EC+, DIB, DIV, PCR, PRE
As a BE B2B Dev I want to be able to use the same mapping for all transport_class fields In order to avoid multiple mappings for the same fields in several endpoints
⭐ Key benefits : Having the cancellation_policy_type one level lower: under each travel_section
As a BE B2B Dev I want to retrieve the cancellation_policy_type of my transportation under each travel_section In order to display it on the front-end
Impacts
Route to call :
- POST -
/v3/proposals/{proposal_id}/transport_details
❗ travel_sections.transport.class is a string having a new mapping (new values names): PLANE_ECONOMY, PLANE_ECONOMY_PLUS, PLANE_BUSINESS, PLANE_PREMIUM, PLANE_FIRST, TRAIN_FIRST, TRAIN_SECOND
❗ travel_sections.cancellation_policy_type is an ENUM [ AUCUN, THEO, WEBTHEO, NDC ]
Model
| Champ API | Définition | Example | Type |
|---|---|---|---|
| travel_sections.transport.class | Transport information indicating its class | PLANE_ECONOMY | String |
| [0].travel_sections[0].cancellation_policy_type | Used to determine which cancellation policy is to be applied to this travel | THEO | ENUM: [ AUCUN, THEO, WEBTHEO, NDC ] |
POST /v3/proposals/{proposal_id}/transport_details
Output Became
[
{
"way": "INBOUND",
"total_duration_in_min": 745,
- "cancellation_policy_type": "THEO",
"travel_sections": [
{
"departure": {
"city": {
"id": "PAR",
"label": "PARIS"
},
"date": "20160812",
"time": "17:00:00",
"location": {
"id": "CDG",
"label": "PARIS-ROISSY CDG",
"terminal_code": "2A"
}
},
"arrival": {
"city": {
"id": "PAR",
"label": "PARIS"
},
"date": "20160812",
"time": "17:00:00",
"location": {
"id": "CDG",
"label": "PARIS-ROISSY CDG",
"terminal_code": "2A"
}
},
"technical_stops": 0,
+ "cancellation_policy_type": "THEO",
"connection_duration_in_min": 130,
"stopover_duration_in_min": 130,
"transport": {
"type": "PLANE",
"company": {
"operator": {
"id": "SQ",
"label": "SINGAPORE AIRLINES",
"logo": "http://www.airfrance.fr/logo"
},
"exploiter": {
"id": "SQ",
"label": "SINGAPORE AIRLINES",
"logo": "http://www.airfrance.fr/logo"
}
},
"travel_number": "SQ1234",
"baggage": {
"quantity": "2",
"weight": "23kg"
},
"vehicle_type": "BOEING 747",
+ "class": "PLANE_ECONOMY",
"reference": "SQ1234",
"fare_class": "U"
},
"duration_in_min": 250,
"clubmed_transport": false,
"flight_code": "THEO9E"
}
]
}
]