Impact migration of the route POST /v2/proposals/{proposal_id}/transport_details to POST /v3/proposals/{proposal_id}/transport_details

  • Obsolète
  • 20 octobre 2024
  • 1 route liée

Context

Upgrade from POST - /v2/proposals/{proposal_id}/transport_details to POST - /v3/proposals/{proposal_id}/transport_details

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.cancellation_policy_type is an ENUM [ AUCUN, THEO, WEBTHEO, NDC ]

Model

Champ APIDéfinitionExampleType
[0].travel_sections[0].cancellation_policy_typeUsed to determine which cancellation policy is to be applied to this travelTHEOENUM: [ AUCUN, THEO, WEBTHEO, NDC ]

POST /v2/proposals/{proposal_id}/transport_details

Output Was

[
  {
    "way": "INBOUND",
    "total_duration_in_min": 745,
    "travel_sections": [
      {
        "departure": {
          "city": {
            "id": "PAR",
            "label": "PARIS"
          },
          "location": {
            "id": "CDG",
            "label": "PARIS-ROISSY CDG",
            "terminal_code": "2A"
          },
          "date": "20160812",
          "time": "13:34:00.000"
        },
        "arrival": {
          "city": {
            "id": "PAR",
            "label": "PARIS"
          },
          "location": {
            "id": "CDG",
            "label": "PARIS-ROISSY CDG",
            "terminal_code": "2A"
          },
          "date": "20160812",
          "time": "13:34:00.000"
        },
        "transport": {
          "type": "PLANE",
          "class": "PLANE_ECONOMY",
          "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",
          "fare_class": "U"
        },
        "technical_stops": 0,
        "connection_duration_in_min": 130,
        "stopover_duration_in_min": 130,
        "duration_in_min": 250,
        "clubmed_transport": false
      }
    ],
    "cancellation_policy_type": "THEO"
  }
]

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"
      }
    ]
  }
]