# Update a traveler

> The update_traveler MCP tool: update a traveler.

`update_traveler` · writes · reaches people outside bymundi

[REST: `PATCH /v1/travelers/{travelerId}`](https://api.bymundi.com/docs/reference/travelers.update.md)

## What the model reads

Changes a passenger: send only the fields to change (`null` clears one) and/or `position` to reorder (0 = first on the booking). Staff may correct any field, even on a booked trip. A new email on a booked trip receives the app-access email. undo_change restores the previous values within 30 days.

Permissions: travelers:write.
Undo: the result names a change id; undo_change reverts it.

## Input

| Field | Type | Required | Description |
|---|---|---|---|
| `travelerId` | uuid | yes |  |
| `position` | integer |  | 0 = first on the booking. Past the end = last. 0–39 |
| `expectedUpdatedAt` | datetime |  | Refuse (409) unless the passenger still carries this `updatedAt`. |
| `title` | "mr" \| "mrs" \| "ms" \| "mstr" \| "miss" \| null |  | Form of address; the app derives one from sex and age when empty. |
| `firstName` | string \| null |  |  |
| `lastName1` | string \| null |  | Surname(s) as on the passport — the app asks for both surnames here. |
| `lastName2` | string \| null |  | A second surname stored separately (older passengers); usually null. |
| `birthDate` | string \| null |  |  |
| `sex` | "m" \| "f" \| null |  |  |
| `nationality` | string \| null |  |  |
| `docType` | "dni" \| "nie" \| "passport" \| "other" \| null |  |  |
| `docNumber` | string \| null |  |  |
| `docExpiry` | string \| null |  |  |
| `docCountry` | string \| null |  | The country that issued the document. |
| `email` | email \| null |  |  |
| `phone` | string \| null |  |  |
| `address` | object \| null |  |  |
| `address.line1` | string \| null | yes |  |
| `address.line2` | string \| null | yes |  |
| `address.postalCode` | string \| null | yes |  |
| `address.city` | string \| null | yes |  |
| `address.region` | string \| null | yes |  |
| `address.country` | string \| null | yes |  |
| `taxId` | string \| null |  |  |

## Input schema (JSON)

```json
{
  "type": "object",
  "properties": {
    "travelerId": {
      "type": "string",
      "format": "uuid"
    },
    "position": {
      "type": "integer",
      "minimum": 0,
      "maximum": 39,
      "description": "0 = first on the booking. Past the end = last."
    },
    "expectedUpdatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Refuse (409) unless the passenger still carries this `updatedAt`."
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "mr",
            "mrs",
            "ms",
            "mstr",
            "miss"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Form of address; the app derives one from sex and age when empty."
    },
    "firstName": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ]
    },
    "lastName1": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "description": "Surname(s) as on the passport — the app asks for both surnames here."
    },
    "lastName2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "description": "A second surname stored separately (older passengers); usually null."
    },
    "birthDate": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "sex": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "m",
            "f"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "nationality": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "docType": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "dni",
            "nie",
            "passport",
            "other"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "docNumber": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ]
    },
    "docExpiry": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "docCountry": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        },
        {
          "type": "null"
        }
      ],
      "description": "The country that issued the document."
    },
    "email": {
      "anyOf": [
        {
          "type": "string",
          "format": "email",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "phone": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ]
    },
    "address": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "line1": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ]
            },
            "line2": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ]
            },
            "postalCode": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 20
                },
                {
                  "type": "null"
                }
              ]
            },
            "city": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 80
                },
                {
                  "type": "null"
                }
              ]
            },
            "region": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 80
                },
                {
                  "type": "null"
                }
              ]
            },
            "country": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[A-Z]{2}$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "line1",
            "line2",
            "postalCode",
            "city",
            "region",
            "country"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "taxId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "travelerId"
  ],
  "additionalProperties": false
}
```
