Message
Modified on: 2023-11-09 11:55
TABLE OF CONTENTS
Overview
Message API enables guests to send messages from the distributor to your PMS. It is optional to be implemented.
From DerbySoft Property Connector to PMS:
1.SendMessage: to send a new message from channel to your PMS.
Send Message
This API is used to send a new message from channel to your PMS.
POST https://{your pms endpoint}/message/send HTTP/1.1 Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
Request Schema
Element | Type | Occurrence | Description | Comment |
---|---|---|---|---|
hotelId | String | Mandatory | Hotel unique id of PMS |
|
distributorId | String | Mandatory | Id of distributor in DerbySoft’s system | |
thread | Object[Thread] | Mandatory |
|
|
thread/threadId | String | Mandatory |
|
|
thread/businessType | Enum
| Mandatory |
| Only RESERVATION is supported. |
thread/message | Object[Message] | Mandatory |
|
|
thread/message/messageId | String | Mandatory |
|
|
thread/message/messageType | Enum
| Mandatory |
|
|
thread/message/message | String | Optional | A string text message A message can contain text or an image, not both simultaneously. |
|
thread/message/translatedMessage | String | Optional |
|
|
thread/message/imageUrl | String | Optional | image url A message can contain text or an image, not both simultaneously. |
|
thread/message/createdTime | String | Mandatory | yyyy-MM-dd'T'HH:mm:ss'Z' |
|
thread/message/extensions | Map<String:Object> | Optional | An extension structure, in case there is some additional fields to be supported |
|
thread/reservation | Object[ReservationDetail] | Optional |
|
|
thread/reservation/distributorResId | String | Optional | Reservation id in distributor’s system. |
|
thread/reservation/checkIn | String | Optional | yyyy-MM-dd |
|
thread/reservation/checkOut | String | Optional | yyyy-MM-dd |
|
thread/reservation/totalAmount | String | Optional | Total rate |
|
thread/reservation/adultCount | String | Optional | Adult count |
|
thread/reservation/childCount | String | Optional | Child count |
|
thread/reservation/roomId | String | Optional | Room type id of PMS |
|
thread/reservation/rateId | String | Optional | Rate plan id of PMS |
|
thread/reservation/extensions | Map<String:Object> | Optional | An extension structure, in case there is some additional fields to be supported |
|
thread/extensions | Map<String:Object> | Optional | An extension structure, in case there is some additional fields to be supported |
|
Notifications are expected to be responded with a HTTP 200 response within 10 seconds to confirm the receipt of the notification. If no such response is received, the notification is considered to be a failure. The payload for the response to confirm successful receipt of a notification is as follows:
Example - Send a new message from Airbnb
Request
{ "header": { "echoToken": "8ecfbe8f-8970-490f-91f3-f9af26bad1bc", "timeStamp": "2023-11-08T19:25:44.888Z", "version": "V1" }, "hotelId": "OPENAPI_BOTH_NAME-MSG", "distributorId": "AIRBNB", "thread": { "threadId": "222333", "businessType": "RESERVATION", "message": { "messageId": "3234553", "messageType": "TEXT", "message": "Hi, I\u0027m visiting Palermo with my family.", "translatedMessage": "Salut, je visite Palerme avec ma famille.", "createdTime": "2017-03-29T07:57:45Z", "extensions": { "userId": "124021", "userName": "Andrei" } }, "reservation": { "distributorResId": "HDTYS45DS2", "checkIn": "2017-03-29", "checkOut": "2017-04-01", "totalAmount": "1102.00", "adultCount": "3", "childCount": "1", "roomId": "323549", "extensions": { "guestCount": "4", "infantCount": "0", "petCount": "0", "days": "3", "listingId": "323549", "listingName": "Sunny Vila" } }, "extensions": { "channelStatus": "accepted", "channelType": "Reservation", "roles": [ { "role": "owner", "user_ids": [ "5678432" ] }, { "role": "guest", "user_ids": [ "124021" ] }, { "role": "cohost", "user_ids": [] } ], "users": [ { "first_name": "Andrei", "id": "124021", "location": "San Francisco", "preferred_locale": "ru" }, { "first_name": "Giuseppe", "id": "5678432", "location": "Palermo", "preferred_locale": "it" } ] } } }
Response(Success)
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "success": true }
Did you find it helpful? Yes No
Send feedback