Search with transport

  • Transport
  • 4 routes
How do I search proposals and apply another transport option?

This scenario explains how to search a proposal with transport, inspect the transport currently attached to it, compare alternatives, and apply the selected option. It fits shopping and proposal-adjustment journeys with transportation changes.

The flow starts from proposal search, then reuses the proposal_id to inspect, compare, and update transport details.

Overview

This scenario helps an application manage transportation choices on a proposal that already includes transport context.

Prerequisites

  • The criteria needed to create a transport-enabled proposal.
  • A valid accept-language header and x-api-key.
  • The proposal_id returned by the search step to continue the transport flow.

Expected result

The application can display the current itinerary, compare available alternatives, and apply the selected transport to the proposal before the rest of the sales journey continues.

Process workflow

Legend:
Mandatory
Optional
1

Search transport-enabled proposals

Mandatory

Use POST/v3/proposals/search to search proposals that include transport-aware booking criteria and obtain a proposal_id that can be reused in the following transport steps.

Prerequisites

  • Send accept-language and x-api-key.
  • Add authorization when your context requires an authenticated user.
  • Prepare booking criteria aligned with the product, dates, attendees, and departure city.

Calling CURL

curl -X 'POST' \
  'https://api.clubmed.com/v3/proposals/search' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'authorization: Bearer YOUR_TOKEN' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Example answer

[
  {
    "id": "123456",
    "product_id": "MPAC",
    "price": {
      "total": 9815.4,
      "currency": "EUR"
    },
    "remaining_stock": 2,
    "transportation_summary": [
      {
        "departure_city": "Paris",
        "arrival_city": "Denpensar",
        "transportation_type": "PLANE"
      }
    ]
  }
]

info: Keep the returned proposal_id and reuse the same locale throughout the transport flow to avoid mismatched options.


Response codes

  • OK Response (200): returns one or more proposals matching the submitted transport-aware criteria.
  • Error (400): the criteria are invalid or incompatible with the transport context.
  • Error (401): authentication is missing, invalid, or expired.
  • Error (403): the caller is not allowed to use the submitted criteria.
  • Error (404): the requested product is unknown.
  • Error (409): the proposal criteria are no longer valid.
POST/v3/proposals/search
See more
2

Inspect the current transport details

Mandatory

Use GET/v5/proposals/{proposal_id}/transport_details to retrieve the transport currently attached to the proposal before comparing or replacing it.

Prerequisites

  • Reuse a valid proposal_id.
  • Send accept-language and x-api-key.
  • Call this step after the proposal search has returned a transport-capable proposal.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v5/proposals/123456/transport_details' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

{
  "journeys": [
    {
      "departure_city": "Paris",
      "arrival_city": "Punta Cana",
      "transportation_type": "PLANE"
    }
  ]
}

info: v5 is the latest non-deprecated transport-details route available for proposals in the canonical Swagger.


Response codes

  • OK Response (200): returns the transport currently attached to the proposal.
  • Error (400): the proposal is not eligible for transport updates or the request is invalid.
  • Error (401): non documented in Swagger.
  • Error (404): the proposal cannot be found.
GET/v5/proposals/{proposal_id}/transport_details
See more
3

List the applied and alternative transports

Mandatory

Use POST/v1/proposals/{proposal_id}/available_transports to retrieve the transport already applied to the proposal together with the alternative options that can still be selected.

Prerequisites

  • Reuse a valid proposal_id.
  • Send accept-language and x-api-key.
  • Call this step after checking the currently attached transport.

Calling CURL

curl -X 'POST' \
  'https://api.clubmed.com/v1/proposals/123456/available_transports' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

[
  {
    "applied": true,
    "time_validity_limit": "2026-04-15T10:23:00.234Z",
    "total_differential_price": {
      "amount": 0,
      "currency": "EUR"
    }
  }
]

info: Compare the differential price and the time-validity limit before persisting a new transport option on the proposal.


Response codes

  • OK Response (200): returns the applied transport and the selectable alternatives for the proposal.
  • Error (400): the proposal is not eligible for transport or the request is invalid.
  • Error (401): non documented in Swagger.
  • Error (404): the proposal cannot be found.
POST/v1/proposals/{proposal_id}/available_transports
See more
4

Apply the selected transport

Mandatory

Use POST/v5/proposals/{proposal_id}/transport_details to persist the transport selected by the user once the preferred option has been identified.

Prerequisites

  • Reuse a valid proposal_id.
  • Send accept-language and x-api-key.
  • Build the request body from one of the transport options returned by the previous transport routes.

Calling CURL

curl -X 'POST' \
  'https://api.clubmed.com/v5/proposals/123456/transport_details' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Example answer

{
  "journeys": [
    {
      "departure_city": "Paris",
      "arrival_city": "Punta Cana",
      "transportation_type": "PLANE"
    }
  ],
  "time_validity_limit": "2026-04-15T10:23:00.234Z"
}

info: Build the POST body from a previously listed option rather than inventing a transport payload from scratch.


Response codes

  • OK Response (200): returns the transport now attached to the proposal.
  • Error (400): the proposal is not eligible for transport or the submitted selection is invalid.
  • Error (401): non documented in Swagger.
  • Error (404): the proposal is not found or the selected flight is no longer available.
POST/v5/proposals/{proposal_id}/transport_details
See more