Impact migration of the route GET /v0/offers/{offer_id}

  • Outdated
  • June 5, 2023
  • 1 related route

Context

Upgrade from GET/v0/offers/{offer_id} to ** GET** - GET/v1/offers/{offer_id}

Key benefits : Get a standardized ressource ℹ️ This ressource's structure is based on /calendar and /Search_price ressources

As a Shopping dev I want to get a standardized price's bloc In order to integrate it easily in the shopping views


Impacts

Route to call :

GET/v1/offers/{offer_id}

{
    "id": "EBB",
    "label": "Early Booking Rate",
    "seo_label": "early booking rates",
    "short_label": "Early Booking Rates ",
    "description": "Be an early booker and **save up to 50% OFF** on your Summer & Winter 2022 vacations-eserve your spot today for the lowest price. **Book by July 30th, 2022 travel between February 18, 2022 to June 30, 2023.**",
    "seo_description": "The earlier you book, the best your rate is going to be. Take advantage of Club Med all inclusive booking deals and plan your 2022 vacation ahead.",
    "image": "https://zupimages.net/up/22/11/6wtd.jpg",
    "commercial_argument": "Up to 50% OFF",
    "timing_argument": "Early Booking Rate",
    "legal_information": "To see our Flexible Cancellations Conditions, ",
    "color": "#C39614",
    "products": [
      {
!        "product_id": "CANC",
        "price": {
          "currency": "EUR",
-          "initial_price":
-          {
-              "per_adult_per_trip": 975,
-              "per_adult_per_trip_with_fees": 1002.5,
-              "per_adult_per_night": 140,
-              "per_adult_per_night_with_fees": 144,
-              "per_trip": 975,
-              "per_trip_with_fees": 1002.5,
-              "per_night": 140,
-              "per_night_with_fees": 144
-          },
-          "best_price":
-          {
-              "per_adult_per_trip": 824,
-              "per_adult_per_trip_with_fees": 851.5,
-              "per_adult_per_night": 118,
-              "per_adult_per_night_with_fees": 122,
-              "per_trip": 824,
-              "per_trip_with_fees": 851.5,
-              "per_night": 118,
-              "per_night_with_fees": 122
-          },
-          "fee":
-          {
-              "per_adult_per_trip": 27.5,
-              "per_adult_per_night": 4,
-              "per_trip": 27.5,
-              "per_night": 4
-          },
+          "per_trip": {
+            "fees_amount": 60,
+            "initial_price": 2460.01,
+            "best_price": 1230.01
+          },
+          "per_night": {
+            "fees_amount": 9,
+            "initial_price": 352,
+            "best_price": 176
+          }
        },
        "terms_and_conditions": {
-          "price_per": "ADULT",
-          "package": "ALL_INCLUSIVE",
-          "departure_date": "2023-08-26",
-          "arrival_date": "2023-08-26",
-          "duration": 7,
-          "total_duration": 7,
-          "number_of_rooms_available_for_this_comfort": 14,
-          "number_of_adults": 2,
-          "accommodation_id": "C",
-          "accommodation_comfort_label": "Superior Room - Ground Level"
+          "occupancy_rate": 22.89,
+          "departure_city": {
+            "id": "PAR",
+            "label": "Paris"
+          },
+          "departure_location": {
+            "id": "CDG",
+            "label": "Charles de Gaulle airport"
+          },
+          "accommodations": [
+            {
+              "id": "C2",
+              "label": "",
+              "_links": [
+                {
+                  "rel": "accommodation_detail_v2",
+                  "method": "GET",
+                  "href": "https://api.staging.clubmed.com/v2/products/GMAC_WINTER/accommodations/C2"
+                }
+              ]
+            }
+          ],
+          "package": "AI",
+          "departure_date": "20230409",
+          "arrival_date": "20230409",
+          "duration": 7,
+          "transport_duration_in_min": null,
+          "total_duration": 7,
+          "adults_count": 2,
+          "children_count": 0,
+          "flights_connection_count": {
+            "inbound": 1,
+            "outbound": 0
+          },
+          "_links": [
+            {
+              "rel": "package_detail",
+              "method": "GET",
+              "href": "https://api.staging.clubmed.com/v0/products/GMAC_WINTER/packages/AI"
            }
          ]
        },
+       "_links": [
+         {
+              "rel": "product_detail",
+              "method": "GET",
+              "href": "https://api.staging.clubmed.com/v0/products/GMAC_WINTER/"
          }
      }
    ]
  }

Model

Champ APIO/FnullableTypeDescriptionExample
price.currencyO stringIndicates the currencyEUR
price.per_trip.fees_amountO numberIndicates the fee amount0
price.per_trip.initial_priceO numberIndicates the initial trip price0
price.per_trip.best_priceO numberndicates the best trip price0
price.per_night.fees_amountO numberIndicates the fee amount0
price.per_night.initial_priceO numberIndicates the initial night price0
price.per_night.best_priceO numberIndicates the best night price0
terms_and_conditions.occupancy_rateO ENUMrate of occupancy of the product0
terms_and_conditions.packageO ENUM?Package codeAI
terms_and_conditions.departure_cityOYes   
terms_and_conditions.departure_city.idN stringDeparture city's idPAR
terms_and_conditions.departure_city.labelN stringDeparture city's labelParis
terms_and_conditions.departure_locationOYes   
terms_and_conditions.departure_location.idN stringDeparture location's idCDG
terms_and_conditions.departure_location.labelN sringDeparture location's labelCharles de Gaulles Airport
terms_and_conditions.accommodations.idO stringAccommodation's idC3
terms_and_conditions.accommodations.labelO stringAccommodation's labelChambre Club
terms_and_conditions.accommodations._links.methodO ENUMAccommodation additional infomration's methodGET
terms_and_conditions.accommodations._links.hrefO stringAccommodation additionnal information's linkapi.clubmed.com/v1/products/AGAC
terms_and_conditions.accommodations._links.relO stringAccommodation additional information's relation linkproduct_detail
terms_and_conditions.departure_dateO stringDeparture date (YYYYMMDD format)20230101
terms_and_conditions.arrival_dateO stringArrival date (YYYYMMDD format)20230101
terms_and_conditions.durationO numberStay's duration7
terms_and_conditions.transport_duration_in_minOnullnumberIndicates the transport duration in min747
terms_and_conditions.total_durationO numberTotal booking duration7
terms_and_conditions.adults_countO numberIndicates the number of adults1
terms_and_conditions.children_countO numberIndicates the number of children0
terms_and_conditions.flights_connection_countOYes   
terms_and_conditions.flights_connection_count.inboundN numberNumber of inbound flight's connection1
terms_and_conditions.flights_connection_count.outboundN numberNumber of outbound flight's connection1
terms_and_conditions._links.methodO ENUMAdditional infomration's methodGET
terms_and_conditions._links.hrefO stringAdditionnal information's linkapi.clubmed.com/v1/products/AGAC
terms_and_conditions._links.relO stringAdditional information's relation linkproduct_detail
_links.methodO ENUMAdditional infomration's methodGET
_links.hrefO stringAdditionnal information's linkapi.clubmed.com/v1/products/AGAC
_links.relO stringAdditional information's relation linkproduct_detail

Specific evolutions


New values form

ChampAncienne valeur ❌Nouvelle valeur ✅
terms_and_conditions.packageALL_INCLUSIVEAI
terms_and_conditions.departure_date2023-01-0120230101
terms_and_conditions.arrival_date2023-01-0120230101

New parameter name

💡 prodcuts.id becomes products.product_id