| GET | /api/licensee/contacts |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eros.Subtle.Canvara.WebAPIModel.ServiceModelSubscription;
using Eros.Subtle.Canvara.WebAPIModel.Models;
namespace Eros.Subtle.Canvara.WebAPIModel.Models
{
public partial class ConnectedContactAddressModel
{
///<summary>
///A full address string of the address.
///</summary>
[ApiMember(DataType="string", Description="A full address string of the address.", Name="FullAddress")]
public virtual string FullAddress { get; set; }
///<summary>
///If true, this is the contacts primary address.
///</summary>
[ApiMember(DataType="bool", Description="If true, this is the contacts primary address.", Name="IsPrimary")]
public virtual bool IsPrimary { get; set; }
///<summary>
///If true, this is the contacts postal address.
///</summary>
[ApiMember(DataType="bool", Description="If true, this is the contacts postal address.", Name="IsPostal")]
public virtual bool IsPostal { get; set; }
///<summary>
///If true, this is the contacts registered address.
///</summary>
[ApiMember(DataType="bool", Description="If true, this is the contacts registered address.", Name="IsRegistered")]
public virtual bool IsRegistered { get; set; }
}
public partial class ConnectedContactConnectionsModel
{
///<summary>
///Guid of the role within Eros
///</summary>
[ApiMember(DataType="Guid", Description="Guid of the role within Eros", Name="RoleId")]
public virtual Guid RoleId { get; set; }
///<summary>
///Name of the role this contact is connected to the licensee with.
///</summary>
[ApiMember(DataType="string", Description="Name of the role this contact is connected to the licensee with.", Name="Role")]
public virtual string Role { get; set; }
///<summary>
///Guid of the role connections status within Eros.
///</summary>
[ApiMember(DataType="Guid", Description="Guid of the role connections status within Eros.", Name="StatusId")]
public virtual Guid StatusId { get; set; }
///<summary>
///Connection status of the role. It maybe active or pending.
///</summary>
[ApiMember(DataType="string", Description="Connection status of the role. It maybe active or pending.", Name="Status")]
public virtual string Status { get; set; }
}
public partial class ConnectedContactDetailModel
{
///<summary>
///The type of contact detail this is (email/mobile/fax/website etc)
///</summary>
[ApiMember(DataType="string", Description="The type of contact detail this is (email/mobile/fax/website etc)", Name="Type")]
public virtual string Type { get; set; }
///<summary>
///The contact detail. e.g (phone number or email address)
///</summary>
[ApiMember(DataType="string", Description="The contact detail. e.g (phone number or email address)", Name="ContactDetails")]
public virtual string ContactDetails { get; set; }
}
public partial class ConnectedContactModel
{
///<summary>
///Guid of the contact object within Eros.
///</summary>
[ApiMember(DataType="Guid", Description="Guid of the contact object within Eros.", Name="ContactId")]
public virtual Guid ContactId { get; set; }
///<summary>
///The salutation(preferred name) for the contact. Applies to a person contact type.
///</summary>
[ApiMember(DataType="string", Description="The salutation(preferred name) for the contact. Applies to a person contact type.", Name="Salutation")]
public virtual string Salutation { get; set; }
///<summary>
///The title for the contact. Applies to a person contact type.
///</summary>
[ApiMember(DataType="string", Description="The title for the contact. Applies to a person contact type.", Name="Title")]
public virtual string Title { get; set; }
///<summary>
///The first given name for the contact. Applies to a person contact type.
///</summary>
[ApiMember(DataType="string", Description="The first given name for the contact. Applies to a person contact type.", Name="FirstName")]
public virtual string FirstName { get; set; }
///<summary>
///Any middle names for the contact. Applies to a person contact type.
///</summary>
[ApiMember(DataType="string", Description="Any middle names for the contact. Applies to a person contact type.", Name="MiddleName")]
public virtual string MiddleName { get; set; }
///<summary>
///The surname for the contact. Applies to a person contact type.
///</summary>
[ApiMember(DataType="string", Description="The surname for the contact. Applies to a person contact type.", Name="Surname")]
public virtual string Surname { get; set; }
///<summary>
///The full name for the contact.
///</summary>
[ApiMember(DataType="string", Description="The full name for the contact.", Name="FullName")]
public virtual string FullName { get; set; }
///<summary>
///A legal name for the contact. Applies to an organisation contact type.
///</summary>
[ApiMember(DataType="string", Description="A legal name for the contact. Applies to an organisation contact type.", Name="LegalName")]
public virtual string LegalName { get; set; }
///<summary>
///A trading name for the contact. Applies to an organisation contact type.
///</summary>
[ApiMember(DataType="string", Description="A trading name for the contact. Applies to an organisation contact type.", Name="TradingName")]
public virtual string TradingName { get; set; }
///<summary>
///The birth date for the contact. Applies to a person contact type.
///</summary>
[ApiMember(DataType="DateTime?", Description="The birth date for the contact. Applies to a person contact type.", Name="BirthDate")]
public virtual DateTime? BirthDate { get; set; }
///<summary>
///Guid of the marital status within Eros.
///</summary>
[ApiMember(DataType="Guid?", Description="Guid of the marital status within Eros.", Name="MaritalStatusId")]
public virtual Guid? MaritalStatusId { get; set; }
///<summary>
///The contacts marital status if set.
///</summary>
[ApiMember(DataType="string", Description="The contacts marital status if set.", Name="MaritalStatusName")]
public virtual string MaritalStatusName { get; set; }
///<summary>
///Guid of the gender within Eros.
///</summary>
[ApiMember(DataType="Guid?", Description="Guid of the gender within Eros.", Name="GenderId")]
public virtual Guid? GenderId { get; set; }
///<summary>
///The contacts gender if set.
///</summary>
[ApiMember(DataType="string", Description="The contacts gender if set.", Name="GenderName")]
public virtual string GenderName { get; set; }
///<summary>
///Preferred language of the contact.
///</summary>
[ApiMember(DataType="string", Description="Preferred language of the contact.", Name="Language")]
public virtual string Language { get; set; }
///<summary>
///If true, the contact requires an interpreter.
///</summary>
[ApiMember(DataType="bool", Description="If true, the contact requires an interpreter.", Name="InterpreterRequired")]
public virtual bool InterpreterRequired { get; set; }
///<summary>
///Contact Type name of the contact.
///</summary>
[ApiMember(DataType="string", Description="Contact Type name of the contact.", Name="ContactTypeName")]
public virtual string ContactTypeName { get; set; }
///<summary>
///Guid of the Contact Type List Item object within Eros.
///</summary>
[ApiMember(DataType="Guid", Description="Guid of the Contact Type List Item object within Eros.", Name="ContactTypeId")]
public virtual Guid ContactTypeId { get; set; }
///<summary>
///Description of the contact for their external profile.
///</summary>
[ApiMember(DataType="string", Description="Description of the contact for their external profile.", Name="Description")]
public virtual string Description { get; set; }
///<summary>
///Contact 'Profession/Trade/Industry' details for their external profile.
///</summary>
[ApiMember(DataType="string", Description="Contact 'Profession/Trade/Industry' details for their external profile.", Name="EmploymentIndustry")]
public virtual string EmploymentIndustry { get; set; }
///<summary>
///Contact 'Working/Subcontracting for' details for their external profile.
///</summary>
[ApiMember(DataType="string", Description="Contact 'Working/Subcontracting for' details for their external profile.", Name="EmploymentRole")]
public virtual string EmploymentRole { get; set; }
///<summary>
///Contact 'Work Area/Suburbs' detail for their external profile.
///</summary>
[ApiMember(DataType="string", Description="Contact 'Work Area/Suburbs' detail for their external profile.", Name="EmploymentGeographicArea")]
public virtual string EmploymentGeographicArea { get; set; }
///<summary>
///The A.B.N for the contact.
///</summary>
[ApiMember(DataType="string", Description="The A.B.N for the contact.", Name="Abn")]
public virtual string Abn { get; set; }
///<summary>
///The A.C.N for the contact.
///</summary>
[ApiMember(DataType="string", Description="The A.C.N for the contact.", Name="Acn")]
public virtual string Acn { get; set; }
///<summary>
///The A.R.B.N for the contact.
///</summary>
[ApiMember(DataType="string", Description="The A.R.B.N for the contact.", Name="Arbn")]
public virtual string Arbn { get; set; }
///<summary>
///Timezone name that applies to the contact.
///</summary>
[ApiMember(DataType="string", Description="Timezone name that applies to the contact.", Name="TimezoneName")]
public virtual string TimezoneName { get; set; }
///<summary>
///A list of the contact details for the contact.
///</summary>
[ApiMember(DataType="List<ConnectedContactDetailModel>", Description="A list of the contact details for the contact.", Name="ContactDetails")]
public virtual List<ConnectedContactDetailModel> ContactDetails { get; set; }
///<summary>
///A list of the contact addresses for the contact
///</summary>
[ApiMember(DataType="List<ConnectedContactAddressModel>", Description="A list of the contact addresses for the contact", Name="ContactAddresses")]
public virtual List<ConnectedContactAddressModel> ContactAddresses { get; set; }
///<summary>
///True if this contact has at least 1 active connection to the licensee. Without an active connection only public profile information for the contact is returned.
///</summary>
[ApiMember(DataType="bool", Description="True if this contact has at least 1 active connection to the licensee. Without an active connection only public profile information for the contact is returned.", Name="IsContactConnected")]
public virtual bool IsContactConnected { get; set; }
///<summary>
///A list of connections this contact has with the licensee. May be active or a pending request to connect.
///</summary>
[ApiMember(DataType="List<ConnectedContactConnectionsModel>", Description="A list of connections this contact has with the licensee. May be active or a pending request to connect.", Name="Connections")]
public virtual List<ConnectedContactConnectionsModel> Connections { get; set; }
///<summary>
///A list of projects this contact is linked to as a customer.
///</summary>
[ApiMember(DataType="List<ContactLinkedCustomerProjectsModel>", Description="A list of projects this contact is linked to as a customer.", Name="Projects")]
public virtual List<ContactLinkedCustomerProjectsModel> Projects { get; set; }
///<summary>
///A list of integration subscriptions used to link this contact to external records in other licensee owned systems.
///</summary>
[ApiMember(DataType="List<ConnectedContactSubscriptionsModel>", Description="A list of integration subscriptions used to link this contact to external records in other licensee owned systems.", Name="Subscriptions")]
public virtual List<ConnectedContactSubscriptionsModel> Subscriptions { get; set; }
}
public partial class ConnectedContactSubscriptionsModel
{
///<summary>
///Guid of the datasource within Eros.
///</summary>
[ApiMember(DataType="Guid", Description="Guid of the datasource within Eros.", Name="DatasourceId")]
public virtual Guid DatasourceId { get; set; }
///<summary>
///Name of the datasource that is the external system with a record of this contact.
///</summary>
[ApiMember(DataType="string", Description="Name of the datasource that is the external system with a record of this contact.", Name="Datasource")]
public virtual string Datasource { get; set; }
///<summary>
///Foreign Key lookup of this contact in the external system the datasource represents.
///</summary>
[ApiMember(DataType="string", Description="Foreign Key lookup of this contact in the external system the datasource represents.", Name="AlternateKey")]
public virtual string AlternateKey { get; set; }
}
public partial class ContactLinkedCustomerProjectsModel
{
///<summary>
///Guid of the project within Eros.
///</summary>
[ApiMember(DataType="Guid", Description="Guid of the project within Eros.", Name="ProjectId")]
public virtual Guid ProjectId { get; set; }
///<summary>
///Name of the project.
///</summary>
[ApiMember(DataType="string", Description="Name of the project.", Name="Name")]
public virtual string Name { get; set; }
}
}
namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModelSubscription
{
///<summary>
///Returns a list of contacts a licensee is linked to. Contacts are returned in batches.
///</summary>
[Api(Description="Returns a list of contacts a licensee is linked to. Contacts are returned in batches.")]
public partial class GetLicenseeContactList
{
///<summary>
///Number of contacts to retrieve per call.
///</summary>
[ApiMember(DataType="int", Description="Number of contacts to retrieve per call.", IsRequired=true, Name="BatchSize")]
public virtual int BatchSize { get; set; }
///<summary>
///Call number (1=1st, 2=2nd) this should progress upwards until all contacts have been retrieved.
///</summary>
[ApiMember(DataType="int", Description="Call number (1=1st, 2=2nd) this should progress upwards until all contacts have been retrieved.", IsRequired=true, Name="BatchNumber")]
public virtual int BatchNumber { get; set; }
}
[ApiResponse(Description="List of Contacts")]
public partial class GetLicenseeContactListResponse
{
///<summary>
///List of contacts.
///</summary>
[ApiMember(DataType="List<ConnectedContactModel>", Description="List of contacts.", Name="Contacts")]
public virtual List<ConnectedContactModel> Contacts { get; set; }
///<summary>
///Details of the api response. Success/Fail.
///</summary>
[ApiMember(DataType="ResponseStatus", Description="Details of the api response. Success/Fail.", Name="ResponseStatus")]
public virtual ResponseStatus ResponseStatus { get; set; }
}
}
C# GetLicenseeContactList DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/licensee/contacts HTTP/1.1 Host: production-eros-platform-apisubscription.azurewebsites.net Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetLicenseeContactListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModelSubscription">
<Contacts xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.Models">
<d2p1:ConnectedContactModel>
<d2p1:Abn>String</d2p1:Abn>
<d2p1:Acn>String</d2p1:Acn>
<d2p1:Arbn>String</d2p1:Arbn>
<d2p1:BirthDate>0001-01-01T00:00:00</d2p1:BirthDate>
<d2p1:Connections>
<d2p1:ConnectedContactConnectionsModel>
<d2p1:Role>String</d2p1:Role>
<d2p1:RoleId>00000000-0000-0000-0000-000000000000</d2p1:RoleId>
<d2p1:Status>String</d2p1:Status>
<d2p1:StatusId>00000000-0000-0000-0000-000000000000</d2p1:StatusId>
</d2p1:ConnectedContactConnectionsModel>
</d2p1:Connections>
<d2p1:ContactAddresses>
<d2p1:ConnectedContactAddressModel>
<d2p1:FullAddress>String</d2p1:FullAddress>
<d2p1:IsPostal>false</d2p1:IsPostal>
<d2p1:IsPrimary>false</d2p1:IsPrimary>
<d2p1:IsRegistered>false</d2p1:IsRegistered>
</d2p1:ConnectedContactAddressModel>
</d2p1:ContactAddresses>
<d2p1:ContactDetails>
<d2p1:ConnectedContactDetailModel>
<d2p1:ContactDetails>String</d2p1:ContactDetails>
<d2p1:Type>String</d2p1:Type>
</d2p1:ConnectedContactDetailModel>
</d2p1:ContactDetails>
<d2p1:ContactId>00000000-0000-0000-0000-000000000000</d2p1:ContactId>
<d2p1:ContactTypeId>00000000-0000-0000-0000-000000000000</d2p1:ContactTypeId>
<d2p1:ContactTypeName>String</d2p1:ContactTypeName>
<d2p1:Description>String</d2p1:Description>
<d2p1:EmploymentGeographicArea>String</d2p1:EmploymentGeographicArea>
<d2p1:EmploymentIndustry>String</d2p1:EmploymentIndustry>
<d2p1:EmploymentRole>String</d2p1:EmploymentRole>
<d2p1:FirstName>String</d2p1:FirstName>
<d2p1:FullName>String</d2p1:FullName>
<d2p1:GenderId>00000000-0000-0000-0000-000000000000</d2p1:GenderId>
<d2p1:GenderName>String</d2p1:GenderName>
<d2p1:InterpreterRequired>false</d2p1:InterpreterRequired>
<d2p1:IsContactConnected>false</d2p1:IsContactConnected>
<d2p1:Language>String</d2p1:Language>
<d2p1:LegalName>String</d2p1:LegalName>
<d2p1:MaritalStatusId>00000000-0000-0000-0000-000000000000</d2p1:MaritalStatusId>
<d2p1:MaritalStatusName>String</d2p1:MaritalStatusName>
<d2p1:MiddleName>String</d2p1:MiddleName>
<d2p1:Projects>
<d2p1:ContactLinkedCustomerProjectsModel>
<d2p1:Name>String</d2p1:Name>
<d2p1:ProjectId>00000000-0000-0000-0000-000000000000</d2p1:ProjectId>
</d2p1:ContactLinkedCustomerProjectsModel>
</d2p1:Projects>
<d2p1:Salutation>String</d2p1:Salutation>
<d2p1:Subscriptions>
<d2p1:ConnectedContactSubscriptionsModel>
<d2p1:AlternateKey>String</d2p1:AlternateKey>
<d2p1:Datasource>String</d2p1:Datasource>
<d2p1:DatasourceId>00000000-0000-0000-0000-000000000000</d2p1:DatasourceId>
</d2p1:ConnectedContactSubscriptionsModel>
</d2p1:Subscriptions>
<d2p1:Surname>String</d2p1:Surname>
<d2p1:TimezoneName>String</d2p1:TimezoneName>
<d2p1:Title>String</d2p1:Title>
<d2p1:TradingName>String</d2p1:TradingName>
</d2p1:ConnectedContactModel>
</Contacts>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</GetLicenseeContactListResponse>