Travel documents

  • Booking docs
  • 2 routes
How do I consult and update a customer's travel documents?

This scenario explains how to retrieve the travel documents attached to a customer profile and then update them when fresher or corrected information is required. It fits selfcare, service, and booking-preparation journeys.

The flow reads the current document set first, then patches the customer record with the updated travel-document payload.

Overview

This scenario helps an application display and maintain the legal travel documents attached to a customer account.

Prerequisites

  • A valid customer_id.
  • A customer-scoped authentication context with authorization, accept-language, and x-api-key.
  • The document information that must be corrected or completed.

Expected result

The application can display the current travel-document set, submit the required corrections, and keep the customer profile aligned with the travel constraints of the booking journey.

Process workflow

Legend:
Mandatory
Optional
1

Retrieve the customer's travel documents

Mandatory

Use GET/v1/customers/{customer_id}/travel_documents to retrieve the travel documents currently stored for a customer before checking compliance, completing a journey, or preparing a transport issuance flow.

Prerequisites

  • Reuse a valid customer_id.
  • Send accept-language, authorization, and x-api-key.
  • Make sure the authenticated context is allowed to access this customer.

Calling CURL

curl -X 'GET' \
  'https://api.clubmed.com/v1/customers/123456789/travel_documents' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'authorization: Bearer YOUR_TOKEN' \
  -H 'x-api-key: YOUR_API_KEY'

Example answer

{
  "passport": {
    "document_number": "09PR5121E",
    "issuing_country": "FR",
    "nationality": "FR",
    "expiration_date": "20100430"
  },
  "id_card": {
    "document_number": "09PR5121E",
    "issuing_country": "FR",
    "expiration_date": "20100430"
  },
  "visas": [
    {
      "document_number": "09PR5121E",
      "category": "FR",
      "expiration_date": "20100430"
    }
  ],
  "travel_membership_cards": [
    {
      "company_code": "AF",
      "company_label": "AIR FRANCE",
      "number": "2060444771",
      "status": "GOLD"
    }
  ]
}

info: This route returns the current legal and travel-document inventory, which is useful to detect what still needs to be completed before transport issuance.


Response codes

  • OK Response (200): returns the travel documents currently stored for the customer.
  • Error (400): one mandatory parameter is missing or invalid.
  • Error (401): authentication is missing, invalid, or expired.
  • Error (403): locale or issuer rules prevent access to these travel documents.
  • Error (404): non documented in Swagger.
GET/v1/customers/{customer_id}/travel_documents
See more
2

Update the customer's travel documents

Mandatory

Use PATCH/v1/customers/{customer_id}/travel_documents to modify travel-document information already attached to the customer profile when a document is corrected, renewed, or completed.

Prerequisites

  • Reuse a valid customer_id.
  • Send accept-language, authorization, and x-api-key.
  • Prepare a JSON Patch body aligned with the document to modify.

Calling CURL

curl -X 'PATCH' \
  'https://api.clubmed.com/v1/customers/123456789/travel_documents' \
  -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

{
  "passport": {
    "document_number": "09PR5121E",
    "issuing_country": "FR",
    "expiration_date": "20100430"
  },
  "id_card": {
    "document_number": "09PR5121E",
    "issuing_country": "FR",
    "expiration_date": "20100430"
  },
  "travel_membership_cards": [
    {
      "company_code": "AF",
      "company_label": "AIR FRANCE",
      "number": "2060444771",
      "status": "GOLD"
    }
  ]
}

info: The route implements JSON Patch, so the body must describe the exact operations to apply on the current document inventory.


Response codes

  • OK Response (200): returns the updated travel-document inventory after the patch.
  • Error (400): the JSON Patch payload is invalid or incomplete.
  • Error (401): authentication is missing, invalid, or expired.
  • Error (403): locale or issuer rules prevent the update.
  • Error (404): non documented in Swagger.
PATCH/v1/customers/{customer_id}/travel_documents
See more