- 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
Resource | Description |
---|---|
POST contacts | Create a new contact. |
PUT contacts/:id | Update a contact identified by contact_id. |
DELETE contacts/:id | Delete a contact identified by contact_id. |
GET contacts | Returns an array of contacts. |
GET contacts/count | Returns the number of contacts in the system. |
GET contacts/:id | Returns a contact identified by contact_id. |
GET contacts/:id/status | Returns the status of a given contact |
GET contacts/newest | Returns a list of contacts ordered by descending date modified |
GET contacts/recent | Returns a list of contacts ordered by descending date created. |
GET /contacts/:id/profiles/values | Returns an array of profile values for the contact. |
PUT /contacts/:id/profiles/values/:profile_value_id | Update an existing profile value for the contact. |
GET /contacts/:id/progressions | Returns an array of available progressions for the contact. |
POST /contacts/:id/progressions/:progression_id/auto | Runs a status update for the given progression on the given contact. |
GET /contacts/profiles/fields | Returns an array of profile fields of contact. |
POST /contacts/:contact_id/profiles/fields/:profile_field_id | Creates a profile value for a contact. |
GET /contacts/:contact_id/addresses | Returns a list of address for a contact. |
GET /contacts/:contact_id/collections | Returns a list of resource collections for the given contact |
POST /contacts/:contact_id/collections/:collection_id/resources | Upload resource(attachment) to the given collection. |
POST /contacts/:contact_id/addresses | Creates 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.
standing | Array of standing status strings. For example standing(pending,active)- filter out contacts that do not have the supplied standing. |
---|---|
mobile | Only return contacts with an affiliation matching the supplied mobile number(s). |
fax | Only return contacts with an affiliation matching the supplied fax number(s). |
phone | Only return contacts with an affiliation matching the supplied phone number(s). |
contact_number | Only return contacts with an affiliation having a mobile, phone or fax matching one of the supplied phone numbers. |
max_id | Only return contacts with id less than or equal |
min_id | Only return contacts with id greater than or equal |
username | Only 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 |
NOTE:Â filters will ignore whitespace.
Using the _not
 suffix (e.g, id_not
) on standard in filters will return results not in.