Beacon's complex GET method for itineraries allow you to retrieve a fully formatted itinerary by specifying a departure GUID and the type of itinerary:


https://data.peak15systems.com/beacon/service.svc/get/[orgname]/complex/itinerary?
token=[yourtokenhere]
&p15_tripdeparturesid=[departureGUID]
&templateType=[outline/proposal/final/operations]


NOTE: If the departure doesn't have an itinerary template specified for the type of itinerary requested, the result will be blank.


The result set will be the exact same fully formatted HTML page that a user would see when previewing an Itinerary within PEAK 15.


Typically you will create a page on your website such as https://www.yourwebsite.com/itinerary.html?departureid=[departureGUID] which when opened requests the Proposal itinerary from Beacon for that departure and then displays the results within a DIV tag along with any other branding or navigation or functionality such as a "Book Now" button.


Our partner Net2Net has created a sample aspx page that shows how your itinerary page might display an itinerary. Note that these samples are provided "as is" and are not part of the system.


Sample Page (click to view)

The source is available below:


<%@ Page Language="VB" %>
<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ' Create a request for the URL.
        Dim myUri As String = "https://data.peak15systems.com/beacon/service.svc/get/<orgnamename>/complex/itinerary?p15_tripdeparturesid=" &amp; Request.QueryString("DID") &amp; "&amp;templateType=" &amp; Request.QueryString("Type")
        Dim myRequest As HttpWebRequest = HttpWebRequest.Create(myUri)
        myRequest.Method = "GET"
        ' If required by the server, set the credentials.
        myRequest.Credentials = New NetworkCredential("<yourusername>@tripsync", "<yourpassword>")
        Dim myResponse As HttpWebResponse = myRequest.GetResponse()
        Dim myDataStream As Stream = myResponse.GetResponseStream()
        Dim myReader As StreamReader = New StreamReader(myDataStream)
        Dim myResponseFromServer As String = myReader.ReadToEnd()
        Literal1.Text = myResponseFromServer
        myReader.Close()
        myDataStream.Close()
        myResponse.Close()
    End Sub
</script>
                <title>My Itinerary</title>
                <form id="form1" runat="server">
                <div>
                <asp:literal id="Literal1" runat="server"></asp:literal>    
    </div>
    </form>