{"openapi":"3.0.1","info":{"title":"Search","description":"Allows partner agencies search for policies. It also provides metadata about the services.","contact":{"name":"API Support","url":"https://developer.mercuryinsurance.com","email":"apiportal@mercuryinsurance.com"},"version":""},"servers":[{"url":"https://api.mercuryinsurance.com/api","description":"Production Environment"},{"url":"https://sandbox-api.mercuryinsurance.com/api","description":"Sandbox Environment"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"Policy Search"},{"name":"Quote Search"}],"paths":{"/mercury-search/v1/policy/search":{"get":{"tags":["Policy Search"],"parameters":[{"name":"addressCity","in":"query","description":"The City of the Mailing Address on a policy","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"addressLine1","in":"query","description":"The Address Line 1 of the Mailing Address on a policy","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"addressState","in":"query","description":"The State of the Mailing Address on a policy","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"addressZip","in":"query","description":"The Zip of the Mailing Address on a policy","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"companyName","in":"query","description":"The Name of the Company representing as the Primary Named Insured on a policy","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"dateOfBirth","in":"query","description":"The Date of Birth of the Primary Named Insured on a policy","required":false,"style":"form","explode":true,"schema":{"type":"string","format":"date"}},{"name":"effectiveDate","in":"query","description":"The Effective Date representing the date upon which any policies must be effective after","required":false,"style":"form","explode":true,"schema":{"type":"string","format":"date"}},{"name":"firstName","in":"query","description":"The First Name of a Primary Named Insured on a policy","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"lastName","in":"query","description":"The Last Name of a Primary Named Insured on a policy","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"lob","in":"query","description":"The Line of Business to limit the search to","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"phoneNumber","in":"query","description":"The Phone number as a 10 digit number representing a phone number on a policy","required":false,"style":"form","explode":true,"schema":{"maximum":10,"minimum":10,"pattern":"^\\d{10}$","type":"string"}},{"name":"policyNumber","in":"query","description":"The Policy Number to search for","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"policyState","in":"query","description":"The State that the policies must issues under","required":false,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Represents a successful search call with records back","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicySearchResponse"}}}},"400":{"description":"Represents when invalid search criteria is given","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"404":{"description":"Represents when a search returns no results for the given criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"500":{"description":"Represents a response when there was an error while processing the search request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"504":{"description":"Gateway Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/mercury-search/v1/quote/search":{"get":{"tags":["Quote Search"],"parameters":[{"name":"addressCity","in":"query","description":"The City of the Mailing Address on a quote","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"addressLine1","in":"query","description":"The Address Line 1 of the Mailing Address on a quote","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"addressState","in":"query","description":"The State of the Mailing Address on a quote","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"addressZip","in":"query","description":"The Zip of the Mailing Address on a quote","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"companyName","in":"query","description":"The Name of the Company representing as the Primary Named Insured on a quote","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"effectiveDate","in":"query","description":"The Effective Date representing the date upon which any quotes must be effective after","required":false,"style":"form","explode":true,"schema":{"type":"string","format":"date"}},{"name":"firstName","in":"query","description":"The First Name of a Primary Named Insured on a quote","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"lastName","in":"query","description":"The Last Name of a Primary Named Insured on a quote","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"lob","in":"query","description":"The Line of Business to limit the search to","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"phoneNumber","in":"query","description":"The Phone number as a 10 digit number representing a phone number on a quote","required":false,"style":"form","explode":true,"schema":{"maximum":10,"minimum":10,"pattern":"^\\d{10}$","type":"string"}},{"name":"policyState","in":"query","description":"The State that the quote must issues under","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"quoteNumber","in":"query","description":"The Quote Number to search for","required":false,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Represents a successful search call with records back","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSearchRecords"}}}},"400":{"description":"Represents when invalid search criteria is given","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"404":{"description":"Represents when a search returns no results for the given criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"500":{"description":"Represents a response when there was an error while processing the search request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"504":{"description":"Gateway Timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}}},"security":[{"BearerAuth":[]}]}}},"components":{"schemas":{"AdditionalDetail":{"type":"object","properties":{"key":{"type":"string","description":"The Key of the Additional Detail"},"value":{"type":"string","description":"The Value of the Additional Detail"}},"description":"Represents a single Additional Detail in the Message"},"Message":{"type":"object","properties":{"additionalDetails":{"type":"array","description":"Additional information that is specific to this API","items":{"$ref":"#/components/schemas/AdditionalDetail"}},"category":{"type":"string","description":"Represents a category that can be used to associate similar messages"},"code":{"type":"string","description":"A code to represent the message"},"description":{"type":"string","description":"Provides a text description of the Informational, Warning or Error message"},"type":{"type":"string","description":"Indicates the Message Type","enum":["Error","Info","Warn"]}},"description":"Represents a single message"},"MessagesResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}},"description":"Represents a response of Message Entities"},"PolicySearchRecord":{"type":"object","properties":{"addressCity":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"addressState":{"type":"string"},"addressZip":{"type":"string"},"companyName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"policyEffectiveDate":{"type":"string"},"policyEndDate":{"type":"string"},"policyNumber":{"type":"string"},"policyStatus":{"type":"string"},"policyType":{"type":"string"}}},"PolicySearchResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/PolicySearchRecord"}}},"description":"Response from the Policy Search Operation"},"QuoteSearchRecord":{"type":"object","properties":{"addressCity":{"type":"string"},"addressLine1":{"type":"string"},"addressState":{"type":"string"},"addressZip":{"type":"string"},"companyName":{"type":"string"},"name":{"type":"string"},"policyEffectiveDate":{"type":"string"},"policyEndDate":{"type":"string"},"policyType":{"type":"string"},"quoteNumber":{"type":"string"},"quoteStatus":{"type":"string"},"transactionId":{"type":"string"}},"description":"Represents an individual Quote Search Result"},"QuoteSearchRecords":{"type":"array","items":{"$ref":"#/components/schemas/QuoteSearchRecord"}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}