Documentation
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:
- If
reservationcode+paxidmatches a single passenger of an active service, that passenger is modified (even if the samepaxidalso exists in voided services). - If it matches passengers of more than one active service, the request is rejected with error
3021and no data is modified. - If all the matching services are voided, the request is rejected with error
3020.
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 reservation does not belong to the authenticated agency/user scope.
- The passenger does not belong to the specified reservation (or service, when
servicelocis sent). servicelocis not sent andpaxidmatches passengers of more than one active service.- The service has been voided.
- The tour has already been closed by Operations.
- There are less than 21 days before departure.
The API also validates passenger and flight data formats.