Required role: | API |
All Verbs | /api/Query/Journal |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
@AutoQueryViewer(Description="", IconUrl="octicon:database", Title="Journal")
open class FindJournal : QueryDb<JournalInstance>()
{
}
open class QueryDb<T> : QueryBase()
{
}
@DataContract
open class QueryBase
{
@DataMember(Order=1)
var Skip:Int? = null
@DataMember(Order=2)
var Take:Int? = null
@DataMember(Order=3)
var OrderBy:String? = null
@DataMember(Order=4)
var OrderByDesc:String? = null
@DataMember(Order=5)
var Include:String? = null
@DataMember(Order=6)
var Fields:String? = null
@DataMember(Order=7)
var Meta:HashMap<String,String> = HashMap<String,String>()
}
open class JournalInstance
{
var JournalId:Int? = null
var JournalDate:Date? = null
var Title:String? = null
var Comment:String? = null
var MessageType:Int? = null
var UserName:String? = null
var Member:MemberInstance? = null
@References(MemberInstance.class)
var MemberId:Int? = null
var Message:MessageInstance? = null
@References(MessageInstance.class)
var MessageId:Int? = null
var ViewedDate:Date? = null
var Deleted:Boolean? = null
var Demo:Boolean? = null
var Permanent:Boolean? = null
var alertDate:Date? = null
var AssignedToUserId:Int? = null
var Completed:Boolean? = null
var CompletedDate:Date? = null
var CreatedByUserId:Int? = null
var PostponedCount:Int? = null
var SendSMSReminder:Boolean? = null
var NoShow:Boolean? = null
}
open class MemberInstance
{
var MemberId:Int? = null
var MemberType:Int? = null
var MembershipNumber:String? = null
var CardNumber:String? = null
var CompanyName:String? = null
var Surname:String? = null
var Forenames:String? = null
var Title:String? = null
var Gender:Int? = null
var DateOfBirth:Date? = null
var Address1:String? = null
var Address2:String? = null
var City:String? = null
var County:String? = null
var Postcode:String? = null
var HomePhone:String? = null
var MobilePhone:String? = null
var EmailAddress:String? = null
var EmailOptOut:Boolean? = null
var SmsOptOut:Boolean? = null
var PhoneOptOut:Boolean? = null
var LetterOptOut:Boolean? = null
var DirectDebitAccountHolder:String? = null
var DirectDebitAccountNumber:String? = null
var DirectDebitSortCode:String? = null
var JoinedDate:Date? = null
var DirectDebitBankAddress:String? = null
var FullName:String? = null
var ExternalReference:String? = null
var Photo:ByteArray? = null
var PhotoModifiedDate:Date? = null
var Notes:String? = null
var Deleted:Boolean? = null
var Demo:Boolean? = null
var UseExternalStatus:Boolean? = null
var ExternalStatus:Int? = null
var FreeText:String? = null
var MemberKey:UUID? = null
var Balance:BigDecimal? = null
var CreditLimit:BigDecimal? = null
var CreatedDate:Date? = null
var ModifiedDate:Date? = null
var DeletedDate:Date? = null
var ExternalSource:Int? = null
var RetentionMetric:BigDecimal? = null
var MonthlyAttendanceFrequency:BigDecimal? = null
var AssignedToUserId:Int? = null
var CreatedByUserId:Int? = null
var DeletedByUserId:Int? = null
var LossReason:LossReasonInstance? = null
@References(LossReasonInstance.class)
var LossReasonId:Int? = null
var WonOrLost:Int? = null
var WonOrLostDate:Date? = null
var GiftAidPermission:Boolean? = null
var PhotoPermission:Boolean? = null
var FirstAidPermission:Boolean? = null
var EmergencyContact:String? = null
var WonOrLostByUser:UserInstance? = null
@References(UserInstance.class)
var WonOrLostByUserId:Int? = null
var AgreedToTerms:Date? = null
var OnlineBookingBanned:Boolean? = null
var Country:String? = null
var FingerprintEnrolled:Date? = null
var LastPaymentAmount:BigDecimal? = null
var Pin:String? = null
var ProspectingPoints:Int? = null
var AchievementPoints:Int? = null
var ParentForenames:String? = null
var ParentSurname:String? = null
}
open class LossReasonInstance
{
var LossReasonId:Int? = null
var Reason:String? = null
var Deleted:Boolean? = null
var Demo:Boolean? = null
var Selectable:Boolean? = null
}
open class UserInstance
{
var UserId:Int? = null
var UserName:String? = null
var Name:String? = null
var Email:String? = null
var MobilePhone:String? = null
var Enabled:Boolean? = null
var LastLogin:Date? = null
var Created:Date? = null
var Training:Boolean? = null
var Deleted:Boolean? = null
var CoursesCompleted:Int? = null
var DisplayHomeNotification:Boolean? = null
var TwoFactorEnabled:Boolean? = null
var EmailConfirmed:Boolean? = null
var MobilePhoneConfirmed:Boolean? = null
var Notifications:Boolean? = null
var ChangePassword:Date? = null
var Activated:Date? = null
}
open class MessageInstance
{
var MessageId:Int? = null
var DueDate:Date? = null
var SentDate:Date? = null
var Processed:Boolean? = null
var Failures:Int? = null
var InstanceId:Int? = null
var MessageSid:String? = null
var MessageTemplate:MessageTemplateInstance? = null
@References(MessageTemplateInstance.class)
var MessageTemplateId:Int? = null
var OpenedDate:Date? = null
var BouncedDate:Date? = null
var DeliveredDate:Date? = null
var UnsubscribedDate:Date? = null
var SpamReportDate:Date? = null
var User:UserInstance? = null
@References(UserInstance.class)
var UserId:Int? = null
var InstanceType:Int? = null
}
open class MessageTemplateInstance
{
var MessageTemplateId:Int? = null
var Name:String? = null
var Subject:String? = null
var Body:String? = null
var ReportId:Int? = null
var TemplateType:Int? = null
var Created:Date? = null
var CreatedBy:Int? = null
var Modified:Date? = null
var ModifiedBy:Int? = null
var Deleted:Date? = null
var DeletedBy:Int? = null
var EventType:Int? = null
var ContentType:Int? = null
var Hidden:Boolean? = null
var ParentMessageTemplateId:Int? = null
var InclusionTags:String? = null
var ExclusionTags:String? = null
}
@DataContract
open class QueryResponse<T>
{
@DataMember(Order=1)
var Offset:Int? = null
@DataMember(Order=2)
var Total:Int? = null
@DataMember(Order=3)
var Results:ArrayList<T> = ArrayList<T>()
@DataMember(Order=4)
var Meta:HashMap<String,String> = HashMap<String,String>()
@DataMember(Order=5)
var ResponseStatus:ResponseStatus? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/Query/Journal HTTP/1.1
Host: api.clubmanagercentral.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Skip":0,"Take":0,"OrderBy":"String","OrderByDesc":"String","Include":"String","Fields":"String","Meta":{"String":"String"}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Offset":0,"Total":0,"Results":[{"JournalId":0,"JournalDate":"0001-01-01T00:00:00.0000000","Title":"String","Comment":"String","MessageType":0,"UserName":"String","Member":{"MemberId":0,"MemberType":0,"MembershipNumber":"String","CardNumber":"String","CompanyName":"String","Surname":"String","Forenames":"String","Title":"String","Gender":0,"DateOfBirth":"0001-01-01T00:00:00.0000000","Address1":"String","Address2":"String","City":"String","County":"String","Postcode":"String","HomePhone":"String","MobilePhone":"String","EmailAddress":"String","EmailOptOut":false,"SmsOptOut":false,"PhoneOptOut":false,"LetterOptOut":false,"DirectDebitAccountHolder":"String","DirectDebitAccountNumber":"String","DirectDebitSortCode":"String","JoinedDate":"0001-01-01T00:00:00.0000000","DirectDebitBankAddress":"String","FullName":"String","ExternalReference":"String","Photo":"AA==","PhotoModifiedDate":"0001-01-01T00:00:00.0000000","Notes":"String","Deleted":false,"Demo":false,"UseExternalStatus":false,"ExternalStatus":0,"FreeText":"String","MemberKey":"00000000000000000000000000000000","Balance":0,"CreditLimit":0,"CreatedDate":"0001-01-01T00:00:00.0000000","ModifiedDate":"0001-01-01T00:00:00.0000000","DeletedDate":"0001-01-01T00:00:00.0000000","ExternalSource":0,"RetentionMetric":0,"MonthlyAttendanceFrequency":0,"AssignedToUserId":0,"CreatedByUserId":0,"DeletedByUserId":0,"LossReason":{"LossReasonId":0,"Reason":"String","Deleted":false,"Demo":false,"Selectable":false},"LossReasonId":0,"WonOrLost":0,"WonOrLostDate":"0001-01-01T00:00:00.0000000","GiftAidPermission":false,"PhotoPermission":false,"FirstAidPermission":false,"EmergencyContact":"String","WonOrLostByUser":{"UserId":0,"UserName":"String","Name":"String","Email":"String","MobilePhone":"String","Enabled":false,"LastLogin":"0001-01-01T00:00:00.0000000","Created":"0001-01-01T00:00:00.0000000","Training":false,"Deleted":false,"CoursesCompleted":0,"DisplayHomeNotification":false,"TwoFactorEnabled":false,"EmailConfirmed":false,"MobilePhoneConfirmed":false,"Notifications":false,"ChangePassword":"0001-01-01T00:00:00.0000000","Activated":"0001-01-01T00:00:00.0000000"},"WonOrLostByUserId":0,"AgreedToTerms":"0001-01-01T00:00:00.0000000","OnlineBookingBanned":false,"Country":"String","FingerprintEnrolled":"0001-01-01T00:00:00.0000000","LastPaymentAmount":0,"Pin":"String","ProspectingPoints":0,"AchievementPoints":0,"ParentForenames":"String","ParentSurname":"String"},"MemberId":0,"Message":{"MessageId":0,"DueDate":"0001-01-01T00:00:00.0000000","SentDate":"0001-01-01T00:00:00.0000000","Processed":false,"Failures":0,"InstanceId":0,"MessageSid":"String","MessageTemplate":{"MessageTemplateId":0,"Name":"String","Subject":"String","Body":"String","ReportId":0,"TemplateType":0,"Created":"0001-01-01T00:00:00.0000000","CreatedBy":0,"Modified":"0001-01-01T00:00:00.0000000","ModifiedBy":0,"Deleted":"0001-01-01T00:00:00.0000000","DeletedBy":0,"EventType":0,"ContentType":0,"Hidden":false,"ParentMessageTemplateId":0,"InclusionTags":"String","ExclusionTags":"String"},"MessageTemplateId":0,"OpenedDate":"0001-01-01T00:00:00.0000000","BouncedDate":"0001-01-01T00:00:00.0000000","DeliveredDate":"0001-01-01T00:00:00.0000000","UnsubscribedDate":"0001-01-01T00:00:00.0000000","SpamReportDate":"0001-01-01T00:00:00.0000000","User":{"UserId":0,"UserName":"String","Name":"String","Email":"String","MobilePhone":"String","Enabled":false,"LastLogin":"0001-01-01T00:00:00.0000000","Created":"0001-01-01T00:00:00.0000000","Training":false,"Deleted":false,"CoursesCompleted":0,"DisplayHomeNotification":false,"TwoFactorEnabled":false,"EmailConfirmed":false,"MobilePhoneConfirmed":false,"Notifications":false,"ChangePassword":"0001-01-01T00:00:00.0000000","Activated":"0001-01-01T00:00:00.0000000"},"UserId":0,"InstanceType":0},"MessageId":0,"ViewedDate":"0001-01-01T00:00:00.0000000","Deleted":false,"Demo":false,"Permanent":false,"alertDate":"0001-01-01T00:00:00.0000000","AssignedToUserId":0,"Completed":false,"CompletedDate":"0001-01-01T00:00:00.0000000","CreatedByUserId":0,"PostponedCount":0,"SendSMSReminder":false,"NoShow":false}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}