Upgrade from GET /v0/proposals/{proposal_id}/accommodations_arrangement to GET /v1/proposals/{proposal_id}/accommodations_arrangement

  • Outdated
  • April 30, 2024
  • 1 related route

Context

Upgrade from GET - /v0/proposals/{proposal_id}/accommodations_arrangement to GET - /v1/proposals/{proposal_id}/accommodations_arrangement

Key benefits : Having uniform values in our API endpoints


As a BE B2B Dev I want to be able to use the same mapping for all accommodation_arrangements endpoints In order to avoid multiple mappings for the same fields in several endpoints


Impacts

Route to call :

  • GET - /v1/proposals/{proposal_id}/accommodations_arrangement
[
  {
--    "accommodation_id": "A2",
++   "id": "A2", 
    "label": "Club room",
    "occupancy": 2
    "quantity": 2,
    "shared_room": false,
    "attendees": [
      {
        "id": "A",
        "type": "MAIN",
        "birthdate": "19840517",
        "customer_id": "143890448"
      }
    ],
    "accommodation_categories": [
      {
        "id": "000021",
        "label": "5-Trident Luxury Space Deluxe",
        "_links": [
          {
            "method": "GET",
            "href": "https://api.clubmed.com/v1/products/AGAC",
            "rel": "product_detail"
          }
        ]
      }
    ],
    "_links": [
      {
        "rel": "accommodation_detail",
        "method": "GET",
        "href": "https://api.clubmed.com/v1/products/AGAC/accommodations/A2"
      }
    ]
  }
]