Prebooking Path

  • Booking
  • Prebooking
  • 2 routes
How do I turn a proposal search into a prebooking step?

This scenario shows how to search for the best proposal and immediately continue with the prebooking step used before booking creation.

Overview

The journey chains POST/v1/proposals/search/best with POST/v1/prebookings to move from proposal estimation to prebooking preparation.

Prerequisites

  • Booking criteria must be available for the proposal search.
  • The second step depends on the proposal context returned by the search step.
  • accept-language and x-api-key are required on the documented calls.

Process workflow

Legend:
Mandatory
Optional
1

Generate the best proposal

Optional

Use POST/v1/proposals/search/best to generate the best proposal candidate for the submitted criteria before entering the prebooking flow.

Prerequisites

  • Header accept-language
  • Header x-api-key
  • Optional header authorization
  • The request body carries the booking criteria. Its exact full schema is not fully visible in the available contract excerpt.

Calling CURL

curl -X POST "https://api.clubmed.com/v1/proposals/search/best" \
  -H "accept-language: en-US" \
  -H "x-api-key: <your-api-key>" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json"

Example answer

{
  "id": "123456",
  "product_id": "MPAC",
  "package_id": "AI",
  "duration": 7,
  "price": {
    "total": 9815.4,
    "currency": "EUR"
  },
  "remaining_stock": 2,
  "option_available": true
}

info: Save the returned proposal identifier and the pricing context. This response is the functional bridge between product selection and the prebooking request.


Response codes

  • 200: best proposal returned successfully.
  • 400: incomplete criteria, inconsistent attendee setup, invalid departure city, validation error or invalid JSON payload.
  • 401: unauthorized.
  • 403: at least one customer is not allowed to proceed with booking.
  • 404: unknown product.
POST/v1/proposals/search/best
See more
2

Create the prebooking

Mandatory

Use POST/v1/prebookings to transform the proposal context into a prebooking object that can enter the booking journey.

Prerequisites

  • Header accept-language
  • Header x-api-key
  • Optional header authorization
  • The request body is required, but its exact full schema is not visible in the available contract excerpt. Reuse the proposal context returned by the previous step.

Calling CURL

curl -X POST "https://api.clubmed.com/v1/prebookings" \
  -H "accept-language: en-US" \
  -H "x-api-key: <your-api-key>" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json"

Example answer

[
  {
    "customer_id": "123456789",
    "type": "MAIN"
  }
]

info: A successful prebooking confirms that the selected proposal can move into the booking flow. Keep the returned customer and attendee context to prepare the next booking calls.


Response codes

  • 200: prebooking created successfully.
  • 400: bad request, validation error or invalid JSON payload.
  • 401: unauthorized.
POST/v1/prebookings
See more