I am using Reglink Callback Service to get back hotel reservation number in an ASP.net MVC application. Here is how it works. First program redirect to a reglink url for hotel reservation in a page link. Then user fills out the form to get a hotel reservation number, which will be sent back to program to store. The url is like:
https://training-api.passkey.com/httpapi/RegLink?PartnerID=136260&OP=GetForRedirectResWeb&Version=4.00.02&Mode=S&Destination=02&LastName=@Model.Registrant.LastName&BridgeID=@Model.Registrant.PasskeyBridgeID
The reglink doc says:
The RegLink Callback Service provides the ability for GroupMAX to send reservation-specific messages to an external system triggered by any change to the reservation, including its creation. Callbacks may be configured in 2 different ways – POST to a URL (REST) or web service calls. Important Note: GroupMAX expects a status of 200 or “OK” on any Callback messages sent and will not process any errors or other messaging. It is up to the third party system to process the message and provide the customer any reporting if needed.POST to a URL (REST) Callback services are simple - POST to a URL. These URLs always contain all data available and the third party system is responsible to process the data provided. All Callback messages are asynchronous, which means that unless there is a connection issue or Passkey does not receive an HTTP 200 response, any other type of response from the external system is discarded. Below is an example of header information for this type of a call:POST ?r=323F2VKJ HTTP/1.1 User-Agent: Profile/MIDP-1.0 Configuration/CLDC-1.0 Content-Language: en-US Content-Type: application/x-www-form-urlencoded Host: beta-manage.passkey.com Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 0 X-Forwarded-For: 82.209.214.162
Callback URLs are entered into the GroupMAX UI on the event level. A Callback entry appears in the following format:http://www.myreg.com/newres.asp?extacknum=48943548&bridge=3233XNZ2-G582&resacknum=328T24NB&status=0
What I don't understand is that how post to url works in this case. How to do post url in controller action (or jquery), probably with webrequest? How to get the hotel reservation number back and store it in controller action (probably with webrequest)? Thanks.