Price calendar

  • Product Information
  • Shopping calendar
  • 1 route
How do I retrieve the price calendar for a resort product?

This scenario explains how to retrieve the pricing calendar of a product in order to compare dates, durations, and pricing signals before starting a search or a proposal flow.

Overview

Use GET/v2/products/{product_id}/calendar to expose the calendar view attached to a product. It is useful to compare available periods, price levels, and date-specific conditions before choosing a departure.

Prerequisites

  • product_id must be known.
  • Some query parameters such as duration may be required depending on the use case.
  • accept-language and x-api-key are required on the documented call.
1

Retrieve the price calendar

Mandatory

Use GET/v2/products/{product_id}/calendar to retrieve a price-oriented calendar for one product once the journey already knows the target duration.

Prerequisites

  • Header accept-language
  • Header x-api-key
  • Optional header authorization
  • Path product_id
  • Required query duration
  • Optional query departure_option_id
  • Optional query number_attendees
  • Optional query birthdates
  • Optional query first_date
  • Optional query last_date

Calling CURL

curl --get "https://api.clubmed.com/v2/products/MPAC/calendar" \
  -H "accept-language: en-US" \
  -H "x-api-key: <your-api-key>" \
  --data-urlencode "duration=7" \
  --data-urlencode "number_attendees=2" \
  --data-urlencode "first_date=2022-04-15" \
  --data-urlencode "last_date=2022-05-15"

Example answer

{
  "months": [
    {
      "id": "201511",
      "days": [
        {
          "id": "20151129",
          "availability": "OPEN",
          "sibling_id": "CHAC_SUMMER",
          "price": {
            "currency": "EUR"
          },
          "terms_and_conditions": {
            "duration": 7,
            "package": "AI",
            "departure_city": {
              "id": "PAR",
              "label": "Paris"
            }
          }
        }
      ]
    }
  ]
}

info: The calendar response is designed for comparison. Use availability, price hints and terms_and_conditions to highlight the best departures before the user enters a deeper booking flow.


Response codes

  • 200: calendar returned successfully.
  • 400: missing duration, bad request or validation error.
  • 401: unauthorized when a protected context is requested.
  • 404: unknown product.
GET/v2/products/{product_id}/calendar
See more