The following macros are not currently supported in the header:
  • style

Contacts

 

Introduction

Contacts are the AffinityLive entries for individual people. Contact entries will record all of the person’s contact information, and provide a central location where you can view all correspondence involving them. A contact is not directly associated with a company but it is with an affiliation. To create a contact against a given company, you should first create the contact and then the affiliation for the new contact against the company.

Resource Endpoints

ResourceDescription
POST contactsCreate a new contact.
PUT contacts/:idUpdate a contact identified by contact_id.
DELETE contacts/:idDelete a contact identified by contact_id.
GET contactsReturns an array of contacts.
GET contacts/countReturns the number of contacts in the system.
GET contacts/:idReturns a contact identified by contact_id.
GET contacts/:id/statusReturns the status of a given contact
GET contacts/newestReturns a list of contacts ordered by descending date modified
GET contacts/recentReturns a list of contacts ordered by descending date created.
GET /contacts/:id/profiles/valuesReturns an array of profile values for the contact.
PUT /contacts/:id/profiles/values/:profile_value_idUpdate an existing profile value for the contact.
GET /contacts/:id/progressionsReturns an array of available progressions for the contact.
POST /contacts/:id/progressions/:progression_id/autoRuns a status update for the given progression on the given contact.
GET /contacts/profiles/fieldsReturns an array of profile fields of contact.
POST /contacts/:contact_id/profiles/fields/:profile_field_idCreates a profile value for a contact.
GET /contacts/:contact_id/addressesReturns a list of address for a contact.
GET /contacts/:contact_id/collectionsReturns a list of resource collections for the given contact
POST /contacts/:contact_id/collections/:collection_id/resourcesUpload resource(attachment) to the given collection.
POST /contacts/:contact_id/addressesCreates a new address for given contact.

Filters

Contact filters can be used to filter through lists of contacts. You can defined filters in the _filters parameter.

standingArray of standing status strings. For example standing(pending,active)- filter out contacts that do not have the supplied standing.
mobileOnly return contacts with an affiliation matching the supplied mobile number(s).
faxOnly return contacts with an affiliation matching the supplied fax number(s).
phoneOnly return contacts with an affiliation matching the supplied phone number(s).
contact_numberOnly return contacts with an affiliation having a mobile, phone or fax matching one of the supplied phone numbers.
max_idOnly return contacts with id less than or equal
min_idOnly return contacts with id greater than or equal
usernameOnly return contacts with a username matched. e.g, _filters=username(kurt,scott). Warning: As these filters and partial fields work on a strict whitelist of characters you will not be able to search on usernames that contain space characters. In the near future, filters will be acceptable in JSON, XML and YML formats to resolve this issue.

NEW

<field_name>_greater_than(<value>),

<field_name>_less_than(<value>),

<field_name>_greater_than_or_equal(<value>),

<field_name>_less_than_or_equal(<value>)

Available fields:

id
country
status

NOTE: filters will ignore whitespace.

Using the _not suffix (e.g, id_not) on standard in filters will return results not in.