All Verbs | /ConsultantDetails |
---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using AgentivityAPI.ServiceModel.Types;
using AgentivityAPI.ServiceModel.Base;
using AgentivityAPI.ServiceModel;
namespace AgentivityAPI.ServiceModel
{
[DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")]
public partial class ItemResponse<TItem, TReport>
{
[DataMember(Order=1)]
public virtual ResponseMetadata ResponseMetadata { get; set; }
[DataMember(Order=2, EmitDefaultValue=false)]
public virtual TReport ResponseReport { get; set; }
[DataMember(Order=3, EmitDefaultValue=false)]
public virtual AgentivityError ResponseError { get; set; }
}
[DataContract(Namespace="schemas.agentivity.com/types")]
public partial class Report<TItemResponse, TItem>
{
[DataMember(Order=1, EmitDefaultValue=false)]
public virtual TItem Item { get; set; }
}
}
namespace AgentivityAPI.ServiceModel.Base
{
[DataContract(Namespace="schemas.agentivity.com/types")]
public partial class CompanyLevelRequestBase
: PagingMetadata, IMemberUsername, IMemberOwningCompanyCode
{
///<summary>
///Comma Delimited List of Owning Company Codes
///</summary>
[DataMember]
public virtual string[] OwningCompanyCode { get; set; }
///<summary>
///UserName in form of an email address
///</summary>
[DataMember]
public virtual string UserName { get; set; }
}
}
namespace AgentivityAPI.ServiceModel.Types
{
[DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")]
public partial class AgentivityError
{
[DataMember]
public virtual string ErrorCode { get; set; }
[DataMember]
public virtual string Message { get; set; }
[DataMember]
public virtual string StatusCode { get; set; }
[DataMember]
public virtual string VerboseMessage { get; set; }
}
[DataContract(Name="BookingSource", Namespace="schemas.agentivity.com/types")]
public partial class BookingSource
{
[DataMember(Order=10)]
public virtual string ConsultantID { get; set; }
[DataMember(Order=20)]
public virtual string BookingSourceCode { get; set; }
}
[DataContract(Name="CacheMetadata", Namespace="schemas.agentivity.com/types")]
public partial class CacheMetadata
{
[DataMember(Order=1)]
public virtual DateTime CachedAt { get; set; }
[DataMember(Order=2)]
public virtual DateTime CacheExpiresAt { get; set; }
[DataMember(Order=0)]
public virtual bool IsFromCache { get; set; }
}
[DataContract(Name="ConsultantDetails", Namespace="schemas.agentivity.com/types")]
public partial class ConsultantDetails
{
[DataMember(Order=10)]
public virtual ConsultantMainDetails Consultant { get; set; }
[DataMember(Order=20)]
public virtual ConsultantGroups ConsultantGroups { get; set; }
[DataMember(Order=30)]
public virtual List<BookingSource> BookingSources { get; set; }
}
[DataContract(Name="ConsultantGroups", Namespace="schemas.agentivity.com/types")]
public partial class ConsultantGroups
{
[DataMember(Order=10)]
public virtual List<ConsultantInGroupDetails> LeaveCover { get; set; }
}
[DataContract(Name="Consultant", Namespace="schemas.agentivity.com/types")]
public partial class ConsultantInGroupDetails
{
[DataMember(Order=10)]
public virtual string ConsultantID { get; set; }
[DataMember(Order=20)]
public virtual string Firstname { get; set; }
[DataMember(Order=30)]
public virtual string Lastname { get; set; }
}
[DataContract(Name="Consultant", Namespace="schemas.agentivity.com/types")]
public partial class ConsultantMainDetails
{
[DataMember(Order=10)]
public virtual string Firstname { get; set; }
[DataMember(Order=20)]
public virtual string Lastname { get; set; }
[DataMember(Order=30)]
public virtual string StaffNumber { get; set; }
[DataMember(Order=40)]
public virtual string Email { get; set; }
[DataMember(Order=50)]
public virtual bool OnLeave { get; set; }
}
[DataContract(Namespace="schemas.agentivity.com/types")]
public partial class GetConsultantDetails
: CompanyLevelRequestBase, IRequestConsultantID
{
///<summary>
///Consultant ID (sign on)
///</summary>
[DataMember]
public virtual string ConsultantID { get; set; }
///<summary>
///Booking system (1G, 1A or 1S)
///</summary>
[DataMember]
public virtual string BookingSource { get; set; }
///<summary>
///Request Consultant ID (sign on)
///</summary>
[DataMember]
public virtual string RequestConsultantID { get; set; }
}
[DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")]
public partial class GetConsultantDetailsItemResponse
: ItemResponse<ConsultantDetails, GetConsultantDetailsResponseReport>
{
}
[DataContract(Name="ConsultantDetails", Namespace="schemas.agentivity.com/types")]
public partial class GetConsultantDetailsResponseReport
: Report<GetConsultantDetailsItemResponse, ConsultantDetails>
{
}
[DataContract(Name="Metadata", Namespace="schemas.agentivity.com/types")]
public partial class PagingMetadata
{
///<summary>
///Starting Record
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="Starting Record", Name="Offset", ParameterType="query")]
public virtual string Offset { get; set; }
///<summary>
///Number of records to return (PageSize)
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="Number of records to return (PageSize)", Name="Limit", ParameterType="query")]
public virtual string Limit { get; set; }
///<summary>
///Total Number of Records in a Full Reponse (if no paging)
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="Total Number of Records in a Full Reponse (if no paging)", Name="TotalRecords", ParameterType="query")]
public virtual int TotalRecords { get; set; }
///<summary>
///Total Number of Records in this Reponse (on this page)
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="Total Number of Records in this Reponse (on this page)", Name="ResponseRecords", ParameterType="query")]
public virtual int ResponseRecords { get; set; }
}
[DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")]
public partial class ResponseMetadata
{
[DataMember(Order=0)]
public virtual bool Success { get; set; }
[DataMember(Order=1)]
public virtual bool HasCache { get; set; }
[DataMember(Order=2)]
public virtual bool HasPaging { get; set; }
[DataMember(Order=3, EmitDefaultValue=false)]
public virtual CacheMetadata CacheMetadata { get; set; }
[DataMember(Order=4, EmitDefaultValue=false)]
public virtual PagingMetadata PagingMetadata { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /ConsultantDetails HTTP/1.1
Host: api.agentivity.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"ConsultantID":"String","BookingSource":"String","RequestConsultantID":"String","OwningCompanyCode":["String"],"UserName":"String","Offset":"String","Limit":"String","TotalRecords":0,"ResponseRecords":0}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"ResponseMetadata":{"Success":false,"HasCache":false,"HasPaging":false,"CacheMetadata":{"IsFromCache":false,"CachedAt":"\/Date(-62135596800000-0000)\/","CacheExpiresAt":"\/Date(-62135596800000-0000)\/"},"PagingMetadata":{"Offset":"String","Limit":"String","TotalRecords":0,"ResponseRecords":0}},"ResponseReport":{"Item":{"Consultant":{"Firstname":"String","Lastname":"String","StaffNumber":"String","Email":"String","OnLeave":false},"ConsultantGroups":{"LeaveCover":[{"ConsultantID":"String","Firstname":"String","Lastname":"String"}]},"BookingSources":[{"ConsultantID":"String","BookingSourceCode":"String"}]}},"ResponseError":{"ErrorCode":"String","Message":"String","StatusCode":"String","VerboseMessage":"String"}}