Refresh a proposal

  • Option creation
  • 1 route
How can I recalculate a proposal with up-to-date stock and pricing?

This scenario explains how to refresh an existing proposal so the application can re-evaluate price, stock, option duration, and transport information before continuing the booking flow.

It is useful after a delay, after a stock-sensitive change, or whenever the interface must confirm that the proposal is still usable before prebooking or booking creation.

Overview

Use this scenario when an existing proposal must be recalculated before it is displayed again, reused, or converted in the next booking step. The refresh route returns an updated proposal with current pricing, remaining stock, option duration, and the main bookability indicators.

Prerequisites

  • A valid proposal_id.
  • The accept-language and x-api-key headers.
  • Depending on the channel, an authorization context may be required.
  • The proposal must already exist and still be accessible in the caller context.

Expected result

The application can confirm whether the proposal is still usable, detect a price or stock variation, and decide whether the booking flow can continue or whether a new search is required.

1

Refresh the proposal

Mandatory

Use POST/v1/proposals/{proposal_id}/refresh to recalculate an existing proposal with the latest stock and pricing before continuing the booking journey.

Prerequisites

  • Keep a valid proposal_id.
  • Send accept-language and x-api-key.
  • Add Authorization: Bearer YOUR_TOKEN when your channel requires an authenticated context.

Calling CURL

curl -X POST \
  -H "accept-language: en-US" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.clubmed.com/v1/proposals/{proposal_id}/refresh"

Example answer

{
  "id": "123456",
  "product_id": "MPAC",
  "price": {
    "total": 9815.4,
    "currency": "EUR",
    "total_without_transport": 9005.4
  },
  "remaining_stock": 2,
  "option_available": true,
  "option_durability": {
    "expiration_date_time": "20160415T10:23:00.234Z",
    "is_reliable": true
  },
  "is_bookable": false
}

info: Compare price, remaining_stock, and option_durability with the values previously displayed to decide whether the user can continue without launching a new search.


Response codes

  • 200 OK: the refreshed proposal is returned.
  • 400 Bad Request: the request is invalid or the payload format is rejected.
  • 401 Unauthorized: authentication is required but missing or invalid.
  • 403 Forbidden: access to this proposal is forbidden in the current context.
  • 404 Not Found: not documented in Swagger.
  • 409 Conflict: at least one proposal service is no longer available.
POST/v1/proposals/{proposal_id}/refresh
See more