• Venue and event management in the cloud

How Can We Help?


Contacts

In this article


REST API CONTACTS

POST /v1/crm/contacts

Creates or updates a contact.

If no ‘externalIntegrationId‘ is present, the contact’s first name, last name and email address (case insensitive) are used to match a contact to an existing contact in Priava.

A new contact will be created only if one cannot be matched.

When a user provides an organisation:

  1. If the organisation exists, it is associated to the existing organisation and no changes are made to the organisation properties.
  2. If the organisation does not exist, the organisation will be created with the contact’s telephone numbers and email address. The contact will also be associated to this newly created organisation.

Request:
A JSON POST request body expecting APIToken in the request header which re-authenticates the user with each request.


Parameter
firstName    string
REQUIRED

The contact’s first name.

lastName    string
REQUIRED

The contact’s last name.

email    string
REQUIRED

The contact’s primary email address.

title    string

The contact’s title. Must match list of Title’s in the tenant’s Priava system. e.g. Mr, Mrs etc.

jobTitle    string

The contact’s Job Title.

department    string

The contact’s department e.g. Accounts.

debtorNumber    string

The contact’s debtor number.

externalIntegrationId    string

The contact’s external integration ID. Hidden from the Priava UI, but can be used to store a foreign integration key. 

integrationSrc    string

The source of the integration e.g. name of your application. 

externalReferenceNo    number

The contact’s external reference number – used as a foreign key that is visibile on the Priava UI. 

marketingOptOut    boolean

True / False – whether the contact should be opted out from marketing emails. 

phoneNumber    string
REQUIRED*

The contact’s phone number.

mobile    string
REQUIRED*

The contact’s mobile number. 

organisation    string

The contact’s Organisation / Company name. 

organisationType    string

The organisation type – must match the CRM organisation types in the Priava tenant’s system. Will only be used if the organisation does not exist and is being created. 

organisationMarketSector    string

The organisation market sector – must match the CRM organisation market sectors in the Priava tenant’s system. Will only be used if the organisation does not exist and is being created. 

organisationAddress    string

The contact’s organisation/site address. See below for address properties required. 

postalAddress    string

The contact’s postal address. See below for address properties required.

otherAddress    string

Any other address to be stored for the contact. See below for address properties required.

inactive    boolean

True / False – whether the contact is inactive or active in the system.  

*Either a phone or mobile number is required (not both) in order to create a contact.

All addresses should be formatted as below.  

Parameter
addressLine1    string

Line 1 of the address.

addressLine2    string

Line 2 of the address. 

addressLine3    string

Line 3 of the address. 

suburb    string

The suburb for the address. 

state    string

The state for the address. 

postcode   string

The postcode / zip for the address. 

country    string

The country for the address. A list of valid country entries can be found here.  

 

{   
"firstName": "John", "lastName": "Smith", "email": "john.smith@acme.com", "phoneNumber": "+44123456789", "mobile": "+44123456789", "title": "Mr", "jobTitle": "Manager", "department": "Support", "inactive": false, "marketingOptOut": false, "externalIntegrationId": "johnsmith1", "integrationSrc": "PRIAVA", "externalReferenceNo": 0, "debtorNumber": "JS123", "organisation": "ACME", "organisationType": "Corporate", "organisationMarketSector": "Information Technology", "organisationAddress": { "addressLine1": "ACME - Building 1", "addressLine2": "11 Main Street", "suburb": "Portsmouth", "state": "Hampshire", "postcode": "PO64AU", "country": "United Kingdom" }, "postalAddress": { "addressLine1": "Valencia Apartments", "addressLine2": "49 Feather Street", "addressLine3": "PO Box 90, Harbour", "suburb": "Portsmouth", "state": "Hampshire", "postcode": "PO64AU", "country": "United Kingdom" }, "otherAddress": { "addressLine1": "Valencia Apartments", "addressLine2": "49 Feather Street", "addressLine3": "PO Box 90, Harbour", "suburb": "Portsmouth", "state": "Hampshire", "postcode": "PO63AU", "country": "United Kingdom" } }

Response:
{  
“result”: “true”,
“success”: true
}