Impact Migration of the endpoint v0/offers to v1/offers

  • Outdated
  • January 2, 2025
  • 1 related route

Context

Upgrade from GET - /v0/offers to GET - /v1/offers

Key benefits : This new version allows to retrieve all the offers configured in the CMS. No more check on the configuration of the offer in ICC. ➕ A filter has been added in param ➕ A field type has been added in the output


As a BE B2B Dev I want to be able to retrieve all the offers from the CMS In order to display it on my front end


Impacts

Route to call :

  • GET - /v1/offers

Input

Ajout en param d'un champ Filter:

filter: string composed of a field name (can be a path), a comparison operator (>, >=, <=, <, ==, !=) and a value. Logical operator AND applies between filters

Output Became

[
  {
    "id": "EBB",
    "label": "Early Booking Rates",
    "short_label": "Early Booking Rates",
    "seo_label": "early booking rates",
+  "type": "GENERIC",
    "description": "The earlier you book, the more you save.",
    "seo_description": "the earlier you book, the more you save",
    "image": "https://ns.clubmed.com/amn/2016/PZ/ebr-immersive-en.jpg",
    "commercial_argument": "BOOK SUMMER '17 ESCAPES FROM $115",
    "timing_argument": "OFFER EXTENDED! BEST OFFER GUARANTEE!",
    "legal_information": "Sample price is per person, based on double occupancy in a Club category room on select weeks at Ixtapa Pacific, Mexico and Turkoise, Turks & Caicos...",
    "color": "#C39614"
  }
]

Output Model

Champ API O/F Description Type Exemple
type O Indicates to which type the concerned offer belong. Generic offers are the one that can be applied to a proposal. Specific offers are the one that retrieve information from the content manager ENUM: ["GENERIC", "SPECIFIC"] GENERIC