Messaging

Messaging refers to the direct communication between properties and the guests through the messages. With the help of messaging, customers with or without booking can ask questions or communicate to the properties.

Su Messaging API helps you to collect guests' messages from the OTA and respond to them.

  • This feature enables properties to communicate with guests rather than having to login to channel extranet.

  • Messages can be from guest with a booking or without a booking.

  • Only available for supported channel(s).

  • Only available via API.


Collection of Messages from OTA

The messages received from OTA are delivered to partner by post method. Messages are posted to an endpoint provided by partner. Please note messages can only be delivered to a single dedicated endpoint. Upon receipt, partners will need to filter messages based on property ID.

Endpoint

END POINT: Please provide endpoint for messages delivery.

Authorization String: Partner to allocate with Basic Authentication credentials.

TYPE
JSON METHOD
MESSAGE SENDER
MESSAGE RECEIVER

Request

PUSH

IT Provider

STAAH

Attributes


message string (Required)

The original message content received from OTA.


guestid string (Required)

The unique guest ID as assigned by the provider (OTA) upon creation.

ID can be both numeric, alphanumeric and may have special character such as hyphen ( - ).


bookingid string (Required)

Booking id of the customer’s booking.

Booking id can be both numeric, alphanumeric and may have special character such as hyphen ( - ).

For Airbnb, if communication started before booking is made, the parameter will be the thread ID.


listingid string (Required)

Property id of the hotel at the time of listing (Channel Hotel ID).


bookingflag string (Required)

The flag of the booking.

Values can be either B or T (B = Booking, T = Thread).

Note if there is no booking ID, the value will the same for both booking and thread ID.


messageid string (Required)

Message id of the message delivered from the OTA. Generated while delivering it from OTA.

ID can be both numeric, alphanumeric and may have special character such as hyphen ( - ).


channel_id string (Required)

Id of the channel through which the message delivered. Generated while delivering message from OTA.

Airbnb Channel ID: 244 Booking.com ID: 19


threadid string (Required)

The thread id created when communication takes place between guest and client.

ID can be both numeric, alphanumeric and may have special character such as hyphen ( - ).


user_details object

This object contains all the details of the users and their roles. There are two arrays users and roles in this object.

It is the user ID assigned by OTA to both Guest and Host communicating. It includes the details on user role and id. Role can be Owner, guest, co host, etc.

OTA User Role and ID (only allocated for Airbnb)


roles array

roles array contains all the different roles and the details which are involved in the messaging.

Attributes


role string (Required)

Role of the user.


user_ids string (Required)

User id of the specific role and user combination.


users array

users array contains all the user and their details such as name, location, preferred_locale and ids.

OTA User details (only allocated for Airbnb)

Attributes


first_name string (Required)

First name of the user.


location string (Required)

Location of the user.


preferred_locale string (Required)

Preferred language of the user.


id string (Required)

Id of the user and role combination.

booking_details object

This object contains all the details of the booking for which the messaging is initiated by either property or guest. Details allocated from OTA for which guest looking for and communicating with host.

OTA booking details (only allocated for Airbnb)

Attributes


expected_payout_amount_accurate string (Required)

Accurate amount which is expected to be paid for the booking.


checkout_date string (Required)

Check out date for the booking.


number_of_infants string (Required)

Number of infants attached to the booking.


listing_name string (Optional)

Name of the listing for which the booking was made.


number_of_adults string (Optional)

Total number of adults attached to the booking.


reservation_confirmation_code string (Optional)

Date when the reservation got confirmed.


number_of_children string (Required)

Number of children attached to the booking.


nights string (Required)

Total number of nights in the booking.


listing_id string (Required)

Hotel id / Property id / listing id of the property allocated by OTA.


checkin_date string (Required)

Date when the checkin will happen.


number_of_guests string (Required)

Total number of guests.

Sample Request

{
  "message": "Hello, How are you? How acan we help you.?",
  "guestid": "320338222",
  "bookingid": "ABCAJKYSJ8",
  "listingid": "47522522",
  "bookingflag": "B",
  "messageid": "9623318922",
  "channel_id": "244",
  "threadid": "991462322",
  "user_details": {
    "roles": [{
        "role": "owner",
        "user_ids": [
          22533556
        ]
      },
      {
        "role": "guest",
        "user_ids": [
          311357532
        ]
      },
      {
        "user_ids": [],
        "role": "cohost"
      }
    ],
    "users": [{
        "first_name": "Joseph",
        "location": "Cambridge, United Kingdom",
        "preferred_locale": "en-GB",
        "id": 22533556
      },
      {
        "id": 311357532,
        "first_name": "Chris",
        "location": "England, United Kingdom",
        "preferred_locale": "en"
      }
    ]
  },
  "booking_details": {
    "expected_payout_amount_accurate": "451.00",
    "checkout_date": "2021-07-11",
    "number_of_infants": 0,
    "non_response_at": null,
    "listing_name": "Modern housewith Parking",
    "number_of_adults": 3,
    "reservation_confirmation_code": "ABCAJKYSJ8",
    "number_of_children": 0,
    "nights": 4,
    "listing_id": "47501536",
    "checkin_date": "2021-07-07",
    "listing_id_str": "47511536",
    "number_of_guests": 3
  },
  "attachment": [],
  "hotelid": "abc123"
}

Response

If acknowledgement is not received as required, system will try to repost the message 3 times. After 3 attempts, message will be removed from queue.

Sample Success Response

{
 "status": "Success"
}

Reply to Message

The response messages will be delivered to respective OTA accordingly.

TYPE
JSON METHOD
MESSAGE SENDER
MESSAGE RECEIVER

Request

POST

STAAH

IT Provider

Endpoint

POST

https://connect-sandbox.su-api.com/SUAPI/jservice/messagingAB

Attributes


hotelid / hotelcode string (Required)

Su property ID.


channelcode string (Required)

Channel Code.

Accepted values must be either 19 or 244:

  • Booking.com: 19

  • Airbnb: 244


message string (Required)

The message replied from property to OTA.

To use line breaker within message, Airbnb supports: "\n" and Booking.com supports: "\\n"


threadid string (Required for Airbnb)

Thread id of the conversation (Required for Airbnb only)


guestid string (Required for Airbnb)

Guest id generated when communication occurs guest and property (Required for Airbnb only)


bookingid string (Required for Booking.com)

Booking id of the Booking


listingid string (Required for Airbnb)

Hotel id / Property id / listing id of the property allocated by OTA.

Sample Request

{
    "hotelid": "new1",
    "channelid": "244",
    "message": "Hello, How can we help?",
    "threadid": "802166080",
    "guestid": "190242146",
    "bookingid": "802166080",
    "listingid": "38740678"
}

Response

Sample Success Response

{
 "status": "Success",
 "response": "Successfully posted"
}

Error

This error will be received if provided with incorrect hotelid / hotelcode or required element is missing.

Sample Error Response

{
  "status":"Fail",
  "response":"No property found for given property id"
}

Channel Code(s)

Code
Channel (OTA)

244

Airbnb

19

Booking.com

Last updated

Was this helpful?