Booking verification

In order to check if a booking has been submitted successfully, trivago also offers the possibility to immediately verify the booking status once the booking was submitted by sending an additional "/booking_verify" request.

Request

Sample code

Example:

https://hotel-site.com/api/booking_verify?partner_reference=abc123&reference_id=692e8acc-d1d9-45dc-b50f-e7b824f3306f&reservation_id=XXX123

Request parameter

Name Description Mandatory
partner_reference The advertiser's unique id for this hotel. true
reservation_id The advertiser's unique id for the reservation. true
reference_id trivago identifier for the booking session. Please consider that this id might not be unique and should not be treated as a "confirmation" id. true

Response

Sample code

Header:

Content-Type: application/json

Body:

{
  "checkin_date": "2016-01-25",
  "checkout_date": "2016-01-26",
  "partner_reference": "abc123",
  "reference_id": "692e8acc-d1d9-45dc-b50f-e7b824f3306f",
  "partner_data":{
      "identifier_for_something":"9614b191-9e1b-4b7d-9cbc-5b9204ac2a2a"
  },
  "tracking_data": {
    "actor": "trivago",
    "advLink": "http://advertiser-site.com/hoteladlon/Executive_Brilliant_Doppelzimmer?start_date=2016-12-28&end_date=2016-12-29"
  },
  "payment": {
    "method": {
      "code": "PaymentCard",
      "options": [
        {
          "code": "MasterCard",
          "fee": {
            "amount": 0.0,
            "currency": "USD"
          }
        }
      ]
    },
    "parameters": {
      "card_number": "6011111111111117",
      "cardholder_name": "Christopher Palmer",
      "expiration_month": "09",
      "expiration_year": "2025",
      "cvv": "507",
      "callback_success": "",
      "callback_cancel": "",
      "callback_error": "",
      "type": "PaymentCard"
    },
    "billing_address": {
      "address1": "12 Johnson Junction",
      "city": "Santa Cruz",
      "state": "Maryland",
      "postal_code": "97897",
      "country": "US"
    }
  },
  "customer": {
    "first_name": "Christopher",
    "last_name": "Palmer",
    "phone_number": "9-(590)311-9256",
    "email": "Christopher.Palmer@test.trivago.com",
    "country": "US"
  },
  "rooms": [
    {
      "party": {
        "adults":2,
            "children":[
                1
            ]
      },
      "traveler_first_name": "Christopher",
      "traveler_last_name": "Palmer"
    }
  ],
  "final_price_at_booking": {
    "amount": 100.0,
    "currency": "USD"
  },
  "final_price_at_checkout": {
    "amount": 5.00,
    "currency": "USD"
  }
}

Response properties

Field Type Description Mandatory
problems Problem array

An array of problems that occurred

true, if status is "Failure" or "UnknownReference"
reference_id string Echo the reference_id requested by trivago in the request. If the request fails (timeout or otherwise), trivago should be able to use this id in a booking verification request to determine if the call was successful or not. true
status string

An overall status of the booking request. One of the following:

  • Success
  • Failure
  • UnknownReference
true
reservation Reservation Contains details associated with the reservation ( e.g. receipt, date of stay, guests, etc.). Only returned if the booking is successfully made. true, if status is "Success"
customer_support CustomerSupport

Contains the hotel’s customer support contact information for guests.

Has to be returned on both success and failure.

true