---
uuid: f19de596-66c3-4214-8782-fc0a11919bea
date_created: 2025-07-05T08:07:52.658Z
date_updated: 2026-03-11T09:26:05.119Z
outdated: true
end_of_support_date: 2023-09-16
routes: 
  - POST /v0/proposals/{proposal_id}/alternative_transports
---

# Impact migration of the route POST /v0/proposals/{proposal\_id}/alternative\_transports

## Context

Upgrade from **POST** - `/v0/proposals/{proposal_id}/alternative_transports` to **POST** -  `/v2/proposals/{proposal_id}/alternative_transports`

⚠️ Check Discussion: <https://github.com/orgs/ClubMediterranee/discussions/7377> to migrate from v0 to v2 straight away

⭐  **Key benefits :** Having the same name for the field `transport_class` for all API endpoints
⭐  **Key benefits :** Having the same values for `transport_class` enum in all API endpoints
ℹ️ In the Body -> `flight_class` becomes `transport_class` and its enum values 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
ℹ️ In the Response -> Values of journeys.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

⭐  **Key benefits :**

* GOs can exclude one or more flight companies
* GOs can exclude one or more connection cities
* GOs can allow or not cabin mixability
* GOs can chose a min/max connection duration
* GOs can allow airport change between 2 travel sections

***

> 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

***

## Impacts

Route to call :

* **POST** - `/v2/proposals/{proposal_id}/alternative_transports`

## Body

❗ `flight_class` **got a new name : `transport_class`**
❗ `transport_class` is an ENUM containing the following values: PLANE\_ECONOMY, PLANE\_ECONOMY\_PLUS, PLANE\_BUSINESS, PLANE\_PREMIUM, PLANE\_FIRST, TRAIN\_FIRST, TRAIN\_SECOND

**Model**

| Champ API        | Définition                                 | Example        | Type |
| ---------------- | ------------------------------------------ | -------------- | ---- |
| transport\_class | Transport information indicating its class | PLANE\_ECONOMY | ENUM |

**ENUM Spotlight**
PLANE\_ECONOMY, PLANE\_ECONOMY\_PLUS, PLANE\_BUSINESS, PLANE\_PREMIUM, PLANE\_FIRST, TRAIN\_FIRST, TRAIN\_SECOND

**POST** */v2/proposals/{proposal\_id}/alternative\_transports*

**Body Example value**

```diff
{
  "journeys": [
    {
      "way": "INBOUND",
      "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"
            }
          }
        }
      ],
      "transport_class": "PLANE_ECONOMY"
    }
  ],
  "is_direct_flight_only": true,
  "max_connections": 2,
  "transport_connection_duration": {
    "min": 60,
    "max": 120
  },
  "is_transport_stations_changes_allowed": {
    "on_connection": true,
    "along_roundtrip": false
  },
  "is_cabin_mixing_allowed": false,
  "is_companies_mixing_allowed": true,
  "imposed_companies": [
    "AF"
  ],
  "imposed_connection_cities": [
    "PAR"
  ],
  "excluded_companies": [
    "RA"
  ],
  "excluded_connection_cities": [
    "HAM"
  ]
}
```

## Response

❗ `journeys.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

**Model**

| Champ API                                 | Définition                                 | Example        | Type   |
| ----------------------------------------- | ------------------------------------------ | -------------- | ------ |
| journeys.travel\_sections.transport.class | Transport information indicating its class | PLANE\_ECONOMY | String |

**OUTPUT BECAME:**

```diff
[
  {
    "id": "2:ac27a:64845",
    "price": {
      "amount": 1734,
+      "currency": "EUR"
    },
    "total_differential_price": {
      "amount": 154,
      "currency": "EUR",
      "is_best_differential_price": true
    },
    "journeys": [
      {
        "way": "INBOUND",
        "total_duration_in_min": 520,
        "travel_sections": [
          {
            "technical_stops": 0,
            "connection_duration_in_min": null,
            "stopover_duration_in_min": null,
            "duration_in_min": null,
            "clubmed_transport": false,
 +           "cancellation_policy_type": "THEO",
            "departure": {
              "date": "20240615",
              "time": "11:30:00",
              "city": {
                "id": "PAR",
                "label": "PARIS"
              },
              "location": {
                "id": "ORY",
                "label": "PARIS-ORLY",
                "terminal_code": "3"
              }
            },
            "arrival": {
              "date": "20240615",
              "time": "14:10:00",
              "city": {
                "id": "FDF",
                "label": "FORT DE FRANCE"
              },
              "location": {
                "id": "FDF",
                "label": "FORT DE FRANCE",
                "terminal_code": ""
              }
            },
            "transport": {
              "type": "PLANE",
              "class": "PLANE_ECONOMY",
              "travel_number": "842",
              "vehicle_type": "BOEING 777-200/300",
              "company": {
                "operator": {
                  "id": "AF",
                  "label": "AIR FRANCE",
                  "logo": "https://ns.clubmed.com/it/2013/img/be/airline_logos/AF.png"
                },
                "exploiter": {
                  "id": "AF",
                  "label": "AIR FRANCE",
                  "logo": "https://ns.clubmed.com/it/2013/img/be/airline_logos/AF.png"
                }
              },
              "baggage": {
                "weight": "",
                "quantity": "1"
              },
              "fare_class": "U"
            },
            "flight_code": "THEO2E"
          }
        ]
      },
      {
        "way": "OUTBOUND",
        "total_duration_in_min": 495,
        "travel_sections": [
          {
            "technical_stops": 0,
            "connection_duration_in_min": null,
            "stopover_duration_in_min": null,
            "duration_in_min": null,
            "clubmed_transport": false,
            "cancellation_policy_type": "THEO",
            "departure": {
              "date": "20240629",
              "time": "16:40:00",
              "city": {
                "id": "FDF",
                "label": "FORT DE FRANCE"
              },
              "location": {
                "id": "FDF",
                "label": "FORT DE FRANCE",
                "terminal_code": ""
              }
            },
            "arrival": {
              "date": "20240630",
              "time": "06:55:00",
              "city": {
                "id": "PAR",
                "label": "PARIS"
              },
              "location": {
                "id": "ORY",
                "label": "PARIS-ORLY",
                "terminal_code": "3"
              }
            },
            "transport": {
              "type": "PLANE",
              "class": "PLANE_ECONOMY",
              "travel_number": "841",
              "vehicle_type": "BOEING 777-200/300",
              "company": {
                "operator": {
                  "id": "AF",
                  "label": "AIR FRANCE",
                  "logo": "https://ns.clubmed.com/it/2013/img/be/airline_logos/AF.png"
                },
                "exploiter": {
                  "id": "AF",
                  "label": "AIR FRANCE",
                  "logo": "https://ns.clubmed.com/it/2013/img/be/airline_logos/AF.png"
                }
              },
              "baggage": {
                "weight": "",
                "quantity": "1"
              },
              "fare_class": "U"
            },
            "flight_code": "THEO2E"
          }
        ]
      }
    ]
  }
]
```
