Retrieve booking sales contract

  • Bookings
  • Booking docs
  • 2 routes
How do I list and download the sales contracts attached to a booking?

This scenario explains how to list all sales contracts attached to a booking and then retrieve one specific contract for download or display.

Overview

Use the two customer-scoped routes to first enumerate the sales contracts linked to a booking, then target a specific contract_id for detailed retrieval.

Prerequisites

  • customer_id and booking_id must identify an existing booking in customer scope.
  • contract_id is needed for the second step.
  • accept-language, authorization, and x-api-key are required on the documented calls.

Process workflow

Legend:
Mandatory
Optional
1

List sales contracts for a booking

Mandatory

Use GET/v0/customers/{customer_id}/bookings/{booking_id}/sell_contracts to list the contractual documents attached to a booking before selecting one for download or display.

Prerequisites

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

Calling CURL

curl -X GET "https://api.clubmed.com/v0/customers/123456789/bookings/0123456789/sell_contracts" \
  -H "accept-language: en-US" \
  -H "authorization: Bearer <token>" \
  -H "x-api-key: <your-api-key>"

Example answer

[
  {
    "id": "EUR",
    "type": "TCS",
    "label": "Terms and Conditions of Service"
  }
]

info: Use the returned id as contract_id in the next step. The list step is the safest way to expose only the documents effectively available for a booking.


Response codes

  • 200: sales contracts returned successfully.
  • 400: bad request or validation error.
  • 401: unauthorized.
  • 403: customer mismatch, issuer mismatch or locale mismatch.
GET/v0/customers/{customer_id}/bookings/{booking_id}/sell_contracts
See more
2

Download a specific sales contract

Mandatory

Use GET/v0/customers/{customer_id}/bookings/{booking_id}/sell_contracts/{contract_id} with one identifier returned by the previous step to retrieve the selected contract document.

Prerequisites

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

Calling CURL

curl -X GET "https://api.clubmed.com/v0/customers/123456789/bookings/0123456789/sell_contracts/b2c3ed75-763c-4042-b84b-f35059368108" \
  -H "accept-language: en-US" \
  -H "authorization: Bearer <token>" \
  -H "x-api-key: <your-api-key>"

Example answer

HTTP/1.1 200 OK

info: The exact response payload format is not visible in the available contract excerpt. Use the contract list step first to avoid requesting a document identifier that is not available for the booking.


Response codes

  • 200: contract retrieved successfully.
  • 400: bad request or validation error.
  • 401: unauthorized.
  • 403: customer mismatch, issuer mismatch or locale mismatch.
GET/v0/customers/{customer_id}/bookings/{booking_id}/sell_contracts/{contract_id}
See more