Skip to content

Validate rebooking for price optimization

Request

Validates if a hotel rebooking can be performed for price optimization purpose. The Source PNR ID provided in the request will be checked if it's eligible for rebooking. In the response, if isValid is true then users can proceed to checkout flow, which cancels the existing Source PNR and creates a new PNR to save booking cost.

Security
Bearer
Bodyapplication/jsonrequired
cancelSourcePnrIdstringrequired

Source PNR ID that needs to be validated.

Example:"1cf76aba18e4015f"
travelersArray of objects(Traveler)required

List of travelers

tripIdobject(TripId)required

The unique ID created for the respective trip.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/hotel/validate-rebooking \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "cancelSourcePnrId": "1cf76aba18e4015f",
    "travelers": [
      {
        "travelerPersonalInfo": {
          "loyaltyInfos": [
            {
              "appliedTo": [
                "TAJ"
              ],
              "id": "firstId",
              "issuedBy": "firstIssuedBy",
              "type": "AIR",
              "linked": false,
              "tier": "GOLD"
            }
          ],
          "travelPref": {
            "airPref": {
              "airlinePrefs": [
                {
                  "airlines": []
                }
              ],
              "alliancePref": {
                "alliances": [
                  null
                ]
              },
              "farePref": {
                "fareTypes": [
                  null
                ]
              },
              "homeAirport": "NEW YORK",
              "mealPref": {
                "exclMealPrefs": [
                  null
                ],
                "inclMealPrefs": [
                  null
                ],
                "specialMealDescription": "Veg only meal"
              },
              "numStopPref": {
                "numOfStops": 34
              },
              "seatAmenityPref": {
                "seatAmenityTypes": [
                  null
                ]
              },
              "seatLocationPrefs": [
                {
                  "cabins": []
                }
              ],
              "preferredAirports": [
                {}
              ]
            },
            "preferredCurrency": "USD",
            "railCards": [
              {
                "cardNumber": "string",
                "expiryDate": {},
                "name": "Veterans Railcard",
                "spotnanaCode": "VET",
                "vendor": "ATOC"
              }
            ],
            "railPref": {
              "preferredRailStations": [
                {}
              ],
              "seatPreference": {
                "hasAccessibility": false,
                "seatTypes": [
                  null
                ],
                "seatLocations": [
                  null
                ],
                "deckLevels": [
                  null
                ],
                "seatDirections": [
                  null
                ]
              },
              "travelClasses": [
                "FIRST"
              ],
              "coachPreferences": [
                "NON_SMOKING"
              ],
              "conditionalRates": [
                "AAA"
              ]
            },
            "carPref": {
              "vendors": [
                {}
              ],
              "carTypes": [
                "ECONOMY"
              ],
              "engineTypes": [
                "PETROL"
              ],
              "transmissionTypes": [
                "AUTOMATIC"
              ],
              "conditionalRates": [
                "AAA"
              ]
            },
            "hotelPref": {
              "hotelParentChains": [
                {}
              ],
              "hotelBrands": [
                {}
              ],
              "hotelAmenityTypes": [
                "PARKING"
              ],
              "roomPreference": {
                "isMobilityAccessible": false,
                "bedCount": "ONE_BED",
                "roomType": "SMOKING",
                "mostImportantFact": "BED_COUNT",
                "roomLocation": "HIGH_FLOOR",
                "pillowType": "FOAM",
                "roomAmenityPrefs": [
                  null
                ]
              },
              "conditionalRates": [
                "AAA"
              ]
            }
          },
          "blockLoyalty": false
        },
        "user": {
          "addresses": [
            {
              "addressLines": [
                "Golden Gate Bridge"
              ],
              "administrativeArea": "CA",
              "administrativeAreaName": "California",
              "description": "San Francisco Home",
              "isDefault": true,
              "languageCode": "en",
              "locality": "San Francisco",
              "locationCode": "LAX",
              "organization": "Spotnana",
              "postalCode": "94130",
              "continentCode": "AF",
              "recipients": [
                "string"
              ],
              "regionCode": "US",
              "regionName": "America",
              "revision": 1,
              "sortingCode": "Jamaica",
              "sublocality": "string",
              "timezone": "America/Los_Angeles",
              "coordinates": {
                "latitude": 77.1025,
                "longitude": 28.7041
              }
            }
          ],
          "dob": {
            "iso8601": "2017-07-21"
          },
          "email": "example@email.com",
          "emergencyContactInfo": {
            "address": {
              "addressLines": [
                "Golden Gate Bridge"
              ],
              "administrativeArea": "CA",
              "administrativeAreaName": "California",
              "description": "San Francisco Home",
              "isDefault": true,
              "languageCode": "en",
              "locality": "San Francisco",
              "locationCode": "LAX",
              "organization": "Spotnana",
              "postalCode": "94130",
              "continentCode": "AF",
              "recipients": [
                "string"
              ],
              "regionCode": "US",
              "regionName": "America",
              "revision": 1,
              "sortingCode": "Jamaica",
              "sublocality": "string",
              "timezone": "America/Los_Angeles",
              "coordinates": {
                "latitude": 77.1025,
                "longitude": 28.7041
              }
            },
            "designation": "MANAGER",
            "email": "emergency-contact@email.com",
            "name": {
              "family1": "Gandas",
              "family2": "FamilyTwo",
              "given": "Vichitr",
              "middle": "Kumar",
              "suffix": "SR",
              "preferred": "Don"
            },
            "phoneNumber": {
              "countryCode": 91,
              "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
              "extension": "222",
              "isoCountryCode": "IN",
              "italianLeadingZero": true,
              "nationalNumber": 8150,
              "numberOfLeadingZeros": 1,
              "preferredDomesticCarrierCode": "7",
              "rawInput": "77777",
              "type": "MOBILE"
            },
            "userOrgId": {
              "organizationAgencyId": {
                "id": "string"
              },
              "organizationId": {
                "id": "string"
              },
              "userId": {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              },
              "tmcInfo": {
                "id": {},
                "primaryServiceProviderTmc": {},
                "secondaryServiceProviderTmcs": [
                  null
                ],
                "partnerTmcId": {}
              },
              "tmcBasicInfo": {
                "contractingTmc": {},
                "bookingTmc": {}
              }
            }
          },
          "emergencyContact": {
            "name": "John Smith",
            "email": "emergency-contact@email.com",
            "designation": "MANAGER",
            "relation": "SPOUSE",
            "phoneNumbers": [
              {
                "countryCode": 91,
                "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
                "extension": "222",
                "isoCountryCode": "IN",
                "italianLeadingZero": true,
                "nationalNumber": 8150,
                "numberOfLeadingZeros": 1,
                "preferredDomesticCarrierCode": "7",
                "rawInput": "77777",
                "type": "MOBILE"
              }
            ],
            "preferredLanguage": "en-US"
          },
          "gender": "FEMALE",
          "identityDocs": [
            {
              "passport": {
                "docId": "PASSPORTID",
                "expiryDate": {
                  "iso8601": "2017-07-21"
                },
                "issueCountry": "IN",
                "issuedDate": {
                  "iso8601": "2017-07-21"
                },
                "nationalityCountry": "IN",
                "type": "REGULAR"
              }
            },
            {
              "ktn": {
                "number": "123456",
                "issueCountry": "US"
              }
            }
          ],
          "name": {
            "family1": "Gandas",
            "family2": "FamilyTwo",
            "given": "Vichitr",
            "middle": "Kumar",
            "suffix": "SR",
            "preferred": "Don"
          },
          "paymentInfos": [
            {
              "applicableTo": [
                "HOTEL"
              ],
              "card": {
                "id": "34d536b6-f8ff-11eb-9a61-0242ac180002",
                "type": "CREDIT",
                "company": "VISA",
                "name": "Harrison Schwartz",
                "address": {
                  "addressLines": [],
                  "recipients": []
                },
                "number": "4111111111111111",
                "expiryMonth": 1,
                "expiryYear": 2010,
                "cvv": "012",
                "label": "Label amex",
                "currency": "USD",
                "externalId": "bxt_RNGsNfzgJDaTstKIKqK4xEuhGYAnMdYK8T40",
                "vaultId": "34d536b6-f8ff-11eb-9a61-0242ac180002",
                "expiry": {},
                "ownershipLabel": "PERSONAL"
              },
              "accessType": "UNKNOWN_TYPE",
              "access": {
                "accessType": "UNKNOWN_TYPE",
                "entityIds": [
                  null
                ],
                "entities": [
                  null
                ]
              }
            }
          ],
          "phoneNumbers": [
            {
              "countryCode": 91,
              "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
              "extension": "222",
              "isoCountryCode": "IN",
              "italianLeadingZero": true,
              "nationalNumber": 8150,
              "numberOfLeadingZeros": 1,
              "preferredDomesticCarrierCode": "7",
              "rawInput": "77777",
              "type": "MOBILE"
            }
          ],
          "profilePicture": {
            "data": "6935813e12584abda0e43d71cd2ea260",
            "dimensions": {
              "height": 120,
              "width": 240
            },
            "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp",
            "metadata": {
              "variant": "LIGHT"
            }
          },
          "nationality": "Indian",
          "title": "MR"
        },
        "userBusinessInfo": {
          "department": {
            "id": {
              "id": "631ccbcf-9414-5fe0-c234-b324dfbe7422"
            },
            "name": "IT Department",
            "externalId": "department-ext-id",
            "employeeCount": 57
          },
          "designation": "MANAGER",
          "email": "user@business.com",
          "employeeId": "101",
          "grade": {
            "employeeCount": 75,
            "id": {
              "id": "831ccbcb-1416-7fe2-e236-d324dfbe7424"
            },
            "name": "Grade"
          },
          "legalEntityId": {
            "id": "fc1ccbce-8413-4fe9-b233-a324dfbe7421"
          },
          "managerBasicInfo": {
            "userOrgId": {
              "organizationAgencyId": {
                "id": "string"
              },
              "organizationId": {
                "id": "string"
              },
              "userId": {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              },
              "tmcInfo": {
                "id": {},
                "primaryServiceProviderTmc": {},
                "secondaryServiceProviderTmcs": [
                  null
                ],
                "partnerTmcId": {}
              },
              "tmcBasicInfo": {
                "contractingTmc": {},
                "bookingTmc": {}
              }
            },
            "persona": "EMPLOYEE",
            "email": "example@email.com",
            "name": {
              "family1": "Gandas",
              "family2": "FamilyTwo",
              "given": "Vichitr",
              "middle": "Kumar",
              "suffix": "SR",
              "preferred": "Don"
            },
            "profilePicture": {
              "data": "6935813e12584abda0e43d71cd2ea260",
              "dimensions": {
                "height": 120,
                "width": 240
              },
              "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp",
              "metadata": {
                "variant": "LIGHT"
              }
            },
            "tier": "SEAT1A",
            "phoneNumber": {
              "countryCode": 91,
              "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
              "extension": "222",
              "isoCountryCode": "IN",
              "italianLeadingZero": true,
              "nationalNumber": 8150,
              "numberOfLeadingZeros": 1,
              "preferredDomesticCarrierCode": "7",
              "rawInput": "77777",
              "type": "MOBILE"
            },
            "employeeId": "string",
            "isActive": true
          },
          "office": {
            "address": {
              "addressLines": [
                "Golden Gate Bridge"
              ],
              "administrativeArea": "CA",
              "administrativeAreaName": "California",
              "description": "San Francisco Home",
              "isDefault": true,
              "languageCode": "en",
              "locality": "San Francisco",
              "locationCode": "LAX",
              "organization": "Spotnana",
              "postalCode": "94130",
              "continentCode": "AF",
              "recipients": [
                "string"
              ],
              "regionCode": "US",
              "regionName": "America",
              "revision": 1,
              "sortingCode": "Jamaica",
              "sublocality": "string",
              "timezone": "America/Los_Angeles",
              "coordinates": {
                "latitude": 77.1025,
                "longitude": 28.7041
              }
            },
            "id": {
              "id": "531ccbce-8413-4fe9-b233-a324dfbe7421"
            },
            "name": "Office",
            "latlng": {
              "latitude": 77.1025,
              "longitude": 28.7041
            },
            "taxId": "133232"
          },
          "organizationId": {
            "id": "string"
          },
          "phoneNumbers": [
            {
              "countryCode": 91,
              "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
              "extension": "222",
              "isoCountryCode": "IN",
              "italianLeadingZero": true,
              "nationalNumber": 8150,
              "numberOfLeadingZeros": 1,
              "preferredDomesticCarrierCode": "7",
              "rawInput": "77777",
              "type": "MOBILE"
            }
          ],
          "userCostCenter": {
            "id": {
              "id": "731ccbca-0415-6fe1-d235-c324dfbe7423"
            },
            "name": "CostCenter",
            "externalId": "external-id"
          },
          "designatedApproverInfos": [
            {
              "userOrgId": {
                "organizationAgencyId": {},
                "organizationId": {},
                "userId": {},
                "tmcInfo": {
                  "secondaryServiceProviderTmcs": []
                },
                "tmcBasicInfo": {}
              },
              "persona": "EMPLOYEE",
              "email": "example@email.com",
              "name": {
                "family1": "Gandas",
                "family2": "FamilyTwo",
                "given": "Vichitr",
                "middle": "Kumar",
                "suffix": "SR",
                "preferred": "Don"
              },
              "profilePicture": {
                "data": "6935813e12584abda0e43d71cd2ea260",
                "dimensions": {},
                "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp",
                "metadata": {}
              },
              "tier": "SEAT1A",
              "phoneNumber": {
                "countryCode": 91,
                "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
                "extension": "222",
                "isoCountryCode": "IN",
                "italianLeadingZero": true,
                "nationalNumber": 8150,
                "numberOfLeadingZeros": 1,
                "preferredDomesticCarrierCode": "7",
                "rawInput": "77777",
                "type": "MOBILE"
              },
              "employeeId": "string",
              "isActive": true
            }
          ],
          "designatedApproverUserIds": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            }
          ],
          "authorizerEmail": "example@email.com"
        },
        "userOrgId": {
          "organizationAgencyId": {
            "id": "string"
          },
          "organizationId": {
            "id": "string"
          },
          "userId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "tmcInfo": {
            "id": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            },
            "primaryServiceProviderTmc": {
              "tmcId": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              }
            },
            "secondaryServiceProviderTmcs": [
              {
                "tmcId": {},
                "supplier": "SABRE",
                "travelType": "AIR"
              }
            ],
            "partnerTmcId": {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
            }
          },
          "tmcBasicInfo": {
            "contractingTmc": {
              "id": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              },
              "name": "string",
              "logo": {
                "data": "6935813e12584abda0e43d71cd2ea260",
                "dimensions": {},
                "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp",
                "metadata": {}
              }
            },
            "bookingTmc": {
              "id": {
                "id": "f49d00fe-1eda-4304-ba79-a980f565281d"
              },
              "name": "string",
              "logo": {
                "data": "6935813e12584abda0e43d71cd2ea260",
                "dimensions": {},
                "url": "https://static.wixstatic.com/media/73f2e2_6935813e12584abda0e43d71cd2ea260~mv2.png/v1/fill/w_630,h_94,al_c,q_85,usm_0.66_1.00_0.01/Spotnana%403x.webp",
                "metadata": {}
              }
            }
          }
        },
        "persona": "EMPLOYEE",
        "isActive": true,
        "tier": "SEAT1A",
        "adhocUserInfo": {
          "profileOwner": {
            "userId": {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            }
          },
          "isSaved": false
        },
        "externalId": "string"
      }
    ],
    "tripId": {
      "id": "2783425534"
    }
  }'

Responses

OK

Bodyapplication/json
isValidbooleanrequired

Indicates if the validation is successful.

Example:true
spotnanaPnrIdstringrequired

The Spotnana PNR ID of the corresponding source PNR ID provided in the request.

Example:"1cf76aba18e4015f"
Response
{ "isValid": true, "spotnanaPnrId": "1cf76aba18e4015f" }