Retrieve resort media

  • Resort content
  • 2 routes
How can I retrieve the pictures and videos of a resort product?

This scenario explains how to retrieve the visual assets associated with a resort product so they can be reused in a product page, a destination gallery, or a promotional surface.

The flow combines the pictures endpoint and the videos endpoint to expose the main media available for the same product_id.

Overview

Use this scenario to retrieve the visual media associated with a resort product. It is useful when a digital experience needs to display hero images, gallery content, or embedded video assets on a product or destination page.

Prerequisites

  • A valid product_id.
  • The accept-language and x-api-key headers.
  • A front-end or CMS component able to reuse image URLs and video URLs returned by the API.

Expected result

The application can retrieve the main pictures and videos of a resort product and reuse them to build visual storytelling, gallery sections, or promotional blocks.

Process workflow

Legend:
Mandatory
Optional
1

Retrieve resort pictures

Mandatory

Use GET/v1/products/{product_id}/pictures to retrieve the pictures associated with a resort product and expose the image assets needed by a gallery or a hero section.

Prerequisites

  • Know a valid product_id.
  • Send accept-language and x-api-key.
  • Call this step when the experience needs still images rather than video assets.

Calling CURL

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

Example answer

[
  {
    "url": "http://image.jpg",
    "keywords": [
      "MAIN_KEY_VISUAL"
    ]
  }
]

info: Reuse url to render the image asset and keywords to distinguish a hero visual from other gallery pictures when your front-end supports media ranking.


Response codes

  • OK Response (200): the pictures linked to the product are returned.
  • Error (400): the request is invalid or the product_id is malformed.
  • Error (401): not documented in Swagger.
  • Error (403): access to the product pictures is forbidden in the current context.
  • Error (404): the product is unknown or cannot be found.
GET/v1/products/{product_id}/pictures
See more
2

Retrieve resort videos

Optional

Use GET/v0/products/{product_id}/videos to retrieve the video URLs associated with a resort product and complement the image assets returned by the pictures route.

Prerequisites

  • Know a valid product_id.
  • Send accept-language and x-api-key.
  • Call this step when the experience needs playable video content in addition to still images.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v0/products/{product_id}/videos' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

[
  "http://image.jpg"
]

info: The route returns direct video URLs. Reuse them to embed a player, enrich a hero block, or complete a resort gallery with motion content.


Response codes

  • OK Response (200): the video URLs linked to the product are returned.
  • Error (400): the request is invalid or the product_id is malformed.
  • Error (401): not documented in Swagger.
  • Error (404): the product is unknown or cannot be found.
GET/v0/products/{product_id}/videos
See more