| POST | /transaction/{SubscriptionId}/{CendynPropertyId} |
|---|
import Foundation
import ServiceStack
public class TransactionPost : Codable
{
public var transactionContainer:TransactionContainer?
public var subscriptionId:String?
public var cendynPropertyId:String?
required public init(){}
}
public class TransactionContainer : Codable
{
public var echoToken:String?
public var transactionHeader:TransactionHeader?
public var transactions:[Transaction] = []
required public init(){}
}
public class TransactionHeader : Codable
{
public var cendynPropertyID:String?
public var sourcePropertyID:String?
public var externalResID1:String?
public var externalProfileID:String?
public var externalRefType:String?
public var externalRefID:String?
public var transactionHeaderSource:String?
public var externalID1:String?
public var externalID2:String?
public var openedDate:Date?
public var closedDate:Date?
public var postedDate:Date?
public var userID:String?
public var userName:String?
public var salesRep:String?
public var shippingCode:String?
public var referenceNum:String?
public var customCode1:String?
public var customCode2:String?
public var customCode3:Int?
public var taxCode:String?
public var isTaxExempt:Bool?
public var taxAmount:Double?
public var feeAmount:Double?
public var discountAmount:Double?
public var netAmount:Double?
public var totalAmount:Double?
public var currencyCode:String?
public var importSource:String?
public var importSourceID:String?
required public init(){}
}
public class Transaction : Codable
{
public var cendynPropertyID:String?
public var sourcePropertyID:String?
public var externalResID1:String?
public var externalProfileID:String?
public var externalRefType:String?
public var externalRefID:String?
public var transactionSource:String?
public var transactionID:String?
public var transactionGroup:String?
public var transactionDate:Date?
public var folioID:String?
public var folioGroupingID:String?
public var transactionCode:String?
public var Description:String?
public var creditAmount:Double?
public var debitAmount:Double?
public var netAmount:Double?
public var displayOnInvoice:Bool?
public var ledgerAccountNum:String?
public var ccTransactionType:String?
public var roomNumber:String?
public var transferType:String?
public var transferredResID:String?
public var referenceNum:String?
public var postedNights:Int?
public var itemQty:Int?
public var userID:String?
public var currencyCode:String?
public var decimals:Int?
public var customValue1:Double?
public var customValue2:Double?
required public init(){}
}
public class Response : Codable
{
public var statusCode:String?
public var recordCount:Int?
public var errorCount:Int?
required public init(){}
}
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 /transaction/{SubscriptionId}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"transactionContainer":{"echoToken":"String","transactionHeader":{"cendynPropertyID":"String","sourcePropertyID":"String","externalResID1":"String","externalProfileID":"String","externalRefType":"String","externalRefID":"String","transactionHeaderSource":"String","externalID1":"String","externalID2":"String","openedDate":"0001-01-01T00:00:00.0000000","closedDate":"0001-01-01T00:00:00.0000000","postedDate":"0001-01-01T00:00:00.0000000","userID":"String","userName":"String","salesRep":"String","shippingCode":"String","referenceNum":"String","customCode1":"String","customCode2":"String","customCode3":0,"taxCode":"String","isTaxExempt":false,"taxAmount":0,"feeAmount":0,"discountAmount":0,"netAmount":0,"totalAmount":0,"currencyCode":"String","importSource":"String","importSourceID":"String"},"transactions":[{"cendynPropertyID":"String","sourcePropertyID":"String","externalResID1":"String","externalProfileID":"String","externalRefType":"String","externalRefID":"String","transactionSource":"String","transactionID":"String","transactionGroup":"String","transactionDate":"0001-01-01T00:00:00.0000000","folioID":"String","folioGroupingID":"String","transactionCode":"String","description":"String","creditAmount":0,"debitAmount":0,"netAmount":0,"displayOnInvoice":false,"ledgerAccountNum":"String","ccTransactionType":"String","roomNumber":"String","transferType":"String","transferredResID":"String","referenceNum":"String","postedNights":0,"itemQty":0,"userID":"String","currencyCode":"String","decimals":0,"customValue1":0,"customValue2":0}]},"subscriptionId":"String","cendynPropertyId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"statusCode":"String","recordCount":0,"errorCount":0}