Contacts API v1

A Contact represents information for customers, users, suppliers and your business contact information. 

In fact, there are various types of Contacts in Evance:

  • Registered users
    Visitors to your website who opted to register with a password protected account at checkout or submitted a registration form.

  • Guests at checkout
    Visitors who have decided not to create a password protected account at checkout. Guest contact data may contain significant duplication and should only be read for use with order related information.

  • Email recipients
    Visitors to your website who have opted to subscribe to a newsletter but not a user account.

  • Administrative users
    Staff who have access to the Evance control panel. Administrative rights are granted based on access roles. However, only a user's website permissions are provided within the API. Administrative privileges are currently unavailable via the API.

  • Supplier contact information
    Administrators to your website may add product supplier information into Evance.

  • Company & branch contact information
    This includes contact information added for your business's headquarters and any branches.

Properties
accessRoles

Representation of the Contact's access permissions to the website. 

address

Optional address object representing the primary address for the Contact.

See Contact Address.

biography

Optional string containing a short description about the contact. This may be used for short author biographies within the website's blog, for example. The biography field is not intended for use as a full page profile. We recommend using the website property to store the contact's relative or absolute path to their full page profile.

Must not contain HTML.

company

Optional string containing the company name for the contact.

Up to 200 characters. Must not contain HTML.

created

Read only date and time of Contact creation.

Date & time fields are received and supplied in ATOM format.

dateOfBirth

Optional date containing a Contact's date of birth in yyyy-mm-dd format.

department

Optional string containing the department associated with the Contact's occupational position.

Up to 60 characters. Must not contain HTML.

division

Optional string containing the company division associated with the Contact's occupational position.

Up to 60 characters. Must not contain HTML.

email

Required string containing the contact's email address.

Must be a valid email address format. Supports emails up to 255 characters.

firstname

A string containing the Contact's first name.

Required if you are adding a contact with type "guest" or "user". First name is not required for other Contact types.

Up to 60 characters. Must not contain HTML.

id

Read only The numeric non-sequential system ID for the Contact object.

hasPassword

Read only boolean - true if the contact has a password.
Passwords are secured and cannot be read via the API. However, this property allows you to determine if a user has set a password for their account.

lastname

A string containing the Contact's last name.

Required if you are adding a contact with type "guest" or "user". Last name is not required for other Contact types.

Up to 60 characters. Must not contain HTML. May contain any unicode letter

leaveDate

Optional date field allowing you define when an employee leaves your organisation, for example. This field is typically used for employee focused intranets. The leaveDate is often used in conjunction with the startDate property and must be supplied in yyyy-mm-dd format.

mobile

Optional string containing a Contact's mobile phone number. 

Must not contain HTML. Accepts numbers (0-9), letters (A-Z - will be converted to numbers), brackets, an plus (+).

password

Write only You may supply a Contact's password when creating a Contact. However, the password property is not supplied in responses. If you wish to know whether a user has set a password, you may inspect the hasPassword property.

Passwords should be 8 or more characters.

phone

Optional string containing the Contact's phone number. 

Must not contain HTML. Accepts numbers (0-9), letters (A-Z - will be converted to numbers), brackets, an plus (+).

position

Optional string containing the Contact's occupational position. 

Up to 60 characters. Must not contain HTML.

reference

Optional string containing the a unique reference for a Contact. Contact reference is not editable by users and may be used for employee reference numbers, for example.
Must not contain HTML.

registeredNumber

Optional string containing the Contact's Company Registration Number (if applicable).

Up to 50 characters. Must not contain HTML.

startDate

Optional. This field may be used to describe an employee's starting date, for example. The date must be supplied in Date format yyyy-mm-dd e.g. 2020-01-29. This field may be used in conjunction with a Contact's leaveDate.

tags

Optional, object containing tag values assigned to the Contact.

This will look like the following:

"tags": {
    "contact": [
        "Tag value"
    ]
}

Where each property of the tags object represents a tag type in Evance, which must exist and contain an array of string tag values.

The values contained within the array may represent existing or new tag values when adding or updating a Contact.

Note Contact currently only accepts the built-in contact tag type.

taxNumber

Optional string containing the Contact's VAT/Tax Registration Number (if applicable).

Up to 50 characters. Must not contain HTML.

thumbnail

Optional string containing the Contact's avatar image URL. 

During GET operations the thumbnail property will contain the absolute URL within our CDN. 

When setting a thumbnail you may provide one of the following:

  • A Content URI
    The shortened Account based URI, e.g. ~/content/images/avatars/my-file-name.jpg
  • An External or CDN URL
    The absolute URL of an image e.g. https://mydomain.com/images/path-to-image.jpg.
    Note, when specifying an external image URL Evance will attempt to download the image and rename it into a Content URI. 
  • A Data URI or a Base64 string
    Both represent an image's binary data as a base64 encoded string. 

type

Required string containing the type of Contact object.

The type property may be one of the following:

  • branch
    A website may have zero or more branch contact objects. These represent alternative locations to the website's headquarters.

  • guest
    Represents contact information associated with orders. The visitor decided not to create a user account with a password. However, their information is available for the purpose of managing their order and other associated functionality.

  • hq
    A website may only have 1 hq contact object. The hq contact object is created when the website was created. You cannot create a new hq contact object.

  • recipient
    A recipient represents contact information associated with newsletter sign-ups. Recipients are not registered users.

  • user
    A registered user with a password (or pending password via invitation). A user type is applicable to all portals, including web and admin portals. Access to portals is based on the user's granted access roles.

The Contact's type must be supplied with each request.

username

Optional string containing a Contact's username. This property is currently not implemented.
May only contain alphanumeric characters (letters A-Z, numbers 0-9), underscores,dots and dashes.

Up to 30 characters. Must not contain HTML. 

website

Optional string containing either a relative of absolute path to the Contact's website. The following are valid website values:

  • https://www.mywebsite.com
  • /path-to-my-profile

 

Contact Resources

Discover how to GET, POST, PUT and DELETE contact objects below.

Adding a Contact

POST /api/contacts.json

Deleting a Contact

DELETE /api/contacts/{id}.json

Get a Contact

GET /api/contacts/{id}.json

Updating a Contact

PUT /api/contacts/{id}.json

Finding Contacts

GET /api/contacts/search.json