Skip to content

Create a new hotel booking

Request

Creates a new hotel booking for the given request parameters.

Security
Bearer
Bodyapplication/jsonrequired
bookingKeystringrequired

The booking key for the hotel booking.

Example:"example_booking_key"
travelersArray of objects(Travelers)required

The list of travelers and their details. The traveler at index 0 will be considered as the primary traveler and their details will be passed to the supplier.

tripDataobject(TripData)required

Trip data to book a PNR.

preBookAnswersobject(PreBookAnswers)
bookingPaymentDetailsobject(BookingPaymentDetails)required

Payment details used for booking.

bookingContactobject(BookingContact)required
hotelSpecialRequestsobject(HotelSpecialRequest)

Hotel special requests

cancelSourcePnrIdstring

The source PNR ID within the booking source that needs to be canceled in favor of the new booking that is being created.

Example:"ABC123"
hotelRateAssuranceInfoobject(HotelRateAssuranceMetadata)

Savings information from the rate assurance rebooking

customFieldV3ResponsesArray of objects(CustomFieldV3Response)

Custom field responses for the booking.

ancillaryKeysArray of strings

User selected ancillaries associated with this hotel booking.

postPaymentVerificationInfoPostStripeVerificationInfoWrapper (object) or PostUrlBasedVerificationInfoWrapper (object) or AmadeusCheckoutVerificationInfoWrapper (object) or ThreeDSecure2PostVerificationInfoWrapper (object) or RazorpayPostVerificationInfoWrapper (object)(PostPaymentVerificationInfo)
One of:

Wrapper for post stripe verification info object.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/hotel/create-pnr \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "bookingKey": "example_booking_key",
    "travelers": [
      {
        "travelerId": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        },
        "name": {
          "family1": "Gandas",
          "family2": "FamilyTwo",
          "given": "Vichitr",
          "middle": "Kumar",
          "suffix": "SR",
          "preferred": "Don"
        },
        "dob": {
          "iso8601": "2017-07-21"
        },
        "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"
        },
        "email": "mail@mail.com",
        "loyaltyInfo": {
          "appliedTo": [
            "TAJ"
          ],
          "id": "firstId",
          "issuedBy": "firstIssuedBy",
          "type": "AIR",
          "linked": false,
          "tier": "GOLD"
        },
        "adhocInfo": {
          "profileOwnerId": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        }
      }
    ],
    "tripData": {
      "approverEmail": "string",
      "approverName": "string",
      "hardApprovalRequired": true,
      "outOfPolicy": true,
      "policyId": "string",
      "policyVersion": 0,
      "tripId": {
        "id": "2783425534"
      }
    },
    "preBookAnswers": {
      "answers": [
        {
          "entityId": "string",
          "userInput": "string",
          "itemIds": [
            0
          ],
          "answers": [
            {
              "item": "string",
              "value": "string",
              "description": "string"
            }
          ],
          "customFieldType": "QUESTION",
          "questionDisplayText": "string",
          "question": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "string",
            "questionFormat": "CHECKBOX",
            "optionInfo": {
              "source": "MANUAL",
              "sourceMetadata": {
                "companyConfig": {}
              },
              "totalNumOptions": 0,
              "options": [
                {}
              ]
            },
            "isRequired": true,
            "isDisabled": true,
            "includeInItinerary": true,
            "customFieldLocations": [
              "POLICY_APPROVAL_EMAIL"
            ],
            "matchConditions": {
              "travelerConditions": {
                "workerTypes": [
                  null
                ],
                "countries": [
                  null
                ],
                "legalEntities": [
                  null
                ],
                "departments": [
                  null
                ],
                "costCenters": [
                  null
                ],
                "offices": [
                  null
                ]
              },
              "travelTypes": [
                "AIR"
              ],
              "travelRegionTypes": [
                "DOMESTIC"
              ],
              "tripUsageTypes": [
                "STANDARD"
              ]
            },
            "questionType": {
              "preSearchQuestionType": "PURPOSE_OF_TRIP",
              "preCheckoutQuestionType": "OOP_REASON_CODE"
            }
          }
        }
      ],
      "preBookQuestionResponseId": "string"
    },
    "bookingPaymentDetails": {
      "bookingTravelerPaymentDetails": [
        {
          "selectedFormOfPayments": [
            {
              "paymentItems": [
                {
                  "fareComponent": []
                }
              ],
              "selectedPaymentSources": [
                {}
              ]
            }
          ]
        }
      ]
    },
    "bookingContact": {
      "emailAddress": "mail@mail.com",
      "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"
      }
    },
    "hotelSpecialRequests": {
      "roomLocations": [
        "HIGH_FLOOR"
      ],
      "roomFeatures": [
        "FEATHER_FREE_ROOM"
      ],
      "checkIn": "LATE_CHECK_IN",
      "checkInTime": {
        "iso8601": "17:32"
      },
      "flightNumber": "AC1234",
      "additionalNote": "Extra pillows and blankets for added comfort during the stay.",
      "accessibleFeatures": [
        "MOBILITY_ACCESSIBLE_ROOM_WITH_TUB"
      ]
    },
    "cancelSourcePnrId": "ABC123",
    "hotelRateAssuranceInfo": {
      "selfReportedSavings": {
        "amount": 510,
        "currencyCode": "GBP"
      },
      "actualSavings": {
        "amount": 510,
        "currencyCode": "GBP"
      }
    },
    "customFieldV3Responses": [
      {
        "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
        "fieldName": "string",
        "armId": "0fd508db-63ff-4444-bfb1-b89c43061433",
        "includeLocations": [
          "APPROVAL_EMAILS"
        ],
        "selectedOptions": [
          {
            "name": "string",
            "translatedName": "string",
            "description": "string",
            "translatedDescription": "string",
            "additionalUserInput": "string",
            "additionalInfos": [
              "string"
            ],
            "additionalInfoConfigs": [
              {
                "type": "VARIABLE",
                "name": "LLF"
              }
            ],
            "optionId": "dee15a0e-f1fe-4cd8-88ac-c090810707f8"
          }
        ]
      }
    ],
    "ancillaryKeys": [
      "string"
    ],
    "postPaymentVerificationInfo": {
      "paymentKey": "string",
      "postStripeVerificationInfo": {
        "paymentMethodId": "pm_1HzKDPI3bT9GUjvoUkRQooN3"
      }
    }
  }'

Responses

OK

Bodyapplication/json
pnrIdstringrequired

A unique PNR ID created by Spotnana for the new hotel booking.

Example:"7373737373"
pnrStatusstringrequired

The status of the PNR.

Enum:"SUCCESS""APPROVAL_PENDING""CONFIRMATION_PENDING"
Example:"SUCCESS"
externalPnrIdstring

The external PNR ID for the hotel booking, created by the third party suppliers.

Example:"ABC123"
paymentVerificationInfoStripeVerificationInfoWrapper (object) or UrlVerificationInfoWrapper (object) or ThreeDSecure2VerificationInfoWrapper (object) or RazorpayVerificationInfoWrapper (object)(PaymentVerificationInfo)
One of:

Wrapper for stripe verification Info.

Response
{ "pnrId": "7373737373", "pnrStatus": "SUCCESS", "externalPnrId": "ABC123", "paymentVerificationInfo": { "gatewayIdentifier": { … }, "paymentKey": "string", "stripeVerificationInfo": { … } } }