Get Contact List

Method: GET

Url: /Contacts
Header: DPApiAuthenticationToken={YOUR_API_TOKEN}

Query String:

Parameter Name Data Type Description
Parameter Name: ContactID (optional) Data Type: Integer Description:

To filter by a specific ContactID

Default: -1

Parameter Name: FirstName (optional) Data Type: String Description:

To filter contacts by First Name

Default: Empty String
Example: "John"

Parameter Name: LastName (optional) Data Type: String Description:

To filter contacts by Last Name

Default: Empty String
Example: "Doe"

Parameter Name: EmailAddress (optional) Data Type: String Description:

To filter contacts by Email Address

Default: Empty String
Example: "john@doe.com"

Parameter Name: Address1 (optional) Data Type: String Description:

To filter contacts by the first address line

Default: Empty String
Example: "1, ABC Street"

Parameter Name: Address2 (optional) Data Type: String Description:

To filter contacts by the second address line

Default: Empty String
Example: "Manhattan"

Parameter Name: City (optional) Data Type: String Description:

To filter contacts by city

Default: Empty String
Example: "New York"

Parameter Name: State (optional) Data Type: String Description:

To 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"

Parameter Name: Zip (optional) Data Type: String Description:

To filter contacts by zip

Default: Empty String
Example: "91255"

Parameter Name: Country (optional) Data Type: String Description:

To filter contacts by country

Default: Empty String
Example: "France"

Parameter Name: IsNonUSAddress (optional) Data Type: Integer Description:

To 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"

Parameter Name: WorkPhone (optional) Data Type: String Description:

To filter contacts by work phone number

Default: Empty String
Example: "111-111-1111"

Parameter Name: WorkExt (optional) Data Type: String Description:

To filter contacts by work phone extension

Default: Empty String
Example: "235"

Parameter Name: MobilePhone (optional) Data Type: String Description:

To filter contacts by mobile phone

Default: Empty String
Example: "111-111-1111"

Parameter Name: IsSubClient (optional) Data Type: Integer Description:

To 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"

Parameter Name: SubClientOrganizationName (optional) Data Type: String Description:

To filter contacts by the sub-client organization name

Default: Empty String
Example: "ABC, Inc."

Parameter Name: JMS_Query (optional) Data Type: String Description:

Any SQL-compliant string to filter the records as explained here.

If the query contains any special or reserved characters, it must be properly escaped

Default: Empty string
Example: FirstName^=^''Test''%20^OR^%20LastName^LIKE^''%Test%''

Parameter Name: PageNumber (optional) Data Type: Integer Description:

The number of page to retrieve considering the PageSize parameter.

Default: 1
Example: 4

Parameter Name: PageSize (optional) Data Type: Integer Description:

The 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

Parameter Name: SortBy (optional) Data Type: String Description:

The field name to sort the response by.

Default: Empty string
Example: FirstName

Parameter Name: SortOrder (optional) Data Type: String Description:

Sort order. Can be either “ASC” or “DESC” or empty string denoting “ASC”.

Default: Empty string
Example: DESC

Parameter Name: tbl_columns (optional) Data Type: String Description:

A 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 Name Data Type Remarks
Column Name:

ContactID

Data Type:

Integer

Remarks:

The unique ID of the record.

Column Name:

FirstName

Data Type:

String

Remarks:

The first name of the contact

Column Name:

LastName

Data Type:

String

Remarks:

The last name of the contact

Column Name:

EmailAddress

Data Type:

String

Remarks:

The email address of the contact as registered with us

Column Name:

Address1

Data Type:

String

Remarks:

The first line of contact’s address

Column Name:

Address2

Data Type:

String

Remarks:

The second line of contact’s address

Column Name:

City

Data Type:

String

Remarks:
Column Name:

State

Data Type:

String

Remarks:
Column Name:

Zip

Data Type:

String

Remarks:
Column Name:

Country

Data Type:

String

Remarks:
Column Name:

IsNonUSAddress

Data Type:

Boolean

Remarks:

Whether the address is from outside the USA

Column Name:

WorkPhone

Data Type:

String

Remarks:
Column Name:

WorkExt

Data Type:

String

Remarks:
Column Name:

MobilePhone

Data Type:

String

Remarks:
Column Name:

Title

Data Type:

String

Remarks:
Column Name:

PrimaryContact

Data Type:

Boolean

Remarks:

Whether the contact is the primary contact as registered with us

Column Name:

POC

Data Type:

Boolean

Remarks:

Whether the contact is the Point-of-Contact as registered with us

Column Name:

IsSubClient

Data Type:

Boolean

Remarks:

Whether the contact is a client of your organization

Column Name:

SubClientOrganizationName

Data Type:

String

Remarks:

The organization name of the contact, applicable only if the contact is a client of your organization (i.e. IsSubClient)

Column Name:

TotalCount

Data Type:

Integer

Remarks:

Total number of records available for the specified query

Column Name:

CustomFields

Data Type:

List<CustomField>

Remarks:

List of custom fields (key-value pair) for this record

Sample Response:
{
    "TotalCount": 25,
    "Rows": [
	{
		"ContactID": 104154,
		"FirstName": "Test",
		"LastName": "Cntct",
		"EmailAddress": "test@tests.com",
		"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": "test@tests1.com",
		"City": "",
		"State": "",
		"Zip": "",
		"WorkPhone": "",
		"WorkExt": "",
		"MobilePhone": "",
		"Title": "",
		"PrimaryContact": false,
		"POC": false,
		"IsSubClient": false,
		"SubClientOrganizationName": "",
		"TotalCount": 40,
		"CustomFields": null
	}
]
}