modreservationpax {.u-pearl}

Updates passenger data for an existing reservation.

This endpoint performs a partial update. Only fields included in requestdata are modified. Fields not sent in the request keep their current value.

endpoints {.u-pearl}

production {.u-lightPearl}

https://newapi.vpttours.com/modreservationpax

request parameters {.u-pearl}

reservationcode {.u-red}
[int][required] {.u-lightPearl}

Reservation locator.


paxid {.u-red}
[int][required] {.u-lightPearl}

Passenger identifier returned by getreservationpaxs (id).


serviceloc {.u-pearl}
[int] {.u-lightPearl}

Locator of the service the passenger belongs to, returned by getreservationpaxs.

A reservation with several services (for example a tour plus an optional) has the same paxid in each service. Send serviceloc to modify the passenger of one service only: the same paxid in the other services is not changed.

Without serviceloc, voided services are not taken into account:


name {.u-pearl}
[string] {.u-lightPearl}

Passenger first name.


surname {.u-pearl}
[string] {.u-lightPearl}

Passenger surname.


passport {.u-pearl}
[string] {.u-lightPearl}

Passport or document number.


doc_fecha_exp {.u-pearl}
[date:yyyy-mm-dd] {.u-lightPearl}

Document issue date.


doc_fecha_cad {.u-pearl}
[date:yyyy-mm-dd] {.u-lightPearl}

Document expiration date.


nationality {.u-pearl}
[string:2] {.u-lightPearl}

Passenger nationality code.

Example: ES.


email {.u-pearl}
[string] {.u-lightPearl}

Passenger email address.


phone {.u-pearl}
[string] {.u-lightPearl}

Passenger phone number.

When using application/x-www-form-urlencoded, remember that + must be encoded correctly.

For example:

+34611111111

may need to be sent as:

%2B34611111111

birthdate {.u-pearl}
[date:yyyy-mm-dd] {.u-lightPearl}

Passenger birth date.


age {.u-pearl}
[int] {.u-lightPearl}

Passenger age.


transferin {.u-pearl}
[object] {.u-lightPearl}

Arrival flight data.

Available fields:

airport {.u-pearl}
[string] {.u-lightPearl}

Airport code or value associated with the arrival transfer.

aircompany {.u-pearl}
[string] {.u-lightPearl}

Airline.

flightnumber {.u-pearl}
[string] {.u-lightPearl}

Flight number.

flighttime {.u-pearl}
[datetime:yyyy-mm-dd hh:mm] {.u-lightPearl}

Flight date and time.


transferout {.u-pearl}
[object] {.u-lightPearl}

Departure flight data.

Available fields:

airport {.u-pearl}
[string] {.u-lightPearl}

Airport code or value associated with the departure transfer.

aircompany {.u-pearl}
[string] {.u-lightPearl}

Airline.

flightnumber {.u-pearl}
[string] {.u-lightPearl}

Flight number.

flighttime {.u-pearl}
[datetime:yyyy-mm-dd hh:mm] {.u-lightPearl}

Flight date and time.


request example {.u-pearl}

{
    "logindata": {
        "useremail": "user@agency.com",
        "userpass": "********",
        "integrator_token": "********"
    },
    "requestdata": {
        "reservationcode": 123456,
        "serviceloc": 123456000,
        "paxid": 1,
        "name": "Test name modified",
        "phone": "+34611111111",
        "transferin": {
            "airport": "MAD",
            "aircompany": "IB",
            "flightnumber": "1234",
            "flighttime": "2027-12-12 14:35"
        }
    }
}

response data {.u-pearl}

Returns the updated passenger, with the same fields as getreservationpaxs, including serviceloc.

response example {.u-pearl}

{
    "id": "1",
    "serviceloc": "123456000",
    "name": "Test name modified",
    "surname": "Test surname",
    "passport": "P123456",
    "doc_fecha_exp": null,
    "doc_fecha_cad": null,
    "nationality": null,
    "email": null,
    "phone": "+34611111111",
    "birthdate": null,
    "age": "30",
    "transferin": {
        "airport": "MAD",
        "aircompany": "IB",
        "flightnumber": "1234",
        "flighttime": "2027-12-12 14:35"
    },
    "transferout": null
}

update rules {.u-pearl}

Only fields sent in the request are modified.

For example:

{
    "requestdata": {
        "reservationcode": 123456,
        "paxid": 1,
        "name": "New name"
    }
}

updates only name.

The rest of the passenger data, including transfer information, remains unchanged.


modification restrictions {.u-pearl}

Passenger data cannot be modified when:

The API also validates passenger and flight data formats.


functional errors {.u-pearl}

3001 {.u-red}
reservation/passenger not found or not accessible {.u-lightPearl}

3009 {.u-red}
passenger data cannot be modified less than 21 days before departure {.u-lightPearl}

3010 {.u-red}
passenger data cannot be modified because the tour has already been closed by Operations {.u-lightPearl}

3015 {.u-red}
invalid email format {.u-lightPearl}

3016 {.u-red}
invalid age value {.u-lightPearl}

3017 {.u-red}
invalid date format, expected yyyy-mm-dd {.u-lightPearl}

3018 {.u-red}
invalid nationality code {.u-lightPearl}

3020 {.u-red}
the passenger belongs to a voided service and cannot be modified {.u-lightPearl}

3021 {.u-red}
more than one service matches this passenger, the serviceloc parameter is required {.u-lightPearl}