Generate a PDF summary of a proposal

  • Option creation
  • 1 route
How do I generate a PDF document summarizing a travel proposal?

This scenario documents the API call used to retrieve a PDF document summarizing a proposal. It is useful when a seller or partner needs a shareable, printable version of a quote.

Overview

Use this scenario to generate a PDF file that summarizes a proposal and its key travel details.

Prerequisites

  • Keep a valid proposal_id.
  • Use a valid API key when calling the PDF route.
  • Make sure your consumer can handle a file response instead of standard JSON.
1

Generate the proposal PDF

Mandatory

Use GET/v0/proposals/{proposal_id}/pdf to generate the proposal PDF.

Prerequisites

Prepare proposal_id. Keep x-api-key and, when the route is customer-scoped, a valid bearer token. Use a valid proposal_id and handle the response as a file stream.

Calling CURL

curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept-language: en-US" \
  "https://api.clubmed.com/v0/proposals/{proposal_id}/pdf"

Example answer

HTTP/1.1 200 OK
Content-Type: application/pdf

info: The returned content must be handled as a PDF to download or preview.


Response codes

  • 200 OK: the PDF stream is returned.
  • 400 Bad Request: the request is invalid.
  • 404 Not Found: the proposal cannot be found.
GET/v0/proposals/{proposal_id}/pdf
See more