new Contact()
- Source:
- WixClient.js
Members
-
<static> Contact
-
Prototype
- Source:
- WixClient.js
Methods
-
addActivity(activity)
-
Parameters:
Name Type Description activityActivity The Activity to post
- Source:
- WixClient.js
-
getActivities(cursor, options)
-
Returns a list of
Activityfor this contact, based on the filter. By default, all Activities are returnedParameters:
Name Type Description cursorstring The current cursor
optionsGetActivitiesOptions The Activity to post
- Source:
- WixClient.js
-
toJson() → {Object}
-
Creates a JSON Object representing the contact
- Source:
- WixClient.js
Returns:
A Json object representing the Contact
- Type
- Object
-
update(contact) → {Promise.<Object, error>}
-
Checks for the existence of a Contact by either phone, email or both properties. If the Contact exists with the values you have specified, it will be returned. If email and phone are specified, a Contact will only be returned if both properties match. If no match is found, a new Contact will be created
Parameters:
Name Type Description contactobject JSON representing the Contact
- Source:
- WixClient.js
Returns:
A new Contact, or an error
- Type
- Promise.<Object, error>
Type Definitions
-
Address
-
Contact Address information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Argument Description tagString The context tag associated with this address,
addressString <nullable>
The contact's street address,
neighborhoodString <nullable>
The contact's street neighborhood,
cityString <nullable>
The contact's city,
regionString <nullable>
The contact's region. An example of this would be a state in the US, or a province in Canada,
countryString <nullable>
The contact's country,
postalCodeNumber <nullable>
The contact's postal code
-
Company
-
Contact Company information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description rolestring The contact's role within their company,
namestring The name of the contact's current company
-
CustomField
-
CustomField
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description fieldstring The name of the custom field
valuestring The value of the custom field
-
Email
-
Contact Email information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description tagstring a context tag
emailstring The email address to add
contactSubscriptionStatusstring The subscription status of the current contact ['optIn' or 'optInOut' or 'notSet']
siteOwnerSubscriptionStatusstring The subscription status of the site owner in relation to this contact ['optIn' or 'optInOut' or 'notSet']
-
ID
-
Contact ID information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description existsboolean true if this id exists
idstring The id of this Contact
-
ImportantDate
-
Contact Important Date information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description tagstring The context tag associated with this date
datedateTime An important date for this contact, as an ISO 8601 timestamp
-
Name
-
Contact Name information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description prefixstring The prefix of the contact's name
firststring The contact's first name
middlestring The contact's middle name
laststring The contact's last name
suffixstring The suffix of the contact's name
-
Note
-
Contact Note information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description tagstring a context tag
notestring The note to add
-
Phone
-
Contact Phone information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description tagstring a context tag
phonestring The phone number to add
normalizedPhonestring The contact's normalized phone number
-
StateLink
-
Contact Link information A HATEOAS link to operations applicable to this Contact resource
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description hrefstring The href of the operation relevant to this resource
relstring The relationship of this operation to the returned resource
-
Url
-
Contact Url information
Type:
- Object
- Source:
- WixClient.js
Properties:
Name Type Description tagstring The context tag associated with this url
urlstring A url associated with this contact