Save and consult customer search criteria

  • Customers
  • Booking
  • 2 routes
How can I save and later retrieve search criteria in a customer account?

This scenario explains how to save a set of search criteria in a customer account and retrieve it later to restart a search from stored preferences.

Overview

Use POST/v0/customers/{customer_id}/bookmarks to persist saved searches and GET/v0/customers/{customer_id}/bookmarks to reload them from the customer space.

Prerequisites

  • customer_id must refer to an existing customer account.
  • Customer bookmark routes require the customer scope to be available.
  • accept-language and x-api-key are required on the documented calls.

Process workflow

Legend:
Mandatory
Optional
1

Save search criteria

Mandatory

Use POST/v0/customers/{customer_id}/bookmarks to persist a saved search in the customer account so the stay criteria can be reused in a later journey.

Prerequisites

  • Header accept-language
  • Header authorization
  • Header x-api-key
  • Path customer_id
  • The route expects a request body, but the detailed body schema is not visible in the available contract excerpt. The payload must carry the criteria to save, such as the targeted product and stay context.

Calling CURL

curl -X POST "https://api.clubmed.com/v0/customers/123456789/bookmarks" \
  -H "accept-language: en-US" \
  -H "authorization: Bearer <token>" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json"

Example answer

HTTP/1.1 201 Created

info: The detailed response body is not exposed in the available contract excerpt. Use this step when you need a durable account-level bookmark rather than a temporary front-end state.


Response codes

  • 201: bookmark saved successfully.
  • 400: bad request, validation error or invalid JSON payload.
  • 401: unauthorized.
  • 403: customer mismatch or issuer mismatch.
POST/v0/customers/{customer_id}/bookmarks
See more
2

Consult saved search criteria

Mandatory

Use GET/v0/customers/{customer_id}/bookmarks to retrieve the searches previously saved in the customer account and display them in a follow-up journey.

Prerequisites

  • Header accept-language
  • Header authorization
  • Header x-api-key
  • Path customer_id

Calling CURL

curl --get "https://api.clubmed.com/v0/customers/123456789/bookmarks" \
  -H "accept-language: en-US" \
  -H "authorization: Bearer <token>" \
  -H "x-api-key: <your-api-key>"

Example answer

[
  {
    "id": "1",
    "product_id": "MPAC",
    "resort_arrival_date": "20260117",
    "resort_departure_date": "20260117",
    "number_attendees": 2,
    "departure_option_id": "PAR",
    "price": {
      "amount": 80,
      "currency": "EUR"
    }
  }
]

info: Reuse the returned bookmark id and stay criteria to rebuild a saved search card or reopen the product selection in the exact same context.


Response codes

  • 200: saved searches returned successfully.
  • 400: bad request or validation error.
  • 401: unauthorized.
  • 403: customer mismatch or issuer mismatch.
GET/v0/customers/{customer_id}/bookmarks
See more