CenResService

<back to all web services

StayHistoryPost

The following routes are available for this service:
POST/stayhistory/{SubscriptionId}/{CendynPropertyId}
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CenResSS.ServiceModel
Imports Cendyn.CenRes.DataLib.Models

Namespace Global

    Namespace Cendyn.CenRes.DataLib.Models

        Public Partial Class Response
            Public Overridable Property StatusCode As String
            Public Overridable Property RecordCount As Integer
            Public Overridable Property ErrorCount As Integer
        End Class

        Public Partial Class StayHistory
            Public Sub New()
                UniqueIDs = New List(Of UniqueIDType)
                StayHistoryRevenueCollection = New List(Of StayHistoryRevenue)
                StayHistoryDailyRateCollection = New List(Of StayHistoryDailyRate)
            End Sub

            Public Overridable Property CendynPropertyID As String
            Public Overridable Property ResortID As String
            Public Overridable Property ExternalProfileID1 As String
            Public Overridable Property ExternalResId1 As String
            Public Overridable Property CRSBookNo As String
            Public Overridable Property ResortBookNo As String
            Public Overridable Property ResortLegNo As Nullable(Of Integer)
            Public Overridable Property ConfirmationID As String
            Public Overridable Property ReservationStatus As String
            Public Overridable Property HasDailyRooms As Nullable(Of Boolean)
            Public Overridable Property RateRoomType As String
            Public Overridable Property ActualArrivalDate As Nullable(Of Date)
            Public Overridable Property ActualDepartureDate As Nullable(Of Date)
            Public Overridable Property BookDate As Nullable(Of Date)
            Public Overridable Property BookedArrivalDate As Nullable(Of Date)
            Public Overridable Property BookedDepartureDate As Nullable(Of Date)
            Public Overridable Property CompYN As String
            Public Overridable Property Adults As Nullable(Of Integer)
            Public Overridable Property Children As Nullable(Of Integer)
            Public Overridable Property RoomCategory As String
            Public Overridable Property RoomNumber As String
            Public Overridable Property RateAmount As Nullable(Of Decimal)
            Public Overridable Property RateCode As String
            Public Overridable Property RateAmountCurrencyCode As String
            Public Overridable Property CurrencyCode As String
            Public Overridable Property SourceCode As String
            Public Overridable Property MarketCode As String
            Public Overridable Property TravelAgentID As String
            Public Overridable Property CompanyID As String
            Public Overridable Property Channel As String
            Public Overridable Property PaymentMethod As String
            Public Overridable Property RateCurrencyCode As String
            Public Overridable Property TotalRevenue As Nullable(Of Decimal)
            Public Overridable Property RoomRevenue As Nullable(Of Decimal)
            Public Overridable Property FbRevenue As Nullable(Of Decimal)
            Public Overridable Property MembershipType As String
            Public Overridable Property MembershipID As String
            Public Overridable Property TransactionID As String
            Public Overridable Property TransactionStatus As String
            Public Overridable Property UniqueIDs As List(Of UniqueIDType)
            Public Overridable Property StayHistoryRevenueCollection As List(Of StayHistoryRevenue)
            Public Overridable Property StayHistoryDailyRateCollection As List(Of StayHistoryDailyRate)
        End Class

        Public Partial Class StayHistoryContainer
            Public Sub New()
                StayHistoryList = New List(Of StayHistory)
            End Sub

            Public Overridable Property EchoToken As String
            Public Overridable Property StayHistoryList As List(Of StayHistory)
        End Class

        Public Partial Class StayHistoryDailyRate
            Public Overridable Property RecordStatus As String
            Public Overridable Property TransactionDate As Nullable(Of Date)
            Public Overridable Property RateCode As String
            Public Overridable Property MarketCode As String
            Public Overridable Property Amount As Decimal
            Public Overridable Property CurrencyCode As String
            Public Overridable Property RoomNumber As String
            Public Overridable Property ResourceID As String
            Public Overridable Property PseudoRoom As String
            Public Overridable Property RoomCategory As String
            Public Overridable Property RateRoomType As String
            Public Overridable Property InactiveDate As Nullable(Of Date)
        End Class

        Public Partial Class StayHistoryRevenue
            Public Overridable Property RecordStatus As String
            <DataMember(IsRequired:=true)>
            Public Overridable Property RevenueGroup As String

            <DataMember(IsRequired:=true)>
            Public Overridable Property RevenueType As String

            <DataMember(IsRequired:=true)>
            Public Overridable Property Amount As Decimal

            Public Overridable Property CurrencyCode As String
            Public Overridable Property FolioWindow As String
            Public Overridable Property TransactionDate As Nullable(Of Date)
            Public Overridable Property InactiveDate As Nullable(Of Date)
        End Class

        Public Partial Class UniqueIDType
            Public Overridable Property ID As String
            Public Overridable Property Type As String
            Public Overridable Property Context As String
        End Class
    End Namespace

    Namespace CenResSS.ServiceModel

        Public Partial Class StayHistoryPost
            Public Overridable Property StayHistoryContainer As StayHistoryContainer
            Public Overridable Property SubscriptionId As String
            Public Overridable Property CendynPropertyId As String
        End Class
    End Namespace
End Namespace

VB.NET StayHistoryPost DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /stayhistory/{SubscriptionId}/{CendynPropertyId} HTTP/1.1 
Host: cert.cendyn.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"stayHistoryContainer":{"echoToken":"String","stayHistoryList":[{"cendynPropertyID":"String","resortID":"String","externalProfileID1":"String","externalResId1":"String","crsBookNo":"String","resortBookNo":"String","resortLegNo":0,"confirmationID":"String","reservationStatus":"String","hasDailyRooms":false,"rateRoomType":"String","actualArrivalDate":"0001-01-01T00:00:00.0000000","actualDepartureDate":"0001-01-01T00:00:00.0000000","bookDate":"0001-01-01T00:00:00.0000000","bookedArrivalDate":"0001-01-01T00:00:00.0000000","bookedDepartureDate":"0001-01-01T00:00:00.0000000","compYN":"String","adults":0,"children":0,"roomCategory":"String","roomNumber":"String","rateAmount":0,"rateCode":"String","rateAmountCurrencyCode":"String","currencyCode":"String","sourceCode":"String","marketCode":"String","travelAgentID":"String","companyID":"String","channel":"String","paymentMethod":"String","rateCurrencyCode":"String","totalRevenue":0,"roomRevenue":0,"fbRevenue":0,"membershipType":"String","membershipID":"String","transactionID":"String","transactionStatus":"String","uniqueIDs":[{"id":"String","type":"String","context":"String"}],"stayHistoryRevenueCollection":[{"recordStatus":"String","revenueGroup":"String","revenueType":"String","amount":0,"currencyCode":"String","folioWindow":"String","transactionDate":"0001-01-01T00:00:00.0000000","inactiveDate":"0001-01-01T00:00:00.0000000"}],"stayHistoryDailyRateCollection":[{"recordStatus":"String","transactionDate":"0001-01-01T00:00:00.0000000","rateCode":"String","marketCode":"String","amount":0,"currencyCode":"String","roomNumber":"String","resourceID":"String","pseudoRoom":"String","roomCategory":"String","rateRoomType":"String","inactiveDate":"0001-01-01T00:00:00.0000000"}]}]},"subscriptionId":"String","cendynPropertyId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"statusCode":"String","recordCount":0,"errorCount":0}