Search Address Book ​
GET /userapi/addressbook
Searching for Address Book contacts can be achieved via multiple criteria, as outlined by the fields below. You can search using just one field, or multiple to further narrow down the search results. In order to search for Address Book contacts, you must have access to the feature 'Manage Global Contacts' on the screen Administration -> Feature Access -> Miscellaneous tab.
- AddressBookID
- FirstName
- Surname
- EmailAddress
- Company
Powershell
# Search by AddressBookID
$PasswordstateUrl = 'https://passwordstate/userapi/addressbook/?AddressBookID=<value>'
# Search by FirstName
$PasswordstateUrl = 'https://passwordstate/userapi/addressbook/?FirstName=<value>'
# Search by FirstName and Surname
$PasswordstateUrl = 'https://passwordstate/userapi/addressbook/?FirstName=<value>&Surname=<value>'
# Searching by EmailAddress
$PasswordstateUrl = 'https://passwordstate/userapi/addressbook/?EmailAddress=<value>'
# Searching by Company
$PasswordstateUrl = 'https://passwordstate/userapi/addressbook/?Company=<value>'
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "UserID" = "<UserID>" ; "APIKey" = "<APIKey>" }Json
# Response
HTTP/1.1 200
[
{
"AddressBookID":"33",
"FirstName":"Graham",
"Surname":"Sanders",
"EmailAddress":"gsanders@gmail.com",
"Company":"Sanders Pty Ltd",
"BusinessPhone":"",
"PersonalPhone":"",
"Street":"",
"City":"",
"State":"",
"Zipcode":"",
"Country":"United States",
"Notes":"",
"PassPhrase":"Pas$Fraze1865",
"GlobalContact":"True"
}
]