Search Contacts

A Contact resource represents a single contact within a given agency. This may be a contact in either the “Pending” or “Active” status and may even include deleted contacts. The Contacts list resource represents a set of contact’s in a given agency.

HTTP GET

GET /api/2013-12-01/Contacts/[Agency ID]
Returns a list of contact’s for a given [Agency ID].

Paging

Paging can be accomplished by passing the Page request parameter. By default only 100 contacts are returned per request. You can use the Page_Size request parameter to specify up to 10,000 contacts per request.

List Filters

The following list of parameters are available to help limit or filter the records returned. All parameters are case sensitive.

Parameter Description
Custom_ID Only show contacts who’s Custom ID matches the provided information.
First Only show contacts that contain the given First name.
Groups Only show contacts that contain the given Group.
Last Only show contacts that contain the given Last name.
Organization Only show contacts that contain the given Organization.
Owner_ID Only show contacts in the personal roster with the owning “User ID” as Owner_ID.
Status Only show contacts that are in either the “Pending” or “Active” status. Defaults to “Active”.
Tags Only show contacts that contain the given Tags.
Title Only show contacts that contain the given title.
User_ID Only show contacts that are linked to the given User_ID.
Custom_1 Only show contacts that contain the given Custom 1 field data.
Custom_2 Only show contacts that contain the given Custom 2 field data.
Custom_3 Only show contacts that contain the given Custom 3 field data.
Custom_4 Only show contacts that contain the given Custom 4 field data.
Custom_5 Only show contacts that contain the given Custom 5 field data.
Custom_6 Only show contacts that contain the given Custom 6 field data.
Custom_7 Only show contacts that contain the given Custom 7 field data.
Custom_8 Only show contacts that contain the given Custom 8 field data.
Custom_9 Only show contacts that contain the given Custom 9 field data.
Custom_10 Only show contacts that contain the given Custom 10 field data.
Example Request

Fetch the entire list.

$ curl -G https://[Site Name].readyop.com/api/2013-12-01/Contacts/[Agency ID] \
    -u "[API Account ID]:[API Token]"

Request Result

{
    "Total_Results": 20462,
    "Pages": 205,
    "Page": 0,
    "Page_Start": 0,
    "Page_End": 99,
    "Page_Size": 100,
    "Contacts": [
        {
            "Contact ID": 106752,
            "Agency ID": 1,
            "Agencies": [
                1
            ],
            "Custom ID": "AZ123",
            "User ID": 5,
            "Owner ID": 3123,
            "Status": "Active",
            "First": "John",
            "Last": "Doe",
            "Organization": "Emergency Fire Rescue",
            "Tags": "Fire, Hazmat, Doctor",
            "Title": "Chief",
            "PIN": "1234",
            "Custom 1": "Custom agency field data 1",
            "Custom 2": "Custom agency field data 2",
            "Custom 3": "Custom agency field data 3",
            "Custom 4": "Custom agency field data 4",
            "Custom 5": "Custom agency field data 5",
            "Custom 6": "Custom agency field data 6",
            "Custom 7": "Custom agency field data 7",
            "Custom 8": "Custom agency field data 8",
            "Custom 9": "Custom agency field data 9",
            "Custom 10": "Custom agency field data 10",
            "Phones": [
                {
                    "Number": "+1333444555",
                    "Textable": "Y",
                    "Type": "Cell"
                },
                {
                    "Number": "+1222333444",
                    "Textable": "N",
                    "Type": "Desk"
                }
            ],
            "Emails": [
                {
                    "Address": "no@email.com",
                    "Type": "Work"
                }
            ],
            "Objects": [
                1234,
                5678
            ]
        }, ...
    ]
}

Example Request

Show only those contact’s who’s Tags field contains the tag “Hazmat”.

$ curl -G https://[Site Name].readyop.com/api/2013-12-01/Contacts/[Agency ID] \
    -d "Tags=Hazmat" \
    -u "[API Account ID]:[API Token]"

Request Result

{
    "Total_Results": 312,
    "Pages": 4,
    "Page": 0,
    "Page_Start": 0,
    "Page_End": 99,
    "Page_Size": 100,
    "Contacts": [
        {
            "Contact ID": "106752",
            "Custom ID": "AZ123",
            "User ID": "5",
            "Owner ID": "3123",
            "Status": "Active",
            "First": "John",
            "Last": "Doe",
            "Organization": "Emergency Fire Rescue",
            "Tags": "Fire, Hazmat, Doctor",
            "Title": "Chief",
            "PIN": "1234",
            "Custom 1": "Custom agency field data 1",
            "Custom 2": "Custom agency field data 2",
            "Custom 3": "Custom agency field data 3",
            "Custom 4": "Custom agency field data 4",
            "Custom 5": "Custom agency field data 5",
            "Custom 6": "Custom agency field data 6",
            "Custom 7": "Custom agency field data 7",
            "Custom 8": "Custom agency field data 8",
            "Custom 9": "Custom agency field data 9",
            "Custom 10": "Custom agency field data 10",
            "Phones": [
                {
                    "Number": "+1333444555",
                    "Textable": "Y",
                    "Type": "Cell"
                },
                {
                    "Number": "+1222333444",
                    "Textable": "N",
                    "Type": "Desk"
                }
            ],
            "Emails": [
                {
                    "Address": "no@email.com",
                    "Type": "Work"
                }
            ],
            "Objects": [
                1234
            ]
        }, ...
    ]
}