| GET | /api/licensee/contacts |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConnectedContactDetailModel:
# @ApiMember(DataType="string", Description="The type of contact detail this is (email/mobile/fax/website etc)", Name="Type", ParameterType="body")
type: Optional[str] = None
"""
The type of contact detail this is (email/mobile/fax/website etc)
"""
# @ApiMember(DataType="string", Description="The contact detail. e.g (phone number or email address)", Name="ContactDetails", ParameterType="body")
contact_details: Optional[str] = None
"""
The contact detail. e.g (phone number or email address)
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConnectedContactAddressModel:
# @ApiMember(DataType="string", Description="A full address string of the address.", Name="FullAddress", ParameterType="body")
full_address: Optional[str] = None
"""
A full address string of the address.
"""
# @ApiMember(DataType="bool", Description="If true, this is the contacts primary address.", Name="IsPrimary", ParameterType="body")
is_primary: bool = False
"""
If true, this is the contacts primary address.
"""
# @ApiMember(DataType="bool", Description="If true, this is the contacts postal address.", Name="IsPostal", ParameterType="body")
is_postal: bool = False
"""
If true, this is the contacts postal address.
"""
# @ApiMember(DataType="bool", Description="If true, this is the contacts registered address.", Name="IsRegistered", ParameterType="body")
is_registered: bool = False
"""
If true, this is the contacts registered address.
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConnectedContactConnectionsModel:
# @ApiMember(DataType="Guid", Description="Guid of the role within Eros", Name="RoleId", ParameterType="body")
role_id: Optional[str] = None
"""
Guid of the role within Eros
"""
# @ApiMember(DataType="string", Description="Name of the role this contact is connected to the licensee with.", Name="Role", ParameterType="body")
role: Optional[str] = None
"""
Name of the role this contact is connected to the licensee with.
"""
# @ApiMember(DataType="Guid", Description="Guid of the role connections status within Eros.", Name="StatusId", ParameterType="body")
status_id: Optional[str] = None
"""
Guid of the role connections status within Eros.
"""
# @ApiMember(DataType="string", Description="Connection status of the role. It maybe active or pending.", Name="Status", ParameterType="body")
status: Optional[str] = None
"""
Connection status of the role. It maybe active or pending.
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ContactLinkedCustomerProjectsModel:
# @ApiMember(DataType="Guid", Description="Guid of the project within Eros.", Name="ProjectId", ParameterType="body")
project_id: Optional[str] = None
"""
Guid of the project within Eros.
"""
# @ApiMember(DataType="string", Description="Name of the project.", Name="Name", ParameterType="body")
name: Optional[str] = None
"""
Name of the project.
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConnectedContactSubscriptionsModel:
# @ApiMember(DataType="Guid", Description="Guid of the datasource within Eros.", Name="DatasourceId", ParameterType="body")
datasource_id: Optional[str] = None
"""
Guid of the datasource within Eros.
"""
# @ApiMember(DataType="string", Description="Name of the datasource that is the external system with a record of this contact.", Name="Datasource", ParameterType="body")
datasource: Optional[str] = None
"""
Name of the datasource that is the external system with a record of this contact.
"""
# @ApiMember(DataType="string", Description="Foreign Key lookup of this contact in the external system the datasource represents.", Name="AlternateKey", ParameterType="body")
alternate_key: Optional[str] = None
"""
Foreign Key lookup of this contact in the external system the datasource represents.
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConnectedContactModel:
# @ApiMember(DataType="Guid", Description="Guid of the contact object within Eros.", Name="ContactId", ParameterType="body")
contact_id: Optional[str] = None
"""
Guid of the contact object within Eros.
"""
# @ApiMember(DataType="string", Description="The salutation(preferred name) for the contact. Applies to a person contact type.", Name="Salutation", ParameterType="body")
salutation: Optional[str] = None
"""
The salutation(preferred name) for the contact. Applies to a person contact type.
"""
# @ApiMember(DataType="string", Description="The title for the contact. Applies to a person contact type.", Name="Title", ParameterType="body")
title: Optional[str] = None
"""
The title for the contact. Applies to a person contact type.
"""
# @ApiMember(DataType="string", Description="The first given name for the contact. Applies to a person contact type.", Name="FirstName", ParameterType="body")
first_name: Optional[str] = None
"""
The first given name for the contact. Applies to a person contact type.
"""
# @ApiMember(DataType="string", Description="Any middle names for the contact. Applies to a person contact type.", Name="MiddleName", ParameterType="body")
middle_name: Optional[str] = None
"""
Any middle names for the contact. Applies to a person contact type.
"""
# @ApiMember(DataType="string", Description="The surname for the contact. Applies to a person contact type.", Name="Surname", ParameterType="body")
surname: Optional[str] = None
"""
The surname for the contact. Applies to a person contact type.
"""
# @ApiMember(DataType="string", Description="The full name for the contact.", Name="FullName", ParameterType="body")
full_name: Optional[str] = None
"""
The full name for the contact.
"""
# @ApiMember(DataType="string", Description="A legal name for the contact. Applies to an organisation contact type.", Name="LegalName", ParameterType="body")
legal_name: Optional[str] = None
"""
A legal name for the contact. Applies to an organisation contact type.
"""
# @ApiMember(DataType="string", Description="A trading name for the contact. Applies to an organisation contact type.", Name="TradingName", ParameterType="body")
trading_name: Optional[str] = None
"""
A trading name for the contact. Applies to an organisation contact type.
"""
# @ApiMember(DataType="DateTime?", Description="The birth date for the contact. Applies to a person contact type.", Name="BirthDate", ParameterType="body")
birth_date: Optional[datetime.datetime] = None
"""
The birth date for the contact. Applies to a person contact type.
"""
# @ApiMember(DataType="Guid?", Description="Guid of the marital status within Eros.", Name="MaritalStatusId", ParameterType="body")
marital_status_id: Optional[str] = None
"""
Guid of the marital status within Eros.
"""
# @ApiMember(DataType="string", Description="The contacts marital status if set.", Name="MaritalStatusName", ParameterType="body")
marital_status_name: Optional[str] = None
"""
The contacts marital status if set.
"""
# @ApiMember(DataType="Guid?", Description="Guid of the gender within Eros.", Name="GenderId", ParameterType="body")
gender_id: Optional[str] = None
"""
Guid of the gender within Eros.
"""
# @ApiMember(DataType="string", Description="The contacts gender if set.", Name="GenderName", ParameterType="body")
gender_name: Optional[str] = None
"""
The contacts gender if set.
"""
# @ApiMember(DataType="string", Description="Preferred language of the contact.", Name="Language", ParameterType="body")
language: Optional[str] = None
"""
Preferred language of the contact.
"""
# @ApiMember(DataType="bool", Description="If true, the contact requires an interpreter.", Name="InterpreterRequired", ParameterType="body")
interpreter_required: bool = False
"""
If true, the contact requires an interpreter.
"""
# @ApiMember(DataType="string", Description="Contact Type name of the contact.", Name="ContactTypeName", ParameterType="body")
contact_type_name: Optional[str] = None
"""
Contact Type name of the contact.
"""
# @ApiMember(DataType="Guid", Description="Guid of the Contact Type List Item object within Eros.", Name="ContactTypeId", ParameterType="body")
contact_type_id: Optional[str] = None
"""
Guid of the Contact Type List Item object within Eros.
"""
# @ApiMember(DataType="string", Description="Description of the contact for their external profile.", Name="Description", ParameterType="body")
description: Optional[str] = None
"""
Description of the contact for their external profile.
"""
# @ApiMember(DataType="string", Description="Contact 'Profession/Trade/Industry' details for their external profile.", Name="EmploymentIndustry", ParameterType="body")
employment_industry: Optional[str] = None
"""
Contact 'Profession/Trade/Industry' details for their external profile.
"""
# @ApiMember(DataType="string", Description="Contact 'Working/Subcontracting for' details for their external profile.", Name="EmploymentRole", ParameterType="body")
employment_role: Optional[str] = None
"""
Contact 'Working/Subcontracting for' details for their external profile.
"""
# @ApiMember(DataType="string", Description="Contact 'Work Area/Suburbs' detail for their external profile.", Name="EmploymentGeographicArea", ParameterType="body")
employment_geographic_area: Optional[str] = None
"""
Contact 'Work Area/Suburbs' detail for their external profile.
"""
# @ApiMember(DataType="string", Description="The A.B.N for the contact.", Name="Abn", ParameterType="body")
abn: Optional[str] = None
"""
The A.B.N for the contact.
"""
# @ApiMember(DataType="string", Description="The A.C.N for the contact.", Name="Acn", ParameterType="body")
acn: Optional[str] = None
"""
The A.C.N for the contact.
"""
# @ApiMember(DataType="string", Description="The A.R.B.N for the contact.", Name="Arbn", ParameterType="body")
arbn: Optional[str] = None
"""
The A.R.B.N for the contact.
"""
# @ApiMember(DataType="string", Description="Timezone name that applies to the contact.", Name="TimezoneName", ParameterType="body")
timezone_name: Optional[str] = None
"""
Timezone name that applies to the contact.
"""
# @ApiMember(DataType="List<ConnectedContactDetailModel>", Description="A list of the contact details for the contact.", Name="ContactDetails", ParameterType="body")
contact_details: Optional[List[ConnectedContactDetailModel]] = None
"""
A list of the contact details for the contact.
"""
# @ApiMember(DataType="List<ConnectedContactAddressModel>", Description="A list of the contact addresses for the contact", Name="ContactAddresses", ParameterType="body")
contact_addresses: Optional[List[ConnectedContactAddressModel]] = None
"""
A list of the contact addresses for the contact
"""
# @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", ParameterType="body")
is_contact_connected: bool = False
"""
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.
"""
# @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", ParameterType="body")
connections: Optional[List[ConnectedContactConnectionsModel]] = None
"""
A list of connections this contact has with the licensee. May be active or a pending request to connect.
"""
# @ApiMember(DataType="List<ContactLinkedCustomerProjectsModel>", Description="A list of projects this contact is linked to as a customer.", Name="Projects", ParameterType="body")
projects: Optional[List[ContactLinkedCustomerProjectsModel]] = None
"""
A list of projects this contact is linked to as a customer.
"""
# @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", ParameterType="body")
subscriptions: Optional[List[ConnectedContactSubscriptionsModel]] = None
"""
A list of integration subscriptions used to link this contact to external records in other licensee owned systems.
"""
# @ApiResponse(Description="List of Contacts")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetLicenseeContactListResponse:
# @ApiMember(DataType="List<ConnectedContactModel>", Description="List of contacts.", Name="Contacts", ParameterType="body")
contacts: Optional[List[ConnectedContactModel]] = None
"""
List of contacts.
"""
# @ApiMember(DataType="ResponseStatus", Description="Details of the api response. Success/Fail.", Name="ResponseStatus", ParameterType="body")
response_status: Optional[ResponseStatus] = None
"""
Details of the api response. Success/Fail.
"""
# @Api(Description="Returns a list of contacts a licensee is linked to. Contacts are returned in batches.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetLicenseeContactList:
"""
Returns a list of contacts a licensee is linked to. Contacts are returned in batches.
"""
# @ApiMember(DataType="int", Description="Number of contacts to retrieve per call.", IsRequired=true, Name="BatchSize", ParameterType="body")
batch_size: int = 0
"""
Number of contacts to retrieve per call.
"""
# @ApiMember(DataType="int", Description="Call number (1=1st, 2=2nd) this should progress upwards until all contacts have been retrieved.", IsRequired=true, Name="BatchNumber", ParameterType="body")
batch_number: int = 0
"""
Call number (1=1st, 2=2nd) this should progress upwards until all contacts have been retrieved.
"""
# @ApiMember(DataType="Guid", Description="An optional role that a contact must have in order to be returned. ", Name="ContactRole", ParameterType="body")
contact_role: Optional[str] = None
"""
An optional role that a contact must have in order to be returned.
"""
Python GetLicenseeContactList DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Contacts:
[
{
Salutation: String,
Title: String,
FirstName: String,
MiddleName: String,
Surname: String,
FullName: String,
LegalName: String,
TradingName: String,
BirthDate: 0001-01-01,
MaritalStatusId: 00000000-0000-0000-0000-000000000000,
MaritalStatusName: String,
GenderId: 00000000-0000-0000-0000-000000000000,
GenderName: String,
Language: String,
InterpreterRequired: False,
ContactTypeName: String,
Description: String,
EmploymentIndustry: String,
EmploymentRole: String,
EmploymentGeographicArea: String,
Abn: String,
Acn: String,
Arbn: String,
TimezoneName: String,
ContactDetails:
[
{
Type: String,
ContactDetails: String
}
],
ContactAddresses:
[
{
FullAddress: String,
IsPrimary: False,
IsPostal: False,
IsRegistered: False
}
],
IsContactConnected: False,
Connections:
[
{
Role: String,
Status: String
}
],
Projects:
[
{
Name: String
}
],
Subscriptions:
[
{
Datasource: String,
AlternateKey: String
}
]
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}