Platform API

<back to all web services

GetProjectContacts

Returns a projects contacts (customer and project connected).

Requires Authentication
The following routes are available for this service:
All Verbs/api/project/{ProjectId}/contacts
"use strict";
export class ContactRole {
    /** @param {{RoleId?:string,AlternateKey?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Guid of the Role List Item object within PSTPF. */
    RoleId;
    /**
     * @type {string}
     * @description The unique key that represents the role type on the external system. */
    AlternateKey;
}
export class LocationCoordinatesModel {
    /** @param {{Latitude?:number,Longitude?:number,Altitude?:number,Accuracy?:number,AltitudeAccuracy?:number,Heading?:number,Speed?:number,VerticalSpeed?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface. */
    Latitude;
    /**
     * @type {number}
     * @description The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface. */
    Longitude;
    /**
     * @type {?number}
     * @description The altitude of an address - the altitude above sea level." */
    Altitude;
    /**
     * @type {?number}
     * @description Accuracy of the latitude and longitude. */
    Accuracy;
    /**
     * @type {?number}
     * @description Accurancy of the Altitude. */
    AltitudeAccuracy;
    /**
     * @type {?number}
     * @description Direction you are heading. */
    Heading;
    /**
     * @type {?number}
     * @description Speed you are going. */
    Speed;
    /**
     * @type {?number}
     * @description Speed your altitude is ascending/descending at. */
    VerticalSpeed;
}
export class AddressModel {
    /** @param {{DistanceAway?:number,Latitude?:number,Longitude?:number,AddressFormatId?:string,SuburbId?:string,SuburbName?:string,StateShortName?:string,PostCode?:string,CountryId?:string,CountryName?:string,ISOCountryCode?:string,LotNumber?:string,SubUnit?:string,BuildingNumber?:string,StreetNumber?:string,StreetName?:string,AddressLineOne?:string,AddressLineTwo?:string,AddressFull?:string,IsPhysical?:boolean,Notes?:string,AutoMapCoordinates?:boolean,LocationCoordinates?:LocationCoordinatesModel}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The distance between this project and another specified set of gps coordinates. */
    DistanceAway;
    /**
     * @type {number}
     * @description The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface. */
    Latitude;
    /**
     * @type {number}
     * @description The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface. */
    Longitude;
    /**
     * @type {string}
     * @description Address Format Id Guid - this will be determined by the service. */
    AddressFormatId;
    /**
     * @type {string}
     * @description Suburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered. */
    SuburbId;
    /**
     * @type {string}
     * @description The suburb name. */
    SuburbName;
    /**
     * @type {string}
     * @description The shortened State Name e.g Vic for Victoria. */
    StateShortName;
    /**
     * @type {string}
     * @description The suburb postcode. */
    PostCode;
    /**
     * @type {string}
     * @description Country Id Guid - this will be determined by the CountrName or ISOCountryCode entered. */
    CountryId;
    /**
     * @type {string}
     * @description the name of the country the address is within. */
    CountryName;
    /**
     * @type {string}
     * @description ISO Country Code. */
    ISOCountryCode;
    /**
     * @type {string}
     * @description The address Lot number. */
    LotNumber;
    /**
     * @type {string}
     * @description The address Sub Unit number. */
    SubUnit;
    /**
     * @type {string}
     * @description The address building number. */
    BuildingNumber;
    /**
     * @type {string}
     * @description The address street number. */
    StreetNumber;
    /**
     * @type {string}
     * @description The address street name including street type. */
    StreetName;
    /**
     * @type {string}
     * @description A formatted address Line 1. */
    AddressLineOne;
    /**
     * @type {string}
     * @description A formatted address Line 2. */
    AddressLineTwo;
    /**
     * @type {string}
     * @description The full address string. */
    AddressFull;
    /**
     * @type {?boolean}
     * @description True if the address is a physical location. */
    IsPhysical;
    /**
     * @type {string}
     * @description Notes about the address. */
    Notes;
    /**
     * @type {?boolean}
     * @description If true, the address is eligible for having its coordinates calculated/updated. */
    AutoMapCoordinates;
    /**
     * @type {LocationCoordinatesModel}
     * @description Location Coordinates for the address. */
    LocationCoordinates;
}
export class ContactAddressModel {
    /** @param {{Address?:AddressModel,IsPostal?:boolean,IsPrimaryLocation?:boolean,IsRegisteredLocation?:boolean,SuburbName?:string,StateName?:string,CountryName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {AddressModel}
     * @description Address Details */
    Address;
    /**
     * @type {boolean}
     * @description True if this is a postal address. */
    IsPostal;
    /**
     * @type {boolean}
     * @description True if this is the primary address. */
    IsPrimaryLocation;
    /**
     * @type {boolean}
     * @description True if this address is the registered tax address. */
    IsRegisteredLocation;
    /**
     * @type {string}
     * @description Suburb Name */
    SuburbName;
    /**
     * @type {string}
     * @description State Name */
    StateName;
    /**
     * @type {string}
     * @description Country Name */
    CountryName;
}
export class PhoneModel {
    /** @param {{CountryCode?:string,AreaCode?:string,LocalNumber?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Country Code */
    CountryCode;
    /**
     * @type {string}
     * @description Area Code */
    AreaCode;
    /**
     * @type {string}
     * @description Local Number */
    LocalNumber;
}
export class ContactDetailModel {
    /** @param {{ContactMethodId?:string,ContactMethodName?:string,ContactAddress?:ContactAddressModel,ContactPhone?:PhoneModel,CountryId?:string,ContactDetails?:string,Notes?:string,ContactDetailsCode?:string,OrderContactMethod?:number,IsPrimaryContactMethod?:boolean,IsAddress?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Id of the Contact Method */
    ContactMethodId;
    /**
     * @type {string}
     * @description Contact Method Name */
    ContactMethodName;
    /**
     * @type {ContactAddressModel}
     * @description If the contact method is an address, this will contain the address details. */
    ContactAddress;
    /**
     * @type {PhoneModel}
     * @description If the contact method is a phone, this will contain the phone details */
    ContactPhone;
    /**
     * @type {?string}
     * @description Id of the country */
    CountryId;
    /**
     * @type {string}
     * @description A summary string representing the contact details */
    ContactDetails;
    /**
     * @type {string}
     * @description Notes about the contact details */
    Notes;
    /**
     * @type {string}
     * @description Area Code if contact details are a phone number */
    ContactDetailsCode;
    /**
     * @type {number}
     * @description Order number of the contact method */
    OrderContactMethod;
    /**
     * @type {boolean}
     * @description True if this is the primary contact method */
    IsPrimaryContactMethod;
    /**
     * @type {boolean}
     * @description True if this contact method is an address */
    IsAddress;
}
export class SubscriptionContactModel {
    /** @param {{ContactId?:string,ContactType?:string,MaritalStatus?:string,Gender?:string,FirstName?:string,MiddleName?:string,Surname?:string,FullName?:string,ShortName?:string,BirthDate?:string,Title?:string,Salutation?:string,Abn?:string,Acn?:string,Arbn?:string,TradingName?:string,LegalName?:string,Notes?:string,EmploymentIndustry?:string,EmploymentRole?:string,EmploymentGeographicArea?:string,DriversLicence?:string,GstRegistered?:boolean,RecordStatus?:string,ContactRoles?:ContactRole[],ContactDetails?:ContactDetailModel[],CustomContentXML?:string,BlobImageURLPrimary?:string,BlobImageURLPrimaryThumbnail?:string,PrimaryMobile?:string,PrimaryEmail?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Guid of the contact object within PSTPF. */
    ContactId;
    /**
     * @type {string}
     * @description Guid of the Contact Type List Item object within PSTPF. */
    ContactType;
    /**
     * @type {?string}
     * @description Guid of the Marital Status List Item object within PSTPF. */
    MaritalStatus;
    /**
     * @type {?string}
     * @description Guid of the Gender List Item object within PSTPF. */
    Gender;
    /**
     * @type {string}
     * @description The first given name for the contact.  Applies to a person contact type. */
    FirstName;
    /**
     * @type {string}
     * @description The middle name(s) for the contact.  Applies to a person contact type. */
    MiddleName;
    /**
     * @type {string}
     * @description The surname for the contact.  Applies to a person contact type. */
    Surname;
    /**
     * @type {string}
     * @description The full name for the contact. */
    FullName;
    /**
     * @type {string}
     * @description A short name for the contact. */
    ShortName;
    /**
     * @type {?string}
     * @description The birth date for the contact.  Applies to a person contact type. */
    BirthDate;
    /**
     * @type {string}
     * @description The title for the contact.  Applies to a person contact type. */
    Title;
    /**
     * @type {string}
     * @description A salutation for the contact. */
    Salutation;
    /**
     * @type {string}
     * @description The A.B.N for the contact. */
    Abn;
    /**
     * @type {string}
     * @description The A.C.N for the contact. */
    Acn;
    /**
     * @type {string}
     * @description The A.R.B.N for the contact. */
    Arbn;
    /**
     * @type {string}
     * @description A trading name for the contact. */
    TradingName;
    /**
     * @type {string}
     * @description A legal name for the contact. */
    LegalName;
    /**
     * @type {string}
     * @description Any notes/description for the contact. */
    Notes;
    /**
     * @type {string}
     * @description Contact Employment Industry. */
    EmploymentIndustry;
    /**
     * @type {string}
     * @description Contact Employment Role. */
    EmploymentRole;
    /**
     * @type {string}
     * @description Contact Employment Geographic Area. */
    EmploymentGeographicArea;
    /**
     * @type {string}
     * @description The Contacts Drivers Licence Number */
    DriversLicence;
    /**
     * @type {boolean}
     * @description Indicates if the Contact is registered for GST */
    GstRegistered;
    /**
     * @type {string}
     * @description The status of the contact in PSTPF */
    RecordStatus;
    /**
     * @type {ContactRole[]}
     * @description A list of roles this contact has. */
    ContactRoles;
    /**
     * @type {ContactDetailModel[]}
     * @description A list of the contact details for the contact. */
    ContactDetails;
    /**
     * @type {string}
     * @description Custom Content XML for the contact. */
    CustomContentXML;
    /**
     * @type {string}
     * @description URL to the Primary Image. */
    BlobImageURLPrimary;
    /**
     * @type {string}
     * @description URL to the Primary Image thumbnail. */
    BlobImageURLPrimaryThumbnail;
    /**
     * @type {string}
     * @description The primary mobile for the contact. */
    PrimaryMobile;
    /**
     * @type {string}
     * @description The primary email for the contact. */
    PrimaryEmail;
}
export class ProjectContact {
    /** @param {{ContactId?:string,ContactAlternateKey?:string,RoleId?:string,RoleName?:string,RoleAlternateKey?:string,Contact?:SubscriptionContactModel,Index?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Guid of the contact object within Eros. */
    ContactId;
    /**
     * @type {string}
     * @description The unique key that represents the contact on the external system. */
    ContactAlternateKey;
    /**
     * @type {string}
     * @description Guid of the Role List Item object within Eros. */
    RoleId;
    /**
     * @type {string}
     * @description Role Name. */
    RoleName;
    /**
     * @type {string}
     * @description The unique key that represents the role type on the external system. Note: Use of this is not currently implemented */
    RoleAlternateKey;
    /**
     * @type {SubscriptionContactModel}
     * @description The object that contains details of the contact */
    Contact;
    /**
     * @type {number}
     * @description The order this contact is in priority.  1 would be the primary contact, 2 the secondary and so forth. */
    Index;
}
export class ProjectContactModel {
    /** @param {{ProjectContacts?:ProjectContact[],CustomerContacts?:ProjectContact[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {ProjectContact[]}
     * @description Object containing all details of the project to be inserted or updated. */
    ProjectContacts;
    /**
     * @type {ProjectContact[]}
     * @description Object containing all details of the project to be inserted or updated. */
    CustomerContacts;
}
export class GetProjectContacts {
    /** @param {{ProjectId?:string,CustomerGroupId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Guid representing the object that is the project in Eros. */
    ProjectId;
    /**
     * @type {string}
     * @description Guid representing the projects contact customer group Id. */
    CustomerGroupId;
}

JavaScript GetProjectContacts DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/project/{ProjectId}/contacts HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ProjectContacts: 
	[
		{
			ContactAlternateKey: String,
			RoleName: String,
			RoleAlternateKey: String,
			Contact: 
			{
				MaritalStatus: 00000000000000000000000000000000,
				Gender: 00000000000000000000000000000000,
				FirstName: String,
				MiddleName: String,
				Surname: String,
				FullName: String,
				ShortName: String,
				BirthDate: 0001-01-01,
				Title: String,
				Salutation: String,
				Abn: String,
				Acn: String,
				Arbn: String,
				TradingName: String,
				LegalName: String,
				Notes: String,
				EmploymentIndustry: String,
				EmploymentRole: String,
				EmploymentGeographicArea: String,
				DriversLicence: String,
				GstRegistered: False,
				RecordStatus: String,
				ContactRoles: 
				[
					{
						AlternateKey: String
					}
				],
				ContactDetails: 
				[
					{
						ContactMethodName: String,
						ContactAddress: 
						{
							Address: 
							{
								DistanceAway: 0,
								Latitude: 0,
								Longitude: 0,
								SuburbName: String,
								StateShortName: String,
								PostCode: String,
								CountryName: String,
								ISOCountryCode: String,
								LotNumber: String,
								SubUnit: String,
								BuildingNumber: String,
								StreetNumber: String,
								StreetName: String,
								AddressLineOne: String,
								AddressLineTwo: String,
								AddressFull: String,
								IsPhysical: False,
								Notes: String,
								AutoMapCoordinates: False,
								LocationCoordinates: 
								{
									Latitude: 0,
									Longitude: 0,
									Altitude: 0,
									Accuracy: 0,
									AltitudeAccuracy: 0,
									Heading: 0,
									Speed: 0,
									VerticalSpeed: 0
								}
							},
							IsPostal: False,
							IsPrimaryLocation: False,
							IsRegisteredLocation: False,
							SuburbName: String,
							StateName: String,
							CountryName: String
						},
						ContactPhone: 
						{
							CountryCode: String,
							AreaCode: String,
							LocalNumber: String
						},
						CountryId: 00000000000000000000000000000000,
						ContactDetails: String,
						Notes: String,
						ContactDetailsCode: String,
						OrderContactMethod: 0,
						IsPrimaryContactMethod: False,
						IsAddress: True
					}
				],
				CustomContentXML: String,
				BlobImageURLPrimary: String,
				BlobImageURLPrimaryThumbnail: String,
				PrimaryMobile: String,
				PrimaryEmail: String
			},
			Index: 0
		}
	],
	CustomerContacts: 
	[
		{
			ContactAlternateKey: String,
			RoleName: String,
			RoleAlternateKey: String,
			Contact: 
			{
				MaritalStatus: 00000000000000000000000000000000,
				Gender: 00000000000000000000000000000000,
				FirstName: String,
				MiddleName: String,
				Surname: String,
				FullName: String,
				ShortName: String,
				BirthDate: 0001-01-01,
				Title: String,
				Salutation: String,
				Abn: String,
				Acn: String,
				Arbn: String,
				TradingName: String,
				LegalName: String,
				Notes: String,
				EmploymentIndustry: String,
				EmploymentRole: String,
				EmploymentGeographicArea: String,
				DriversLicence: String,
				GstRegistered: False,
				RecordStatus: String,
				ContactRoles: 
				[
					{
						AlternateKey: String
					}
				],
				ContactDetails: 
				[
					{
						ContactMethodName: String,
						ContactAddress: 
						{
							Address: 
							{
								DistanceAway: 0,
								Latitude: 0,
								Longitude: 0,
								SuburbName: String,
								StateShortName: String,
								PostCode: String,
								CountryName: String,
								ISOCountryCode: String,
								LotNumber: String,
								SubUnit: String,
								BuildingNumber: String,
								StreetNumber: String,
								StreetName: String,
								AddressLineOne: String,
								AddressLineTwo: String,
								AddressFull: String,
								IsPhysical: False,
								Notes: String,
								AutoMapCoordinates: False,
								LocationCoordinates: 
								{
									Latitude: 0,
									Longitude: 0,
									Altitude: 0,
									Accuracy: 0,
									AltitudeAccuracy: 0,
									Heading: 0,
									Speed: 0,
									VerticalSpeed: 0
								}
							},
							IsPostal: False,
							IsPrimaryLocation: False,
							IsRegisteredLocation: False,
							SuburbName: String,
							StateName: String,
							CountryName: String
						},
						ContactPhone: 
						{
							CountryCode: String,
							AreaCode: String,
							LocalNumber: String
						},
						CountryId: 00000000000000000000000000000000,
						ContactDetails: String,
						Notes: String,
						ContactDetailsCode: String,
						OrderContactMethod: 0,
						IsPrimaryContactMethod: False,
						IsAddress: True
					}
				],
				CustomContentXML: String,
				BlobImageURLPrimary: String,
				BlobImageURLPrimaryThumbnail: String,
				PrimaryMobile: String,
				PrimaryEmail: String
			},
			Index: 0
		}
	]
}