Contacts: Create or Update

  • Updated

Create or Update

 

 


POST /v2/contact/save

This API allows you to create or update a contact within your Priava account.


Parameter
ContactId     Long

The ID for the contact. Required only if updating a contact. 

Firstname    string

The contact’s first name.

Lastname    string

The contact’s last name.

Email    string
The contact’s primary email address.
Note:  If ContactId is not provided and contact already exists with combination of "Firstname, Lastname, Email & Organisation" then the contact will be updated with the given details.
EmailOther    string

Any other email for the contact.

Phone    string

The contact’s phone number.

Mobile    string

The contact’s mobile number.

PrimaryPhone    string
Specifies the primary phone number of the contact. The only accepted values are:
  • P for the Phone number.
  • M for the Mobile/Cellular number.
The primary phone by default is Phone.
Inactive    Boolean
True to create inactive contact. False to create active contact.
If not provided, the default value for Inactive will be false.
JobTitle    string

The contact's job title.

Department    string

The contact’s department.

DebtorNumber    string

The contact’s debtor number.

Organisation    string

The name of the organisation the contact should be associated to. The organisation must exist in your Priava Account.

PersonalInformationConsent   string

True  if contact gives consent to retain personal information,  False otherwise.

CustomFields   object

An object of CustomFields with it's key and value.

Address    Object Array
An array of addresses (up to 3) for this contact. Passed in JSON format where:
  • AddressType = either POSTAL, BUSINESS or OTHER.
  • AddressLine1 = Line 1 of the address.
  • AddressLine2 = Line 2 of the address.
  • AddressLine3 = Line 3 of the address.
  • Suburb = The suburb for the address.
  • State = The State or County.
  • Postcode = The postal or zip code.
  • Country = The country of the address.
  • IsPrimary = To indicate whether this address is primary or not.
{
"ContactId": "100320033",
"Firstname": "Dan",
"Lastname": "Cole",
"Email": "daniel.cole@priava.com",
"EmailOther": "dan.cole@priava.com",
"Phone": "456",
"Mobile": "0229866666",
"PrimaryPhone": "P",
"Inactive": false,
"JobTitle": "Manager",
"Department" : "IT",
"DebtorNumber" : 123,
"Organisation": "Acme International",
"PersonalInformationConsent" : true,
"CustomFields":{"RegistrationNumber":"G-12723"},
"Address": [{
"AddressType": "BUSINESS",
"AddressLine1": "BUSINESS Address 1",
"AddressLine2": "BUSINESS Address 2",
"AddressLine3": "BUSINESS Address 3",
"Suburb": "Australian Capital",
"State": "Queensland",
"Postcode": "112098",
"Country": "Australia",
"IsPrimary":false
},
{
"AddressType": "POSTAL",
"AddressLine1": "POSTAL Address 1",
"AddressLine2": "POSTAL Address 2",
"AddressLine3": "POSTAL Address 3",
"Suburb": "Australian Capital",
"State": "Queensland",
"Postcode": "112098",
"Country": "Australia",
"IsPrimary":false
},
{
"AddressType": "OTHER",
"AddressLine1": "OTHER Address 1",
"AddressLine2": "OTHER Address 2",
"AddressLine3": "OTHER Address 3",
"Suburb": "Australian Capital",
"State": "Queensland",
"Postcode": "112098",
"Country": "Australia",
"IsPrimary":true
}]
}

Response:
{
"success": true,
"result": {
"ContactId": 100320033
}
}

Was this article helpful?

Have more questions? Submit a request