Loading...

Knowledge Base

Search Customer Contacts Using the API

When you want to search customer contacts using the API. This article explains available search filters, contact status options, contact types, pagination parameters, and response details for matching contacts.

Searching for Contacts

Description

This method provides detailed information of the contacts that match the search criteria.

Parameters

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
customer-idIntegerRequiredThe Customer for which you want to get the Contact Details
no-of-recordsIntegerRequiredNumber of Records to be returned
page-noIntegerRequiredPage Number for which records are required
contact-idArray of IntegersOptionalArray of Contact Ids for listing of specific Contacts
statusArray of StringsOptionalList of Contact statuses. These can take any values from: InActive, Active, Suspended, Deleted
nameStringOptionalName of Contact
companyStringOptionalName of the Company
emailStringOptionalEmail address of the Contact
typeStringOptionalType of contact. Valid values are: Contact, CoopContact, UkContact, EuContact, Sponsor, CnContact, CoContact, CaContact, DeContact, EsContact.
include-invalidBooleanOptionalUse this option to include details of invalid contacts. Such contacts are not returned by default.

HTTP Method

GET

Example Test URL Request


https://test.httpapi.com/api/contacts/search.json?auth-userid=0&api-key=key&customer-id=0&contact-id=0&no-of-records=10&page-no=1

Response

Returns a hash map containing the below details of the Contacts that match the search criteria:

  • Number of Contacts requested matching the search criteria (recsonpage)

    Following details of each Contact:

    • Contact ID (entity.entityid)

    • Name (contact.name)

    • Company (contact.company)

    • Contact Type (contact.type)

    • Email Address (contact.emailaddr)

    • Telephone Number Country Code (contact.telnocc)

    • Telephone Number (contact.telno)

    • First line of address of the Contact (contact.address1)

    • Second line of address of the Contact (contact.address2)

    • Third line of address of the Contact (contact.address3)

    • City (contact.city)

    • State (contact.state)

    • Country Code (contact.country)

    • ZIP Code (contact.zip)

    • Current Status in the System (entity.currentstatus)

    • Creation Date in the System (contact.creationdt)

    • Creation Date at the Registry (contact.timestamp)

    • Customer ID associated with the Contact (entity.customerid)

    • Designated Agent Status (dastatus)

    • Contact validation details (whoisValidity), viz.

      • If this contact is valid (valid)

      • Invalid fields, if any (invalidData)

  • Number of Contacts in the System matching the search criteria (recsindb)

In case of any errors, a status key with value as ERROR alongwith an error message will be returned.

Note
  • Any contact that contains invalid information, such as an invalid ZIP code or country calling code, will not be included in the search results by default.
  • Unused Contacts (except Default Contacts) that were created more than six months ago are archived. This API call will not search for archived Contacts.