Push Notifications Service

Overview

This notification service will inform you when a new order was created.

The push notifications system was built to allow clients to download orders data in an automatic manner, once a segment is created or its status was changed.

Once a new segment is created, or an existing segment was changed, a signal will be sent to the client system. The notification is triggered synchronously as the change occurs.

Please note, if the client has failed to handle the notification, the failure will be ignored by HSP system and the same notification will not be sent again.

Please note - push notifications should be configured on a node level, and not a user level.

Registration

A notification can be sent via a HTTP request to a URL chosen by the client. The request can be a GET or POST. The registration is performed on a company or a specific node (branch/folder) level.

If two different URLs are defined in the same hierarchy, (for example on a company and node under that company), a notification will be sent to each of them.

If the requested communication method is GET, the data will be sent as part of the URL, hence it's recommended to avoid specifying a URL with 2 question marks '?'.

If the requested communication method is POST, the data will be sent as part of the request body.

The service will return the following parameters

  • "OrderId" (Integer) - The id of the order in HSP system
  • "SegmentId" (Integer) - The id of the segment in HSP system
  • "Status" (String) - The status of the segment in HSP system.
  • "Reason" (String) - The reason for sending this notification.

Reason can have one of the following values

  • "NewSegment" - A new segment was created.
  • "Cancel" - A cancel request is received for a segment.
  • "StatusChange" - A check status request changed the status of the segment.
  • "ManualUpdateIntRef" - Internal reference of the segment was updated.
  • "MarkedAsPaid" - Segment which wasn't paid by credit card - was marked as paid.
  • "ManualVerify" - Segment was manually verified via the Back-office system.
  • "Rebooker" - An existing segment which was rebooked by Rebooker.

When Rebooker fails to cancel the previous segment, send the following push notification

  • OrderId

  • SegmentId

  • Status=ERC/CP/Any other cancellation status which is not CX

  • Reason=Rebooker

  • ProductType=Hotels

  • The recipient of the push will be the same recipient that gets the push notification for successful Rebooking.

  • "ProductType" (String) - Hotels, Cars, Flights, Activities, Transfers

    What info do we need from you

Notification URL - The URL address you will use for receiving those messages .

HTTP Method: GET/POST - Method you will use to catch those messages.

Push notification examples

GET

GET https://{YourPushNotificationURL}?OrderId=114067&SegmentId=114401&Status=OK&Reason=Cancel&ProductType=Hotels& HTTP/1.1
Content-Type: text/xml
Accept-Encoding: gzip, deflate
Host: {YourPushNotificationURL}

POST

POST https://{YourPushNotificationURL}/ HTTP/1.1
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Host: {YourPushNotificationURL}
Content-Length: 91OrderId=114184&SegmentId=114518&Status=OK&Reason=NewSegment&ProductType=Hotels