Overview
This API is used to search for existing accounts by account name, email address, or the account's unique identifier. The service will respond with the Account’s Unique Identifier (AccountUid) which can be used to do a single sign on call.
Authentication
The Account Search API requires authentication. The HTTP POST will require a valid Authenticate message header with an API token. See the Aimbase Authentication Web Service Specification for more details on how to retrieve a valid API token.
Authenticate message header example: Authenticate: Avala-Api {username}:{token}
Post Information
HTTP Endpoint: https://{baseaddress}/api/AccountSearch
Account Search Data Schema
Field |
Max Length |
Req’d |
Description |
Name | 50 |
No |
The name of the account that is being searched for. |
256 |
No |
The email address of the account that is being searched for. |
|
AccountUid | 36 | No | The AccountUid of the account that is being searched for. This value must be a properly formatted GUID (e.g. b00f63d6-e0c8-40c7-8e34-bcc62583bae5) |
Example JSON
{ "Name" : "johnd", }
Or
{ "Email" : "johndoe@avalamarketing.com", }
Or
{ "AccountUid" : "513D04E7-5E20-4E99-93CB-53DA06549FA2", }
Example XML
<AccountSearch> <Name>johnd</Name> </AccountSearch>
or
<AccountSearch> <Email>johndoe@avalamarketing.com</Email> </AccountSearch>
or
<AccountUid> <Email>513D04E7-5E20-4E99-93CB-53DA06549FA2</Email> </AccountUid>
Response
If the request is valid the return message will have an HTTP Status Code of 200 (OK) and contain an AccountUid value
Example JSON
{ "AccountUid" : "513D04E7-5E20-4E99-93CB-53DA06549FA2", "AccountId" : 2781, "Email" : "john.doe@example.com", "FirstName" : "John", "LastName" : "Doe", "AccountIsActive" : true, }
Example XML
<AccountSearch> <AccountUid>513D04E7-5E20-4E99-93CB-53DA06549FA2</AccountUid> <AccountId>2781</AccountId> <Email>john.doe@example.com</Email> <FirstName>John</FirstName> <LastName>Doe</LastName> <AccountIsActive>true</AccountIsActive> </AccountSearch>
If the request format is incorrect, the return message will have an HTTP Status Code of 400 (Bad Request) and the response body will contain an error message. If no account is found or the API user does not have access to the account, a HTTP Status Code of 404 (Not Found) will be returned.