---
uuid: 8772a528-9564-4e01-8105-472dc09be12b
date_created: 2026-01-19T13:14:34.227Z
date_updated: 2026-04-03T17:59:12.210Z
seo_url: modify-a-travel-document
category: Customer account
tags: 
  - Customers
routes: 
  - GET /v0/customers/{customer_id}
  - GET /v0/legal_info
  - PATCH /v1/customers/{customer_id}/travel_documents
---

# Modify a travel document

This scenario allows a client to modify their travel document regardless of its type

## Flow

```mermaid
flowchart LR
    step0["Retrieve a customer's information"]
    step1["Review legal information"]
    step2["Modify a travel document"]
    step0 --> step1
    step1 --> step2
```

## Overview

Use this scenario to read the customer context, review the relevant legal information, and then update one travel document on the same account. This sequence helps secure the change by confirming that the right customer and the right document are being targeted first.

## Prerequisites

* Have a valid `customer_id`.
* Send `authorization`, `x-api-key`, and `accept-language` on customer-scoped routes.
* Prepare the travel-document data that must be corrected before the update call.

## 1 - Retrieve a customer's information

Use `GET /v0/customers/{customer_id}` to confirm the customer account context before editing a travel document.

#### Prerequisites

Prepare `customer_id`. Keep `x-api-key` and, when the route is customer-scoped, a valid bearer token.

#### Calling CURL

```bash
curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept-language: en-US" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.clubmed.com/v0/customers/{customer_id}"
```

#### Example answer

```json
{
  "id": "customer-1",
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "jane@example.com"
}
```

> **info:** Use the returned identity data to confirm that the right customer is selected before reading or patching travel documents.

***

**Response codes**

* `200 OK`: the expected data is returned.
* `400 Bad Request`: the request is invalid or incomplete.
* `401 Unauthorized`: the token is missing or invalid.
* `403 Forbidden`: access is denied in this context.
* `404 Not Found`: the requested resource cannot be found.

**Related route**: [GET https://api.clubmed.com//v0/customers/{customer\_id}](https://api.clubmed.com/doc?search=GET%20%2Fv0%2Fcustomers%2F%7Bcustomer_id%7D)

## 2 - Review legal information

Use `GET /v0/legal_info` to retrieve the legal constraints that may impact the travel-document data you are about to maintain.

#### Prerequisites

Prepare the parameters required by the call. Keep `x-api-key` and, when the route is customer-scoped, a valid bearer token.

#### Calling CURL

```bash
curl -X GET \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept-language: en-US" \
  "https://api.clubmed.com/v0/legal_info"
```

#### Example answer

```json
{
  "terms_url": "https://example.com/terms",
  "privacy_url": "https://example.com/privacy"
}
```

> **info:** Review the legal constraints first so mandatory travel-document fields are validated against the right market context.

***

**Response codes**

* `200 OK`: the expected data is returned.
* `400 Bad Request`: the request is invalid or incomplete.
* `404 Not Found`: the requested resource cannot be found.

**Related route**: [GET https://api.clubmed.com//v0/legal\_info](https://api.clubmed.com/doc?search=GET%20%2Fv0%2Flegal_info)

## 3 - Modify a travel document

Use `PATCH /v1/customers/{customer_id}/travel_documents` to modify a travel document.

#### Prerequisites

Prepare `customer_id`. Keep `x-api-key` and, when the route is customer-scoped, a valid bearer token. Validate the request body before the call to avoid a validation error.

#### Calling CURL

```bash
curl -X PATCH \
  -H "x-api-key: YOUR_API_KEY" \
  -H "accept-language: en-US" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"documents": [{"id": "doc-1", "number": "XX123456", "expiration_date": "2030-07-01"}]}' \
  "https://api.clubmed.com/v1/customers/{customer_id}/travel_documents"
```

#### Example answer

```http
HTTP/1.1 204 No Content
```

> **info:** Success may be returned without a response body. Read the resource again afterwards if you need to display the final state.

***

**Response codes**

* `204 No Content`: the operation is applied successfully.
* `400 Bad Request`: the body or parameters are invalid.
* `401 Unauthorized`: the token is missing or invalid.
* `403 Forbidden`: access is denied in this context.
* `404 Not Found`: the target resource cannot be found.

**Related route**: [PATCH https://api.clubmed.com//v1/customers/{customer\_id}/travel\_documents](https://api.clubmed.com/doc?search=PATCH%20%2Fv1%2Fcustomers%2F%7Bcustomer_id%7D%2Ftravel_documents)
