Retrieve resort opening periods

  • Destinations
  • Resort content
  • 2 routes
How do I retrieve the opening dates and period information of a resort?

This scenario explains how to retrieve the opening dates of a resort and complement them with the exploitation, event, or closure periods exposed by the period-information route. It fits product-content and operational-information journeys.

The flow starts with opening dates, then enriches the result with the period-information endpoint for the same product_id.

Overview

This scenario helps an application expose the calendar markers that describe when a resort is open and which specific periods apply to it.

Prerequisites

  • A valid product_id.
  • A valid accept-language header and x-api-key.
  • Optionally an authorization context when the consuming application requires one.

Expected result

The application can display a resort's opening timeline and complement it with the exploitation, event, or closure periods needed by content or operational screens.

Process workflow

Legend:
Mandatory
Optional
1

Retrieve the product opening dates

Mandatory

Use GET/v0/products/{product_id}/opening_dates to retrieve the opening windows of a resort product. This first check is useful when you need to know whether a resort is open on the target travel period before exploring more detailed seasonal information.

Prerequisites

  • Provide product_id.
  • Send accept-language and x-api-key.
  • Optionally add date_format if you want ISO-formatted dates.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v0/products/MPAC/opening_dates?date_format=ISO' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

[
  {
    "opening": "2020-12-01",
    "closing": "2020-12-31"
  }
]

info: Reuse these dates as a first availability frame. The detailed opening logic per period is returned by the next periods_info step.


Response codes

  • 200 OK: returns the opening windows for the selected product.
  • 400 Bad Request: the request format or one parameter is invalid.
  • 404 Not Found: the product cannot be found.
GET/v0/products/{product_id}/opening_dates
See more
2

Retrieve the detailed resort periods

Optional

Use GET/v1/products/{product_id}/periods_info to retrieve the detailed periods attached to a resort product, such as exclusivity, opening, or other commercial periods. This complements the opening dates with more explicit operational periods.

Prerequisites

  • Provide product_id.
  • Send accept-language and x-api-key.
  • Keep the same product and locale as in the opening-dates step.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v1/products/MPAC/periods_info' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

[
  {
    "type": "EXCLUSIVITY",
    "start_date": "2020-12-01",
    "end_date": "2020-12-31"
  }
]

info: This route is useful when the application needs to explain why a period is highlighted or constrained, not only whether the resort is open.


Response codes

  • 200 OK: returns the detailed periods available for the product.
  • 400 Bad Request: the request format or one parameter is invalid.
  • 404 Not Found: the product cannot be found.
GET/v1/products/{product_id}/periods_info
See more