Skip to content

Get list of contacts

Method: GET

Url: /Contacts
Header: DPApiAuthenticationToken={YOUR_API_TOKEN}

Query String:

Parameter NameData TypeDescription
ContactID (optional)IntegerTo filter by a specific ContactIDDefault: -1
FirstName (optional)StringTo filter contacts by First NameDefault: Empty String
Example: “John”
LastName (optional)StringTo filter contacts by Last NameDefault: Empty String
Example: “Doe”
EmailAddress (optional)StringTo filter contacts by Email AddressDefault: Empty String
Example: “[email protected]
Address1 (optional)StringTo filter contacts by the first address lineDefault: Empty String
Example: “1, ABC Street”
Address2 (optional)StringTo filter contacts by the second address lineDefault: Empty String
Example: “Manhattan”
City (optional)StringTo filter contacts by cityDefault: Empty String
Example: “New York”
State (optional)StringTo filter contacts by state.

Note: For US states, use the abbreviation, for Non-US states, use the full state name.Default: Empty String
Example: “DC”
Zip (optional)StringTo filter contacts by zipDefault: Empty String
Example: “91255”
Country (optional)StringTo filter contacts by countryDefault: Empty String
Example: “France”
IsNonUSAddress (optional)IntegerTo filter contacts by US/Non-US Address.

Use the following parameters:
0: The contacts must have US address
-1: The contacts must have Non-US address
Any other value: The filter is not applied.Default: 1 (i.e. no filter)
Example: “-1”
WorkPhone (optional)StringTo filter contacts by work phone numberDefault: Empty String
Example: “111-111-1111”
WorkExt (optional)StringTo filter contacts by work phone extensionDefault: Empty String
Example: “235”
MobilePhone (optional)StringTo filter contacts by mobile phoneDefault: Empty String
Example: “111-111-1111”
IsSubClient (optional)IntegerTo filter contacts by whether the contact is from a sub-client organization.

Use the following parameters:
0: The contacts must not be from a sub-client organization
-1: The contacts must be from a sub-client organization
Any other value: The filter is not applied.Default: 1 (i.e. no filter)
Example: “-1”
SubClientOrganizationName (optional)StringTo filter contacts by the sub-client organization nameDefault: Empty String
Example: “ABC, Inc.”
JMS_Query (optional)StringAny SQL-compliant string to filter the records as explained here.If the query contains any special or reserved characters, it must be properly escapedDefault: Empty string
Example: FirstName^=^”Test”%20^OR^%20LastName^LIKE^”%Test%”
PageNumber (optional)IntegerThe number of page to retrieve considering the PageSize parameter.Default: 1
Example: 4
PageSize (optional)IntegerThe number of records to retrieve per request.The page size cannot exceed the limit set for your account by Dataprise, which is usually around 100 records per request.Default: 20
Example: 25
SortBy (optional)StringThe field name to sort the response by.Default: Empty string
Example: FirstName
SortOrder (optional)StringSort order. Can be either “ASC” or “DESC” or empty string denoting “ASC”.Default: Empty string
Example: DESC
tbl_columns (optional)StringA comma separated string containing the names of the columns to retrieve, instead of all columns.Default: Empty string
Example: FirstName, LastName, EmailAddress
Request Examples:
Using JMS_Query:
GET “https://api.dataprise.com/api/v1/Contacts?JMS_Query=FirstName^=^”Test”%20^OR^%20LastName^LIKE^”%Test%””Header: “DPApiAuthenticationToken=abcxyz0123456789”
Paging & Sorting:
GET “https://api.dataprise.com/api/v1/Contacts/?PageNumber=2&PageSize=50&SortBy=City&SortOrder=DESC”Header: “DPApiAuthenticationToken=abcxyz0123456789”

Response:

The API will return the list of matching contacts from your organization in JSON format. The response will by default contain the following fields for each record, however you can change that using the “tbl_columns” request parameter as mentioned above.

Column NameData TypeRemarks
ContactIDIntegerThe unique ID of the record.
FirstNameStringThe first name of the contact
LastNameStringThe last name of the contact
EmailAddressStringThe email address of the contact as registered with us
Address1StringThe first line of contact’s address
Address2StringThe second line of contact’s address
CityString
StateString
ZipString
CountryString
IsNonUSAddressBooleanWhether the address is from outside the USA
WorkPhoneString
WorkExtString
MobilePhoneString
TitleString
PrimaryContactBooleanWhether the contact is the primary contact as registered with us
POCBooleanWhether the contact is the Point-of-Contact as registered with us
IsSubClientBooleanWhether the contact is a client of your organization
SubClientOrganizationNameStringThe organization name of the contact, applicable only if the contact is a client of your organization (i.e. IsSubClient)
TotalCountIntegerTotal number of records available for the specified query
CustomFieldsList<CustomField>List of custom fields (key-value pair) for this record
Sample Response:
{ “TotalCount”: 25, “Rows”: [ { “ContactID”: 104154, “FirstName”: “Test”, “LastName”: “Cntct”, “EmailAddress”: “[email protected]”, “City”: “”, “State”: “”, “Zip”: “”, “WorkPhone”: “”, “WorkExt”: “”, “MobilePhone”: “”, “Title”: “”, “PrimaryContact”: false, “POC”: false, “IsSubClient”: false, “SubClientOrganizationName”: “”, “TotalCount”: 40, “CustomFields”: null }, { “ContactID”: 104155, “FirstName”: “Test”, “LastName”: “Cntct”, “EmailAddress”: “[email protected]”, “City”: “”, “State”: “”, “Zip”: “”, “WorkPhone”: “”, “WorkExt”: “”, “MobilePhone”: “”, “Title”: “”, “PrimaryContact”: false, “POC”: false, “IsSubClient”: false, “SubClientOrganizationName”: “”, “TotalCount”: 40, “CustomFields”: null } ] }