Use this route to create or retrieve the best proposal matching the stay criteria sent by your integration. The response returns the proposal identifier to reuse when attaching attendees in the next step.
Prerequisites
accept-language and x-api-key are required.
- The request body must carry the proposal search criteria expected by your journey.
- Keep the returned
id: it will be reused as proposal_id in the next step.
Calling CURL
curl -X 'POST' \
'https://api.clubmed.com/v1/proposals/search/best' \
-H 'accept: application/json' \
-H 'accept-language: en-US' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json'
Example answer
{
"id": "123456",
"product_id": "MPAC",
"booking_id": 123456,
"package_id": "AI",
"label": "Proposal with one club room",
"price": {
"total": 9815.4,
"currency": "EUR"
},
"option_durability": {
"expiration_date_time": "20160415T10:23:00.234Z",
"is_reliable": true
},
"households": [
{
"attendees": [
{
"id": "A",
"birthdate": "20100430",
"customer_id": "string",
"customer_type": "NEW_CUSTOMER"
}
]
}
],
"is_bookable": false
}
info: the response can also expose alternative_price, included_services, and package_options when the proposal calculation contains promotions or optional services.
Response codes
- OK Response (200): the proposal was created or retrieved successfully and the payload returns the reusable proposal context.
- Error (400): the criteria or payload are invalid, incomplete, or inconsistent with the attendee and accommodation rules documented in Swagger.
- Error (401): the request is unauthorized because the authentication data or API key is missing, invalid, or expired.
- Error (403): at least one customer carried by the criteria is not allowed to proceed with the booking flow.
- Error (404): the requested product is unknown for the provided
product_id.