Impact Migration of POST/v0/accommodations_arrangement/search to POST /v1/accommodations_arrangement/search

  • Obsolète
  • 9 mars 2025
  • 1 route liée

Upgrade from POST/v0/accommodations_arrangement/search to POST/v1/accommodations_arrangement/search

ℹ️ In the Response -> the differential_prices. offer_types tab becomes a list of objects discounts in a tab And we add a new field discounts.code

Impacts

Call POST/v1/accommodations_arrangement/search instead of POST/v0/accommodations_arrangement/search

Output

Example value

[
  {
    "differential_prices": [
      {
--    "offer_types": [
--          "ROL"
--        ],
        "discounts": [
          {
++            "offer_id": "ROL",
++            "code": "ROLLIN",
++            "_links": [
++              {
++                "rel": "offer_detail_v1",
++                "method": "GET",
++                "href": "https://api.staging.clubmed.com/v1/offers/ROL"
              }
            ]
          }
        ],
        "amount": -50.5,
        "currency": "EUR"
      }
    ],
    "remaining_stock": 5,
    "is_upgradable_online": true,
    "accommodation_arrangement": [
      {
        "id": "A2",
        "quantity": 2,
        "occupancy": 2,
        "shared_room": true,
        "attendees": [
          {
            "id": "A",
            "type": "MAIN",
            "birthdate": "20100430",
            "customer_id": "143890448"
          }
        ],
        "accommodation_categories": [
          {
            "id": "000021",
            "label": "5-Trident Luxury Space Deluxe",
            "_links": [
              {
                "rel": "self",
                "method": "GET",
                "href": "https://api.clubmed.com/products",
                "label": "A label"
              }
            ]
          }
        ],
        "_links": [
          {
            "rel": "self",
            "method": "GET",
            "href": "https://api.clubmed.com/products",
            "label": "A label"
          }
        ]
      }
    ]
  }
]

Model

Champ APIO/FDescriptionTypeExemple
discounts.codeOOffer codeStringFRFAM