Platform Subscription API

<back to all web services

SaveContact

Inserts or Updates a contact and its details and roles.

Requires Authentication
SaveContact Parameters:
NameParameterData TypeRequiredDescription
SuiteDataSourceInstanceIdbodyGuidYesGuid representing the external systems datasource information.
AlternateKeybodystringYesThe unique key that represents the contact on the external system.
ObjectIdbodyGuidNoGuid of the contact object within PSTPF. If ObjectId is known, the external system may pass this instead of the alternate key.
IgnoreHashbodyboolNoIf set to true, the object will be updated/refreshed. If false, the hash representation of the Contact model and its data will be compared with the current Contact to determine if there are any changes to save.
MarkAsDeletedbodyboolNoSet this to be true if the contact is to be deleted
ContactbodySubscriptionContactModelYesObject containing all details of the contact to be inserted or updated.
LicenseeIdqueryGuidNo
SessionIdqueryGuidNo
ValidationErrorList Parameters:
NameParameterData TypeRequiredDescription
ValidationErrorsbodyList<RuleValidationResult>NoList of any validation/errors occuring during a method call
RuleValidationResult Parameters:
NameParameterData TypeRequiredDescription
MessagebodyGuidNoValidation/Error message details
KeybodyGuidNoSummary/label of validation/error
ErrorCodebodyGuidNoKey/code representing validation/error
SubscriptionContactModel Parameters:
NameParameterData TypeRequiredDescription
ContactIdbodyGuidNoGuid of the contact object within PSTPF.
ContactTypebodyGuidNoGuid of the Contact Type List Item object within PSTPF.
MaritalStatusbodyGuid?NoGuid of the Marital Status List Item object within PSTPF.
GenderbodyGuid?NoGuid of the Gender List Item object within PSTPF.
FirstNamebodystringNoThe first given name for the contact. Applies to a person contact type.
MiddleNamebodystringNoThe middle name(s) for the contact. Applies to a person contact type.
SurnamebodystringNoThe surname for the contact. Applies to a person contact type.
FullNamebodystringNoThe full name for the contact.
ShortNamebodystringNoA short name for the contact.
BirthDatebodyDateTime?NoThe birth date for the contact. Applies to a person contact type.
TitlebodystringNoThe title for the contact. Applies to a person contact type.
SalutationbodystringNoA salutation for the contact.
AbnbodystringNoThe A.B.N for the contact.
AcnbodystringNoThe A.C.N for the contact.
ArbnbodystringNoThe A.R.B.N for the contact.
TradingNamebodystringNoA trading name for the contact.
LegalNamebodystringNoA legal name for the contact.
NotesbodystringNoAny notes/description for the contact.
EmploymentIndustrybodystringNoContact Employment Industry.
EmploymentRolebodystringNoContact Employment Role.
EmploymentGeographicAreabodystringNoContact Employment Geographic Area.
DriversLicencebodystringNoThe Contacts Drivers Licence Number
GstRegisteredbodyboolNoIndicates if the Contact is registered for GST
RecordStatusbodystringNoThe status of the contact in PSTPF
ContactRolesbodyList<ContactRole>NoA list of roles this contact has.
ContactDetailsbodyList<ContactDetailModel>NoA list of the contact details for the contact.
CustomContentXMLbodystringNoCustom Content XML for the contact.
BlobImageURLPrimarybodystringNoURL to the Primary Image.
BlobImageURLPrimaryThumbnailbodystringNoURL to the Primary Image thumbnail.
PrimaryMobilebodystringNoThe primary mobile for the contact.
PrimaryEmailbodystringNoThe primary email for the contact.
ContactRole Parameters:
NameParameterData TypeRequiredDescription
RoleIdbodyGuidNoGuid of the Role List Item object within PSTPF.
AlternateKeybodystringNoThe unique key that represents the role type on the external system.
ContactDetailModel Parameters:
NameParameterData TypeRequiredDescription
ContactMethodIdbodyGuidNoId of the Contact Method
ContactMethodNamebodystringNoContact Method Name
ContactAddressbodyContactAddressModelNoIf the contact method is an address, this will contain the address details.
ContactPhonebodyPhoneModelNoIf the contact method is a phone, this will contain the phone details
CountryIdbodyGuid?NoId of the country
ContactDetailsbodystringNoA summary string representing the contact details
NotesbodystringNoNotes about the contact details
ContactDetailsCodebodystringNoArea Code if contact details are a phone number
OrderContactMethodbodyintNoOrder number of the contact method
IsPrimaryContactMethodbodyboolNoTrue if this is the primary contact method
IsAddressbodyboolNoTrue if this contact method is an address
ContactAddressModel Parameters:
NameParameterData TypeRequiredDescription
AddressbodyAddressModelNoAddress Details
IsPostalbodyboolNoTrue if this is a postal address.
IsPrimaryLocationbodyboolNoTrue if this is the primary address.
IsRegisteredLocationbodyboolNoTrue if this address is the registered tax address.
SuburbNamebodystringNoSuburb Name
StateNamebodystringNoState Name
CountryNamebodystringNoCountry Name
AddressModel Parameters:
NameParameterData TypeRequiredDescription
DistanceAwaybodydoubleNoThe distance between this project and another specified set of gps coordinates.
LatitudebodyDouble?NoThe latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.
LongitudebodyDouble?NoThe longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.
AddressFormatIdbodyGuidNoAddress Format Id Guid - this will be determined by the service.
SuburbIdbodyGuidNoSuburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered.
SuburbNamebodystringNoThe suburb name.
StateShortNamebodystringNoThe shortened State Name e.g Vic for Victoria.
PostCodebodystringNoThe suburb postcode.
CountryIdbodyGuidNoCountry Id Guid - this will be determined by the CountrName or ISOCountryCode entered.
CountryNamebodystringNothe name of the country the address is within.
ISOCountryCodequerystringNoISO Country Code.
LotNumberbodystringNoThe address Lot number.
SubUnitbodystringNoThe address Sub Unit number.
BuildingNumberbodystringNoThe address building number.
StreetNumberbodystringNoThe address street number.
StreetNamebodystringNoThe address street name including street type.
AddressLineOnebodystringNoA formatted address Line 1.
AddressLineTwobodystringNoA formatted address Line 2.
AddressFullbodystringNoThe full address string.
IsPhysicalbodybool?NoTrue if the address is a physical location.
NotesformstringNoNotes about the address.
AutoMapCoordinatesbodybool?NoIf true, the address is eligible for having its coordinates calculated/updated.
LocationCoordinatesbodyLocationCoordinatesNoLocation Coordinates for the address.
LocationCoordinatesModel Parameters:
NameParameterData TypeRequiredDescription
LatitudequerydoubleNoThe latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.
LongitudequerydoubleNoThe longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.
Altitudequerydouble?NoThe altitude of an address - the altitude above sea level."
Accuracyquerydouble?NoAccuracy of the latitude and longitude.
AltitudeAccuracyquerydouble?NoAccurancy of the Altitude.
Headingquerydouble?NoDirection you are heading.
Speedquerydouble?NoSpeed you are going.
VerticalSpeedquerydouble?NoSpeed your altitude is ascending/descending at.
PhoneModel Parameters:
NameParameterData TypeRequiredDescription
CountryCodebodystringNoCountry Code
AreaCodebodystringNoArea Code
LocalNumberbodystringNoLocal Number

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

HTTP + CSV

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

POST /csv/reply/SaveContact HTTP/1.1 
Host: production-eros-platform-apisubscription.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"AlternateKey":"String","IgnoreHash":false,"MarkAsDeleted":false,"Contact":{"MaritalStatus":"00000000-0000-0000-0000-000000000000","Gender":"00000000-0000-0000-0000-000000000000","FirstName":"String","MiddleName":"String","Surname":"String","FullName":"String","ShortName":"String","BirthDate":"0001-01-01T00:00:00.0000000","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":"00000000-0000-0000-0000-000000000000","ContactDetails":"String","Notes":"String","ContactDetailsCode":"String","OrderContactMethod":0,"IsPrimaryContactMethod":false,"IsAddress":true}],"CustomContentXML":"String","BlobImageURLPrimary":"String","BlobImageURLPrimaryThumbnail":"String","PrimaryMobile":"String","PrimaryEmail":"String"},"ValidationErrors":[{"Message":"String","Key":"String","ErrorCode":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}