| POST | /acknowlegement/{SubscriptionId}/{CendynPropertyId} |
|---|
import Foundation
import ServiceStack
public class MessageAcknowledgement : Codable
{
public var acknowledgement:Acknowledgement?
public var subscriptionId:String?
public var cendynPropertyId:String?
required public init(){}
}
public class Acknowledgement : Codable
{
public var cendynPropertyID:String?
public var hotelCode:String?
public var success:Bool?
public var echoToken:String?
public var uniqueIDs:[UniqueIDType] = []
public var messages:[StatusMessage] = []
required public init(){}
}
public class UniqueIDType : Codable
{
public var id:String?
public var type:String?
public var context:String?
required public init(){}
}
public class StatusMessage : Codable
{
public var messageType:StatusMessageType?
public var code:String?
public var message:String?
public var target:String?
required public init(){}
}
public enum StatusMessageType : String, Codable
{
case Info
case Warning
case Error
}
public class Response : Codable
{
public var statusCode:String?
public var recordCount:Int?
public var errorCount:Int?
required public init(){}
}
Swift MessageAcknowledgement 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /acknowlegement/{SubscriptionId}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"acknowledgement":{"cendynPropertyID":"String","hotelCode":"String","success":false,"echoToken":"String","uniqueIDs":[{"id":"String","type":"String","context":"String"}],"messages":[{"messageType":"Info","code":"String","message":"String","target":"String"}]},"subscriptionId":"String","cendynPropertyId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"statusCode":"String","recordCount":0,"errorCount":0}