Searching for policies
Sometimes, a caller application may need to access a specific policy, but it does not
know the policy's ID or enough information about the policy to retrieve it using the GET
/policies
endpoint directly. In these cases, the caller application
can use the following endpoint to search for the policy.
- POST
policy/v1/search/policies
The request object must include a body. The body must specify at least one of the following search parameters using the following syntax:
{
"data": {
"attributes": {
"companyName": "<stringValue>",
"firstName": "<stringValue>",
"lastName": "<stringValue>",
"officialId": "<stringValue>",
"phone": "<stringValue>",
"policyNumber": "<stringValue>",
"producerCode": {
"id": "<stringValue>"
}
}
}
}
Note the following requirements and restrictions:
- The request object must include at least one required parameter.
- There are also optional search parameters that can be added. For a complete list, refer to the API definition of the endpoint.
- When searching by
companyName
:- The request object cannot include
firstName
orlastName
. - The search returns only policies where the insured is an exact match of the named company.
- The request object cannot include
- When searching by first and last name:
- The request object must include both
firstName
andlastName
. - The request object cannot include
companyName
. - The search returns only policies where the insured is an exact match of the named person.
- The request object must include both
- When searching by official ID:
- The search returns only policies where the insured's official ID (such as their Social Security Number of Federal Employee ID) is an exact match of the provided official ID.
- When searching by phone:
- The search returns only policies where the insured's primary phone is an exact match of the provided phone number.
For example, the following payload will search for all policies with policy number P000143542:
{
"data": {
"attributes": {
"policyNumber": "P000143542"
}
}
}
The following payload will search for all policies where the primary insured has a first name of "Ray" and a last name of "Newton":
{
"data": {
"attributes": {
"firstName": "Ray",
"lastName": "Newton"
}
}
}
The following payload will search for all policies where the producer code is pc:16 (ACV Property Insurance).
{
"data": {
"attributes": {
"producerCode": {
"id": "pc:16"
}
}
}
}
In a development environment, a policy search may return a policy whose product is listed as "Manual", as in the following example.
"product": {
"displayName": "Manual Products",
"id": "Manual"
}
This happens when the policy is using an Advanced Product Designer line of business that is still in visualized mode and is not finalized or installed. For more information, see Integrating Products with PolicyCenter.
Providing no search parameters
PolicyCenter will not execute a policy search with no query parameters. If you attempt to execute a policy search without query parameters, either from the user interface or through Cloud API, PolicyCenter returns the following error message:
Please enter enough search information: first name or last name, company name, account number,
phone number, producer information, or an official ID. If searching by last name with partial
match, either city and state, or ZIP are required. At least three letters are required for names
(five for companies) with partial match."
Note that this message is intended for user interface policy searches, which is why it makes reference to partial matches and a minimum number of required letters.
Policy search using free-text search
PolicyCenter supports two types of searches: database search and free-text search. Database search is enabled by default. An insurer can configure PolicyCenter to use free-text search instead.
The /policy/v1/search/policies
endpoint executes whichever type of
search is enabled, based on the value of the FreeTextSearchEnabled
application configuration parameter.
- If false, the policy search is done using a database search.
- If true, the policy search is done using a free-text search.
For more information on free-text search and how to configure the associated Solr extension, see the Configuration Guide.