CenResService

<back to all web services

MessageAcknowledgement

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

namespace Cendyn.CenRes.DataLib.Models
{
    public partial class Acknowledgement
    {
        public Acknowledgement()
        {
            UniqueIDs = new List<UniqueIDType>{};
            Messages = new List<StatusMessage>{};
        }

        public virtual string CendynPropertyID { get; set; }
        public virtual string HotelCode { get; set; }
        public virtual bool Success { get; set; }
        public virtual string EchoToken { get; set; }
        public virtual List<UniqueIDType> UniqueIDs { get; set; }
        public virtual List<StatusMessage> Messages { get; set; }
    }

    public partial class Response
    {
        public virtual string StatusCode { get; set; }
        public virtual int RecordCount { get; set; }
        public virtual int ErrorCount { get; set; }
    }

    public partial class StatusMessage
    {
        public virtual StatusMessageType MessageType { get; set; }
        public virtual string Code { get; set; }
        public virtual string Message { get; set; }
        public virtual string Target { get; set; }
    }

    public enum StatusMessageType
    {
        Info,
        Warning,
        Error,
    }

    public partial class UniqueIDType
    {
        public virtual string ID { get; set; }
        public virtual string Type { get; set; }
        public virtual string Context { get; set; }
    }

}

namespace CenResSS.ServiceModel
{
    public partial class MessageAcknowledgement
    {
        public virtual Acknowledgement Acknowledgement { get; set; }
        public virtual string SubscriptionId { get; set; }
        public virtual string CendynPropertyId { get; set; }
    }

}

C# 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

HTTP + JSON

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}