---
uuid: 7209d368-8af7-4efe-ad83-5470ce154a29
date_created: 2025-08-14T15:32:02.387Z
date_updated: 2026-04-03T17:59:11.543Z
seo_url: prebooking-path
category: Prebooking
tags: 
  - Booking
routes: 
  - POST /v1/proposals/search/best
  - POST /v1/prebookings
---

# Prebooking Path

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

## Flow

```mermaid
flowchart LR
    step0["Generate the best proposal"]
    step1["Create the prebooking"]
    step0 --> step1
    classDef optional fill:transparent,stroke:#ffffff,color:#ffffff,stroke-width:1px,stroke-dasharray: 6\,4
    class step0 optional
```

## 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.

## 1 - Generate the best proposal

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

```bash
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

```json
{
  "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.

**Related route**: [POST https://api.clubmed.com//v1/proposals/search/best](https://api.clubmed.com/doc?search=POST%20%2Fv1%2Fproposals%2Fsearch%2Fbest)

## 2 - Create the prebooking

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

```bash
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

```json
[
  {
    "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.

**Related route**: [POST https://api.clubmed.com//v1/prebookings](https://api.clubmed.com/doc?search=POST%20%2Fv1%2Fprebookings)
