Save and consult proposals for a customer

  • Customers
  • Booking
  • 4 routes
How do I search, save, and later consult proposals for a customer?

This scenario explains how to create a proposal, qualify its attendees, save a proposal summary in a customer account, and retrieve the saved summaries later.

Overview

The route sequence POST/v3/proposals/search -> PUT/v3/proposals/{proposal_id}/attendees -> POST/v0/customers/{customer_id}/proposals_summary -> GET/v0/customers/{customer_id}/proposals_summary lets an operator persist proposal snapshots for later reuse.

Prerequisites

  • customer_id must identify an existing customer account.
  • A proposal must exist before attendees can be attached or a summary can be saved.
  • accept-language and x-api-key are required on the documented calls.

Process workflow

Legend:
Mandatory
Optional
1

Search a proposal

Mandatory

Use POST/v3/proposals/search to generate a proposal candidate from stay criteria before attaching it to a customer account.

Prerequisites

  • Header accept-language
  • Header x-api-key
  • Optional header authorization
  • The request body carries the stay criteria, product context and traveller composition. The exact full body schema is not fully visible in the available contract excerpt.

Calling CURL

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

Example answer

{
  "id": "123456",
  "product_id": "MPAC",
  "package_id": "AI",
  "resort_arrival_date": "2022-04-15T10:23:00.234Z",
  "resort_departure_date": "2022-04-15T10:23:00.234Z",
  "price": {
    "total": 9815.4,
    "currency": "EUR"
  },
  "accommodations": [
    {
      "id": "C",
      "quantity": "1",
      "shared_room": false
    }
  ],
  "option_available": true
}

info: Save the returned id as proposal_id. If the payload also exposes alternative_price, option_durability or remaining_stock, keep these fields to enrich the commercial summary displayed to the customer.


Response codes

  • 200: proposal returned successfully.
  • 400: invalid or inconsistent booking criteria, invalid departure option, validation error, or invalid JSON payload.
  • 401: unauthorized.
  • 403: at least one customer or seller context is not allowed to proceed.
  • 404: unknown product.
  • 409: the proposal criteria are no longer valid or the economic control is no longer usable.
POST/v3/proposals/search
See more
2

Attach attendees to the proposal

Mandatory

Use PUT/v3/proposals/{proposal_id}/attendees to bind the traveller identities to the proposal returned by the search step before saving it in a customer account.

Prerequisites

  • Header accept-language
  • Header x-api-key
  • Header authorization
  • Path proposal_id
  • Optional query partner_type
  • Optional query call_id
  • The request body carries the attendees to attach. The exact full body schema is not fully visible in the available contract excerpt.

Calling CURL

curl -X PUT "https://api.clubmed.com/v3/proposals/123456/attendees" \
  -H "accept-language: en-US" \
  -H "authorization: Bearer <token>" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json"

Example answer

[
  {
    "attendees": [
      {
        "id": "A",
        "customer_id": "123456789",
        "customer_status": "NEW_CUSTOMER",
        "loyalty_status": "GOLD"
      }
    ]
  }
]

info: Reuse the returned attendee and customer mapping in the next persistence step. This makes the saved proposal easier to reopen in the exact customer context.


Response codes

  • 200: attendees attached successfully.
  • 400: invalid partner type, reused identity document, validation error, or invalid request body.
  • 401: unauthorized.
  • 403: forbidden.
  • 409: the proposal is no longer valid for the requested economic context.
PUT/v3/proposals/{proposal_id}/attendees
See more
3

Save the proposal summary for a customer

Mandatory

Use POST/v0/customers/{customer_id}/proposals_summary to persist the selected proposal in the customer account so it can be listed and reopened later.

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. Reuse the proposal identifier and customer context built in the previous steps.

Calling CURL

curl -X POST "https://api.clubmed.com/v0/customers/123456789/proposals_summary" \
  -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 route confirms that the proposal summary is stored for the customer. The detailed response body is not exposed in the available contract excerpt.


Response codes

  • 201: proposal summary saved successfully.
  • 400: bad request, validation error, or invalid JSON payload.
  • 401: unauthorized.
  • 403: customer mismatch, issuer mismatch, or locale mismatch.
POST/v0/customers/{customer_id}/proposals_summary
See more
4

Retrieve saved proposal summaries

Mandatory

Use GET/v0/customers/{customer_id}/proposals_summary to list the proposal summaries already stored for a customer account and resume a saved sales journey.

Prerequisites

  • Header accept-language
  • Header authorization
  • Header x-api-key
  • Path customer_id
  • Optional query date_format
  • Optional query min_reservation_date
  • Optional query max_reservation_date
  • Optional query discount_id

Calling CURL

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

Example answer

[
  {
    "id": "1021744",
    "product_id": "MPAC",
    "resort_arrival_date": "2022-04-15",
    "resort_departure_date": "2022-04-15",
    "adults_count": 2,
    "children_count": 4,
    "type": "PRE_BOOKING",
    "is_bookable": true,
    "transport_summary": {
      "transport_type": "PLANE",
      "departure_city": "BRUXELLES",
      "arrival_city": "MARRAKECH"
    },
    "reservation_date": "2022-04-15"
  }
]

info: Reuse the returned summary id, travel dates and transport context to rebuild a proposal history or reopen a customer conversation from a previously saved search.


Response codes

  • 200: saved proposal summaries returned successfully.
  • 400: invalid date filters, invalid discount filter, validation error, or a promotion already applied or already used.
  • 401: unauthorized.
  • 403: customer mismatch, issuer mismatch, or locale mismatch.
  • 404: no accessible resource found for the targeted request context.
GET/v0/customers/{customer_id}/proposals_summary
See more