Proposals: advanced room allocation

  • Option creation
  • 3 routes
How do I fine-tune room allocation in a proposal?

This scenario details the advanced journey used to choose rooms precisely within an existing proposal and assign attendees to each room.

Unlike the standard room flow, it gives full control over available inventory, simulation of the target arrangement, and final application of the new configuration.

Overview

Use this journey when the default room allocation is not enough and you need to compose the room arrangement manually.

Prerequisites

  • Have a valid proposal_id obtained from a proposal search.
  • Know which attendees must be assigned and the expected occupancy constraints.
  • Check stock and price impacts before the final update, because availability is not frozen during the simulation.

Process workflow

Legend:
Mandatory
Optional
1

Retrieve available accommodation options

Mandatory

Use GET/v0/accommodations_arrangement to list the accommodation combinations that can be considered before choosing a more detailed room allocation.

Prerequisites

Prepare the parameters required by the call. Keep x-api-key and, when the route is customer-scoped, a valid bearer token.

Calling CURL

curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept-language: en-US" \
  "https://api.clubmed.com/v0/accommodations_arrangement"

Example answer

[
  {
    "id": "A2",
    "remaining_stock": 11,
    "occupancy": 2,
    "eligible_attendees": [
      "A",
      "B"
    ]
  }
]

info: Compare remaining_stock, occupancy, and eligible_attendees before choosing the arrangement you want to validate next.


Response codes

  • 200 OK: the expected data is returned.
  • 400 Bad Request: the request is invalid or incomplete.
  • 404 Not Found: the requested resource cannot be found.
GET/v0/accommodations_arrangement
See more
2

Check the room allocation

Optional

Use POST/v1/accommodations_arrangement/check to simulate a room allocation and validate that the selected split is still coherent before applying it.

Prerequisites

Prepare the parameters required by the call. Keep x-api-key and, when the route is customer-scoped, a valid bearer token. Validate the request body before the call to avoid a validation error.

Calling CURL

curl -X POST \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept-language: en-US" \
  -H "Content-Type: application/json" \
  -d '[{"id": "room-1", "occupancy": 2, "attendees": [{"id": "attendee-1"}, {"id": "attendee-2"}]}]' \
  "https://api.clubmed.com/v1/accommodations_arrangement/check"

Example answer

[
  {
    "id": "room-1",
    "remaining_stock": 3,
    "differential_prices": {
      "amount": 120,
      "currency": "EUR"
    }
  }
]

info: Reuse the returned stock and differential pricing to decide whether this room split should be applied to the proposal.


Response codes

  • 200 OK: the operation succeeds and the resource is returned.
  • 400 Bad Request: the body or parameters are invalid.
  • 404 Not Found: the target resource cannot be found.
POST/v1/accommodations_arrangement/check
See more
3

Apply the room allocation

Mandatory

Use PUT/v1/proposals/{proposal_id}/accommodations_arrangement to apply the room allocation selected during the previous validation step.

Prerequisites

Prepare proposal_id. Keep x-api-key and, when the route is customer-scoped, a valid bearer token. Validate the request body before the call to avoid a validation error.

Calling CURL

curl -X PUT \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept-language: en-US" \
  -H "Content-Type: application/json" \
  -d '[{"id": "room-1", "occupancy": 2, "attendees": [{"id": "attendee-1"}, {"id": "attendee-2"}]}]' \
  "https://api.clubmed.com/v1/proposals/{proposal_id}/accommodations_arrangement"

Example answer

HTTP/1.1 204 No Content

info: Success may be returned without a response body. Read the resource again afterwards if you need to display the final state.


Response codes

  • 204 No Content: the operation is applied successfully.
  • 400 Bad Request: the body or parameters are invalid.
  • 404 Not Found: the target resource cannot be found.
PUT/v1/proposals/{proposal_id}/accommodations_arrangement
See more