The Rest API supports the ability to manage Contacts. The Rest API URI for Contacts resource is in the format:
https://[siteurl]/rest/subscribers
Commands
API Commands for Contact management include:
Name |
HTTP Method |
Endpoint |
Description |
Create Contact | POST | /rest/subscribers | Create a Contact |
Update Contact | PUT |
/rest/subscribers/{subscriberId} |
Update specific Contact by Contact ID, Customer Key, or Email and First Name |
Delete Contact | DELETE | /rest/subscribers/{subscriberId} /rest/subscribers/{customerKey} /rest/subscribers + Email and First Name in JSON |
Delete specific Contact by Contact ID, Customer Key, or Email and First Name |
Get All Contacts | GET | /rest/subscribers | Get details for all Contacts |
Get Contacts | GET |
/rest/subscribers/{subscriberId} |
Get details for specific Contacts by Contact ID, Customer Key, or any combination of Email, First Name, Last Name, Customer Key |
Get Subscriptions | GET | /rest/subscribers/{subscriberId}/subscriptions /rest/subscribers/{customerKey}/subscriptions |
Get all Subscriptions for a Contact by Contact ID or Customer Key |
Report Contact Events | GET | /rest/subscribers/{subscriberId}/events?filter /rest/subscribers/{customerKey}/events?filter |
Get all Tracking Events for a Contact by Contact ID or Customer Key |
Contact Data Fields
The following data fields may be set and viewed.
Field Name |
Methods |
Description |
Type |
Example |
Contact ID |
PUT, GET, DELETE |
Unique identifier of the Contact |
Integer |
"subscriberId": [subscriberId] |
Realm ID |
GET |
Identifier of the Realm in which the Contact exists. |
Integer |
"realmId": [realmId] |
|
POST, PUT, GET, DELETE |
Email address of the Contact. |
String |
"email": "[email]" |
Customer Key |
POST, PUT, GET, DELETE |
Unique identifier for the Contact in Realms in which Customer Key is required. |
String |
"customerKey": "[customerKey]" |
First Name |
POST, PUT, GET, DELETE |
Contact first name |
String |
"firstName": "[firstName]" |
Last Name |
POST, PUT, GET |
Contact last name. |
String |
"lastName": "[lastName]" |
Company |
POST, PUT, GET |
Contact company. |
String |
"company": "[company]" |
Address 1 |
POST, PUT, GET |
Contact address part 1. |
String |
"address1": "[address1]" |
Address 2 |
POST, PUT, GET |
Contact address part 2. |
String |
"address": "[address2]" |
City |
POST, PUT, GET |
Contact city. |
String |
"city": "[city]" |
State |
POST, PUT, GET |
Contact state, four character limit. |
String | "state": "[stat]" |
Zip |
POST, PUT, GET |
Contact zip or postal code. |
String | "zip": "[zip]" |
Country |
POST, PUT, GET |
Contact country. |
String |
"country": "[country]" |
Phone |
POST, PUT, GET |
Contact phone number. |
String |
"phone": "[phone]" |
Fax |
POST, PUT, GET |
Contact fax number. |
String |
"fax": "[fax]" |
Created Date |
GET |
Date Contact record first created. |
Date/Time |
"createdDate": "Mar 23, 2016 12:45:04 PM" |
Updated Date |
GET |
Date Contact record last updated. |
Date/Time |
"updatedDate": "Mar 23, 2016 12:45:04 PM" |
MD5 Encryption |
GET |
Encrypted Contact identifier. |
String |
"md5Encryption": "[md5Encryption]" |
SHA1 Encryption |
GET |
Encrypted Contact identifier. |
String |
"sha1Encryption": "[sha1Encryption]" |
IP Address |
GET |
Contact IP Address from last Open or Click tracking event. |
String |
"ipAddress": "[ipAddress]" |
Custom Fields |
POST, PUT, GET |
Custom data stored for Contact. |
String, Integer, Float, Date |
"customFieldName": "string" |
Skip |
GET |
Parameter to retrieve next set of results. See Pagination for more details. |
Integer |
"skip": 0 |
Max |
GET |
Max is not in use. |
Integer |
"max": 0 |