| All Verbs | /api/contacts/{ContactId}/links |
|---|
"use strict";
export class UserRoleModel {
/** @param {{ContactRoleId?:string,RoleId?:string,RoleName?:string,RolePrimaryImageURL?:string,RolePrimaryImageThumbnailURL?:string,RolePrimaryImageId?:string,StartDate?:string,EndDate?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The Contact Role Id, that links the Contact to their role. */
ContactRoleId;
/**
* @type {string}
* @description The Role Id. */
RoleId;
/**
* @type {string}
* @description The role name. */
RoleName;
/**
* @type {string}
* @description The URL of the role's image icon. */
RolePrimaryImageURL;
/**
* @type {string}
* @description The URL of the role's thumbnail image icon. */
RolePrimaryImageThumbnailURL;
/**
* @type {string}
* @description The Guid of the role's media file containing the image icon details. */
RolePrimaryImageId;
/**
* @type {string}
* @description The date the contact started having this role. */
StartDate;
/**
* @type {?string}
* @description The date the contact will end having this role. */
EndDate;
}
export class UserContactConnectionModel {
/** @param {{ContactRoleId?:string,ContactRoleName?:string,ContactListItemRoleId?:string,ContactRolePrimaryImageURL?:string,ContactRolePrimaryImageThumbnailURL?:string,ContactRolePrimaryImageId?:string,ConnectionContactId?:string,ConnectionContactName?:string,ConnectionContactRoleName?:string,ConnectionContactRoleId?:string,ConnectionContactListItemRoleId?:string,ContactTypeName?:string,ConnectionContactPhotoURL?:string,IsContactLicenseeRole?:boolean,IsConnectionLicenseeRole?:boolean,ConnectionStatusName?:string,ConnectionStatusId?:string,ConnectionId?:string,ConnectionRequestId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The Contact Role Id, that links the Contact to their role. */
ContactRoleId;
/**
* @type {string}
* @description The role name. */
ContactRoleName;
/**
* @type {string}
* @description The list item role Id. */
ContactListItemRoleId;
/**
* @type {string}
* @description The URL of the contact role's image icon. */
ContactRolePrimaryImageURL;
/**
* @type {string}
* @description The URL of the contact role's thumbnail image icon. */
ContactRolePrimaryImageThumbnailURL;
/**
* @type {string}
* @description The Guid of the contact role's media file containing the image icon details. */
ContactRolePrimaryImageId;
/**
* @type {string}
* @description The connected contacts Id. (licensee) */
ConnectionContactId;
/**
* @type {string}
* @description The connected contacts Full Name. */
ConnectionContactName;
/**
* @type {string}
* @description The connected contacts role. */
ConnectionContactRoleName;
/**
* @type {string}
* @description The connected contacts role Id. */
ConnectionContactRoleId;
/**
* @type {string}
* @description The connected contacts list item role Id. */
ConnectionContactListItemRoleId;
/**
* @type {string}
* @description The Contacts Type. */
ContactTypeName;
/**
* @type {string}
* @description The URL to the Connected Contacts Photo. */
ConnectionContactPhotoURL;
/**
* @type {boolean}
* @description . */
IsContactLicenseeRole;
/**
* @type {boolean}
* @description If the connection is as a licensee this is true. */
IsConnectionLicenseeRole;
/**
* @type {string}
* @description The status of the connection with the contact. */
ConnectionStatusName;
/**
* @type {string}
* @description The status Id of the connection with the contact. */
ConnectionStatusId;
/**
* @type {string}
* @description The ContactRoleConnectionId of an active connection with the contact. */
ConnectionId;
/**
* @type {string}
* @description The ContactRoleConnectionRequest of a pending connection with the contact. */
ConnectionRequestId;
}
export class ContactEmailAddress {
/** @param {{ContactId?:string,ContactName?:string,EmailAddress?:string,ContactPhotoURL?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The Contact Id of the contact. */
ContactId;
/**
* @type {string}
* @description The Contact Full Name */
ContactName;
/**
* @type {string}
* @description The Contact Email Address. */
EmailAddress;
/**
* @type {string}
* @description The Contact Photo URL */
ContactPhotoURL;
}
export class ContactConnectedLinksResponse {
/** @param {{Roles?:UserRoleModel[],ContactConnections?:UserContactConnectionModel[],EmailAddressBook?:ContactEmailAddress[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {UserRoleModel[]}
* @description A list of roles assigned to the contact/user. */
Roles;
/**
* @type {UserContactConnectionModel[]}
* @description A list of contact connections assigned to the contact/user. */
ContactConnections;
/**
* @type {ContactEmailAddress[]}
* @description A list of connected contacts and their email addresses. */
EmailAddressBook;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class ContactConnectedLinks {
/** @param {{ContactId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ContactId;
}
JavaScript ContactConnectedLinks 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.
POST /api/contacts/{ContactId}/links HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ContactConnectedLinks xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<ContactId>00000000-0000-0000-0000-000000000000</ContactId>
</ContactConnectedLinks>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ContactConnectedLinksResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<ContactConnections>
<UserContactConnectionModel>
<ConnectionContactId>00000000-0000-0000-0000-000000000000</ConnectionContactId>
<ConnectionContactListItemRoleId>00000000-0000-0000-0000-000000000000</ConnectionContactListItemRoleId>
<ConnectionContactName>String</ConnectionContactName>
<ConnectionContactPhotoURL>String</ConnectionContactPhotoURL>
<ConnectionContactRoleId>00000000-0000-0000-0000-000000000000</ConnectionContactRoleId>
<ConnectionContactRoleName>String</ConnectionContactRoleName>
<ConnectionId>00000000-0000-0000-0000-000000000000</ConnectionId>
<ConnectionRequestId>00000000-0000-0000-0000-000000000000</ConnectionRequestId>
<ConnectionStatusId>00000000-0000-0000-0000-000000000000</ConnectionStatusId>
<ConnectionStatusName>String</ConnectionStatusName>
<ContactListItemRoleId>00000000-0000-0000-0000-000000000000</ContactListItemRoleId>
<ContactRoleId>00000000-0000-0000-0000-000000000000</ContactRoleId>
<ContactRoleName>String</ContactRoleName>
<ContactRolePrimaryImageId>00000000-0000-0000-0000-000000000000</ContactRolePrimaryImageId>
<ContactRolePrimaryImageThumbnailURL>String</ContactRolePrimaryImageThumbnailURL>
<ContactRolePrimaryImageURL>String</ContactRolePrimaryImageURL>
<ContactTypeName>String</ContactTypeName>
<IsConnectionLicenseeRole>false</IsConnectionLicenseeRole>
<IsContactLicenseeRole>false</IsContactLicenseeRole>
</UserContactConnectionModel>
</ContactConnections>
<EmailAddressBook>
<ContactEmailAddress>
<ContactId>00000000-0000-0000-0000-000000000000</ContactId>
<ContactName>String</ContactName>
<ContactPhotoURL>String</ContactPhotoURL>
<EmailAddress>String</EmailAddress>
</ContactEmailAddress>
</EmailAddressBook>
<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>
<Roles>
<UserRoleModel>
<ContactRoleId>00000000-0000-0000-0000-000000000000</ContactRoleId>
<EndDate>0001-01-01T00:00:00</EndDate>
<RoleId>00000000-0000-0000-0000-000000000000</RoleId>
<RoleName>String</RoleName>
<RolePrimaryImageId>00000000-0000-0000-0000-000000000000</RolePrimaryImageId>
<RolePrimaryImageThumbnailURL>String</RolePrimaryImageThumbnailURL>
<RolePrimaryImageURL>String</RolePrimaryImageURL>
<StartDate>0001-01-01T00:00:00</StartDate>
</UserRoleModel>
</Roles>
</ContactConnectedLinksResponse>