openapi: 3.0.1 info: title: Compliance Web API description: An API that provides compliance validation check and compliance search features version: '1.0' servers: - url: https://api.beazley.com/compliance/v1 paths: /check: post: summary: check description: "Given the Input parameters run's a Compliance check based on the Rule determined by the System and Action properties in the parameters. The type of Compliance Check is determined based on the Plugins configured in the Rule. For example: If the rule specifies the LicenseValidationPlugin the Compliance Check will consist of validating if the provided BrokerContact/BrokerAgency has an appropriate license matching the query parameters in the input.\r\n - Inputs\r\n {\r\n \"Parameters\": \r\n {\r\n \"System\":\"myBeazley\", -The system making the call -used to determine the Rule\r\n \"Action\":\"BrokerNewBusinessQuote\" - The action that triggers the call - used to determine the Rule\r\n The combination of System and Action determines a lookup to a JSON configuration that determines and specifies:\r\n 1.ValidationRule - Which plugins will be executed for this query\r\n 2.ValidationTransforms - How the data in Input is mapped for each / all / particualr Plugin that gets executed.\r\n 3.AuditInputTransform - How the Auditing System will log(where / how is the data structured) the Input for this request\r\n 4.AuditOutputTransform - How the Auditing system will log(where / how is the data structured) the Output for this request\r\n },\r\n \"Input\": -This input is valid for The BrokerLicensePlugin based on the JsonConfiguration refered in the System / Action secetion.\r\n \"{\r\n \"agency\":\"3930\", - A UniqueId of the Broker Agency for which we want to check Broker Licenses\r\n \"productLine\":\"a0ee0bfb-a83e-e011-a864-0050568e000a\\\", - The Id of the Product Line for which we want to check licenses\r\n \"category\":\"admitted\", - The Business Category for which we want to check licenses.\r\n \"country\":\"US\", Tha Country for which we want to check licenses.\r\n \"state\":\"AK\", The applicable state for which we want to check licenses.\r\n \"insuredName\":\"John Doe\"\r\n }\"\r\n Auditing Feature for Compliance.Get's stored as part of the Audit (Input/Output) determined by the JSON Cofiguration specified in the System/Action section." operationId: 5893134739845516588448c8 requestBody: description: '{"parameters":{"System":"Compliance.UI","Action":"RunChecks"},"input":"{\"agency\":\"B21502043\",\"contact\":\"BE1769054\",\"productLine\":\"e36293ab-320e-de11-9972-0050569534ff\",\"category\":\"surplus\",\"country\":\"US\",\"state\":\"NY\",\"insuredName\":\"JQ Test\"}"}' content: application/json: schema: $ref: '#/components/schemas/ComplianceCheckQuery' text/json: schema: $ref: '#/components/schemas/ComplianceCheckQuery' application/xml: schema: $ref: '#/components/schemas/ComplianceCheckQuery' text/xml: schema: $ref: '#/components/schemas/ComplianceCheckQuery' application/x-www-form-urlencoded: { } responses: '200': description: ' - {"Details":[{"Deferred":false,"Valid":false,"Description":"US Broker License Check Result for Broker Agency B21502043","Type":"BrokerLicense","SubType":"US","CategoryCode":"BL_USA","Errors":[{"Message":"No valid license found based on search parameters.","Category":"BL_USA","Code":1000,"Source":"ValidationEngine"}]}],"Valid":false,"Identifier":"7f7f0f4f-8112-49f4-bfc9-ac85b459e9c0","Deferred":[],"IsAsync":false,"Errors":[{"Message":"No valid license found based on search parameters.","Category":"BL_USA","Code":1000,"Source":"ValidationEngine"}],"Warnings":[]}' content: application/json: schema: $ref: '#/components/schemas/ComplianceCheckResult' text/json: schema: $ref: '#/components/schemas/ComplianceCheckResult' application/xml: schema: $ref: '#/components/schemas/ComplianceCheckResult' text/xml: schema: $ref: '#/components/schemas/ComplianceCheckResult' '500': description: Error occurred in processing of the data! content: application/json: schema: $ref: '#/components/schemas/ComplianceCheckResult' text/json: schema: $ref: '#/components/schemas/ComplianceCheckResult' application/xml: schema: $ref: '#/components/schemas/ComplianceCheckResult' text/xml: schema: $ref: '#/components/schemas/ComplianceCheckResult' /search: post: summary: search description: "The compliance search supports search for broker agencies, broker contacts and product lines. The search endpoint is used to Search Compliance Related entities for dispalying in UI controls. The query data is a custom DSL that is transformed to the CRM Query API.\r\n - Inputs\r\n {\r\n \"type\":\"broker\", - Specifies the Entity to Search.\r\n \"query\":\r\n {\r\n \"select\":\"all\", - Return all results/properties\r\n \"from\":\"agency\", - Determine the type of Broker to search upon.Agency/Contact\r\n \"where\": - A collection of query operators that define the filters for this query.\r\n [{\r\n \"property\":\"all\", -On which properties/ property this query operator will run against. \"all\" means that the query operator will be applied to all properties of Broker Agency\r\n \"operator\":\"like\", -The operator to be used in this query operation. Like / Equals / NotEqual / Contains\r\n \"value\":\"us\" - The value used in the Query Operator.\r\n }]}} \r\n -- The above example comes down to Returning Broker Agencies where any of the properties of the Broker Agency Like \"Us\"" operationId: 5893134739845516588448c9 requestBody: description: '{ "type":"broker", "query": { "select":"all", "from":"agency", "where": s [{ "property":"all", "operator":"like", "value":"us" }]}}' content: application/json: schema: $ref: '#/components/schemas/ComplianceSearchQuery' text/json: schema: $ref: '#/components/schemas/ComplianceSearchQuery' application/xml: schema: $ref: '#/components/schemas/ComplianceSearchQuery' text/xml: schema: $ref: '#/components/schemas/ComplianceSearchQuery' application/x-www-form-urlencoded: { } responses: '200': description: ' - {"Results":[{"ProductId":"a0ee0bfb-a83e-e011-a864-0050568e000a","Name":"Accident and Health"},{"ProductId":"95ee0bfb-a83e-e011-a864-0050568e000a","Name":"Architects and Engineers"},{"ProductId":"96ee0bfb-a83e-e011-a864-0050568e000a","Name":"Binding Authorities"},{"ProductId":"97ee0bfb-a83e-e011-a864-0050568e000a","Name":"Commercial Property"},{"ProductId":"98ee0bfb-a83e-e011-a864-0050568e000a","Name":"Contingency"},{"ProductId":"99ee0bfb-a83e-e011-a864-0050568e000a","Name":"Engineering and Builders Risk"},{"ProductId":"9aee0bfb-a83e-e011-a864-0050568e000a","Name":"Environmental"},{"ProductId":"9bee0bfb-a83e-e011-a864-0050568e000a","Name":"Fidelity and Crime"},{"ProductId":"9cee0bfb-a83e-e011-a864-0050568e000a","Name":"Healthcare"},{"ProductId":"9dee0bfb-a83e-e011-a864-0050568e000a","Name":"Homeowners"},{"ProductId":"9eee0bfb-a83e-e011-a864-0050568e000a","Name":"Jewellers Block"},{"ProductId":"9fee0bfb-a83e-e011-a864-0050568e000a","Name":"Lawyers"},{"ProductId":"a1ee0bfb-a83e-e011-a864-0050568e000a","Name":"Management Liability"},{"ProductId":"a3ee0bfb-a83e-e011-a864-0050568e000a","Name":"Marine Cargo"},{"ProductId":"a4ee0bfb-a83e-e011-a864-0050568e000a","Name":"Marine Energy"},{"ProductId":"a5ee0bfb-a83e-e011-a864-0050568e000a","Name":"Marine Hull"},{"ProductId":"a2ee0bfb-a83e-e011-a864-0050568e000a","Name":"Marine Liability"},{"ProductId":"a6ee0bfb-a83e-e011-a864-0050568e000a","Name":"Political"},{"ProductId":"e36293ab-320e-de11-9972-0050569534ff","Name":"Property and Casualty"},{"ProductId":"a7ee0bfb-a83e-e011-a864-0050568e000a","Name":"Reinsurance"},{"ProductId":"a8ee0bfb-a83e-e011-a864-0050568e000a","Name":"Technology and Media"},{"ProductId":"a9ee0bfb-a83e-e011-a864-0050568e000a","Name":"Terrorism"},{"ProductId":"087552e5-a784-e411-80eb-0050568e3e04","Name":"Transaction Liability Buy Side"},{"ProductId":"5afbde53-a884-e411-80eb-0050568e3e04","Name":"Transaction Liability Contingency"},{"ProductId":"f1513729-a884-e411-80eb-0050568e3e04","Name":"Transaction Liability Sell Side"},{"ProductId":"ae5e8940-a884-e411-80eb-0050568e3e04","Name":"Transaction Liability Tax"}]}' content: application/json: schema: $ref: '#/components/schemas/ComplianceSearchResult' text/json: schema: $ref: '#/components/schemas/ComplianceSearchResult' application/xml: schema: $ref: '#/components/schemas/ComplianceSearchResult' text/xml: schema: $ref: '#/components/schemas/ComplianceSearchResult' '500': description: Error occurred in processing of the data! content: application/json: schema: $ref: '#/components/schemas/ComplianceSearchResult' text/json: schema: $ref: '#/components/schemas/ComplianceSearchResult' application/xml: schema: $ref: '#/components/schemas/ComplianceSearchResult' text/xml: schema: $ref: '#/components/schemas/ComplianceSearchResult' /report: post: summary: report description: "For a given query object returns a collection of audit entries describing compliance checks that have been performed in the system. The parameters that can be passed to the audit report query are similar to the check parameters.Meaning that if we pass a specific product line the Audit Report will return Audit Entries for compliance checks that have been performed for that product. Additionally we can pass a Valid/Invalid/Both query parameter that will filter the Audit Entries based on the result of the compliance check.\r\n - Inputs \r\n {\r\n \"page\": 1,\r\n \"size\": 25,\r\n \"filter\": { - Filter contains the Audit Report Filters which separate into two groups.\r\n \"from\": \"2017-01-09T00:00:00.000Z\", - From what datetime did the compliance check happen.\r\n \"to\": \"2017-01-09T14:39:00.000Z\", - To what datetime did the compliance check happen.\r\n \"system\": \"Compliance.UI\", - From what system did the check happen.\r\n \"action\": \"RunChecks\", For what action\r\n \"user\": \"BFL\\traja\", For which user\r\n \"dataParameters\": {\r\n \"isValid\": \"\" - Empty string – Both valid and invalid\r\n True – only valid checks\r\n False – only invalid checks.\r\n }\r\n }}\r\n These filters are dynamic and used to narrow down the search results.Here we can populate from a standard set of possible filters matching information relevant to a compliance check." operationId: 5893134739845516588448ca requestBody: description: '{ "page": 1, "size": 25,"filter": { "from": "2017-01-09T00:00:00.000Z", "to": "2017-01-09T14:39:00.000Z", "system": "Compliance.UI", "action": "RunChecks", "user": "BFL\traja", "dataParameters": { "isValid": "" }}}' content: application/json: schema: $ref: '#/components/schemas/AuditQuery' text/json: schema: $ref: '#/components/schemas/AuditQuery' application/xml: schema: $ref: '#/components/schemas/AuditQuery' text/xml: schema: $ref: '#/components/schemas/AuditQuery' application/x-www-form-urlencoded: { } responses: '200': description: ' - {"Entries":[{"Id":"ae25156e-9d67-4e7d-843c-5daf14c0d6a8","Timestamp":"2017-01-09T09:03:26.337","System":"Compliance.UI","Action":"RunChecks","User":"BFL\traja","Data":"{"Request":"{"Parameters":{"System":"Compliance.UI","Action":"RunChecks"},"Input":"{"agency":"B21502043","contact":"BE1769054","productLine":"96ee0bfb-a83e-e011-a864-0050568e000a","category":"admitted","country":"US","state":"AL","insuredName":"emir"}"}","Response":"{"Details":[{"Deferred":false,"Valid":false,"Description":"US Broker License Check Result for Broker Agency B21502043","Type":"BrokerLicense","SubType":"US","CategoryCode":"BL_USA","Errors":[{"Message":"No valid license found based on search parameters.","Category":"BL_USA","Code":1000,"Source":"ValidationEngine"}]}],"Valid":false,"Identifier":"555a41c6-741c-40d5-a6aa-d36af026dead","Deferred":[],"IsAsync":false,"Errors":[{"Message":"No valid license found based on search parameters.","Category":"BL_USA","Code":1000,"Source":"ValidationEngine"}],"Warnings":[]}"}","MetaData":[{"Key":"BrokerAgency","Value":"B21502043"},{"Key":"BrokerContact","Value":"BE1769054"},{"Key":"BusinessCategory","Value":"admitted"},{"Key":"RiskCountry","Value":"US"},{"Key":"RiskState","Value":"AL"},{"Key":"InsuredName","Value":"emir"},{"Key":"IsValid","Value":"False"}]}],"TotalCount":1,"Page":1,"Size":25}' content: application/json: schema: $ref: '#/components/schemas/AuditResult' text/json: schema: $ref: '#/components/schemas/AuditResult' application/xml: schema: $ref: '#/components/schemas/AuditResult' text/xml: schema: $ref: '#/components/schemas/AuditResult' '500': description: Error occurred in processing of the data! content: application/json: schema: $ref: '#/components/schemas/AuditResult' text/json: schema: $ref: '#/components/schemas/AuditResult' application/xml: schema: $ref: '#/components/schemas/AuditResult' text/xml: schema: $ref: '#/components/schemas/AuditResult' /audit/lookups: post: summary: getauditlookups description: 'The Audit Lookups endpoint is used to retrieve registry information relevant to performing lookups. For example it can be used with the key:”action” query to retrieve all possible action values for which Compliance Checks have happened with the purpose of displaying the actions in a dropdown list which the user can use to filter audit lookups. This matches the key with a column name in the Audits table and returns all unique values from all rows for that column. {"key":"system"} - The key matching the column' operationId: 5893134739845516588448cb requestBody: description: '{"key":"system"}' content: application/json: schema: $ref: '#/components/schemas/AuditLookupQuery' text/json: schema: $ref: '#/components/schemas/AuditLookupQuery' application/xml: schema: $ref: '#/components/schemas/AuditLookupQuery' text/xml: schema: $ref: '#/components/schemas/AuditLookupQuery' application/x-www-form-urlencoded: { } responses: '200': description: ' - Result (output)' content: application/json: schema: $ref: '#/components/schemas/AuditLookupsPost200ApplicationJsonResponse' text/json: schema: $ref: '#/components/schemas/AuditLookupsPost200TextJsonResponse' application/xml: schema: $ref: '#/components/schemas/AuditLookupsPost200ApplicationXmlResponse' text/xml: schema: $ref: '#/components/schemas/AuditLookupsPost200TextXmlResponse' '500': description: Error occurred in processing of the data! content: application/json: schema: $ref: '#/components/schemas/AuditLookupsPost500ApplicationJsonResponse' text/json: schema: $ref: '#/components/schemas/AuditLookupsPost500TextJsonResponse' application/xml: schema: $ref: '#/components/schemas/AuditLookupsPost500ApplicationXmlResponse' text/xml: schema: $ref: '#/components/schemas/AuditLookupsPost500TextXmlResponse' /health: post: summary: healthcheck description: "The HealthCheck endpoint is used to perform a general system healthcheck. It checks the operational status if integral parts of the system like the Validation Engine and databases. The query object ( via the Settings Dictionary) can be used to specify which subcomponents of the system are going to be checked which can be for Compliance on of these values: case Contracts.Constants.Keys.COMPLIANCE_MANAGER case Contracts.Constants.Keys.RULES_DATA_ACCESS case Contracts.Constants.Keys.VALIDATION_ENGINE case Contracts.Constants.Keys.ALL_PLUGINS If for example the settings dictionary contains the key “CheckComponent” with the value “ValidationEngine” The health check will be performed only over the Validation Engine Component.\r\n - Inputs\r\n {\r\n \t \"Settings\": {\r\n \t \"HealthCheckOf\": \"ComplianceManager\", - What system is being checked\r\n \t \"ExecutedFrom\": \"ComplianceWebApi\", - Where are we making the check from\r\n \t \"CheckComponent\": \"ValidationEngine\" – The component we are checking matching on of the above Keys.\r\n }}" operationId: 5893134739845516588448cc requestBody: description: '{ "Settings": { "HealthCheckOf": "ComplianceManager", "ExecutedFrom": "ComplianceWebApi", "CheckComponent": "ValidationEngine" }}' content: application/json: schema: $ref: '#/components/schemas/HealthCheckQuery' text/json: schema: $ref: '#/components/schemas/HealthCheckQuery' application/xml: schema: $ref: '#/components/schemas/HealthCheckQuery' text/xml: schema: $ref: '#/components/schemas/HealthCheckQuery' application/x-www-form-urlencoded: { } responses: '200': description: ' - {"Status": "HEALTHY","Type": "ValidationEngine"}' content: application/json: schema: $ref: '#/components/schemas/IHealthCheckResult' text/json: schema: $ref: '#/components/schemas/IHealthCheckResult' application/xml: schema: $ref: '#/components/schemas/IHealthCheckResult' text/xml: schema: $ref: '#/components/schemas/IHealthCheckResult' '500': description: Error occurred in processing of the data! content: application/json: schema: $ref: '#/components/schemas/IHealthCheckResult' text/json: schema: $ref: '#/components/schemas/IHealthCheckResult' application/xml: schema: $ref: '#/components/schemas/IHealthCheckResult' text/xml: schema: $ref: '#/components/schemas/IHealthCheckResult' /audit: get: summary: getauditentry description: Returns the details for a specific audit entry with the given id operationId: 5893134739845516588448cd parameters: - name: query.id in: query schema: type: string responses: '200': description: ' - {"Id":"ae25156e-9d67-4e7d-843c-5daf14c0d6a8","Timestamp":"2017-01-09T09:03:26.337","System":"Compliance.UI","Action":"RunChecks","User":"BFL\traja","Data":"{"Request":"{"Parameters":{"System":"Compliance.UI","Action":"RunChecks"},"Input":"{"agency":"B21502043","contact":"BE1769054","productLine":"96ee0bfb-a83e-e011-a864-0050568e000a","category":"admitted","country":"US","state":"AL","insuredName":"emir"}"}","Response":"{"Details":[{"Deferred":false,"Valid":false,"Description":"US Broker License Check Result for Broker Agency B21502043","Type":"BrokerLicense","SubType":"US","CategoryCode":"BL_USA","Errors":[{"Message":"No valid license found based on search parameters.","Category":"BL_USA","Code":1000,"Source":"ValidationEngine"}]}],"Valid":false,"Identifier":"555a41c6-741c-40d5-a6aa-d36af026dead","Deferred":[],"IsAsync":false,"Errors":[{"Message":"No valid license found based on search parameters.","Category":"BL_USA","Code":1000,"Source":"ValidationEngine"}],"Warnings":[]}"}","MetaData":[{"Key":"BrokerAgency","Value":"B21502043"},{"Key":"BrokerContact","Value":"BE1769054"},{"Key":"BusinessCategory","Value":"admitted"},{"Key":"RiskCountry","Value":"US"},{"Key":"RiskState","Value":"AL"},{"Key":"InsuredName","Value":"emir"},{"Key":"IsValid","Value":"False"}]}' content: application/json: schema: $ref: '#/components/schemas/AuditEntry' text/json: schema: $ref: '#/components/schemas/AuditEntry' application/xml: schema: $ref: '#/components/schemas/AuditEntry' text/xml: schema: $ref: '#/components/schemas/AuditEntry' '500': description: Error occurred in processing of the data! content: application/json: schema: $ref: '#/components/schemas/AuditEntry' text/json: schema: $ref: '#/components/schemas/AuditEntry' application/xml: schema: $ref: '#/components/schemas/AuditEntry' text/xml: schema: $ref: '#/components/schemas/AuditEntry' components: schemas: ComplianceCheckQuery: type: object properties: Parameters: type: object additionalProperties: type: string Input: type: string ComplianceCheckResult: type: object properties: Details: type: array items: $ref: '#/components/schemas/ComplianceResultDetail' readOnly: true Valid: type: boolean readOnly: true Identifier: type: string Deferred: type: array items: type: string readOnly: true IsAsync: type: boolean Errors: type: array items: $ref: '#/components/schemas/ComplianceMessage' readOnly: true Warnings: type: array items: $ref: '#/components/schemas/ComplianceMessage' readOnly: true ComplianceResultDetail: type: object properties: Deferred: type: boolean Valid: type: boolean Description: type: string Type: type: string SubType: type: string CategoryCode: type: string Items: type: array items: $ref: '#/components/schemas/ComplianceResultDetailItem' readOnly: true Warnings: type: array items: $ref: '#/components/schemas/ComplianceMessage' readOnly: true Errors: type: array items: $ref: '#/components/schemas/ComplianceMessage' readOnly: true ComplianceMessage: type: object properties: Message: type: string Category: type: string Code: type: integer format: int32 Source: type: string ComplianceResultDetailItem: type: object properties: Type: type: string Parameters: type: object additionalProperties: type: string readOnly: true ComplianceSearchQuery: type: object properties: Type: type: string Query: $ref: '#/components/schemas/Object' Object: type: object ComplianceSearchResult: type: object properties: Results: type: array items: $ref: '#/components/schemas/Object' AuditQuery: type: object properties: Page: type: integer format: int32 Size: type: integer format: int32 Filter: $ref: '#/components/schemas/AuditQueryFilter' AuditQueryFilter: type: object properties: From: type: string format: date-time To: type: string format: date-time System: type: string Action: type: string User: type: string DataParameters: type: object additionalProperties: type: string AuditResult: type: object properties: Entries: type: array items: $ref: '#/components/schemas/AuditEntry' TotalCount: type: integer format: int32 Page: type: integer format: int32 Size: type: integer format: int32 AuditEntry: type: object properties: Id: type: string Timestamp: type: string format: date-time System: type: string Action: type: string User: type: string Data: type: string MetaData: type: array items: $ref: '#/components/schemas/KeyValuePair_String_String_' KeyValuePair_String_String_: type: object properties: key: type: string value: type: string x-apim-schema-name: 'KeyValuePair[String,String]' AuditLookupQuery: type: object properties: Key: type: string HealthCheckQuery: type: object properties: Settings: type: array items: $ref: '#/components/schemas/KeyValuePair_String_String_' readOnly: true CancellationToken: type: object properties: IsCancellationRequested: type: boolean readOnly: true CanBeCanceled: type: boolean readOnly: true WaitHandle: $ref: '#/components/schemas/WaitHandle' WaitHandle: type: object properties: Handle: $ref: '#/components/schemas/Object' SafeWaitHandle: $ref: '#/components/schemas/SafeWaitHandle' SafeWaitHandle: type: object properties: IsInvalid: type: boolean readOnly: true IsClosed: type: boolean readOnly: true IHealthCheckResult: type: object properties: Status: type: string readOnly: true Type: type: string readOnly: true Errors: type: array items: type: string readOnly: true Warnings: type: array items: type: string readOnly: true InnerResult: type: array items: $ref: '#/components/schemas/IHealthCheckResult' readOnly: true AuditQueryById: type: object properties: Id: type: string AuditLookupsPost200ApplicationJsonResponse: type: array items: type: string AuditLookupsPost200TextJsonResponse: type: array items: type: string AuditLookupsPost200ApplicationXmlResponse: type: array items: type: string AuditLookupsPost200TextXmlResponse: type: array items: type: string AuditLookupsPost500ApplicationJsonResponse: type: array items: type: string AuditLookupsPost500TextJsonResponse: type: array items: type: string AuditLookupsPost500ApplicationXmlResponse: type: array items: type: string AuditLookupsPost500TextXmlResponse: type: array items: type: string securitySchemes: apiKeyHeader: type: apiKey name: Ocp-Apim-Subscription-Key in: header apiKeyQuery: type: apiKey name: subscription-key in: query security: - apiKeyHeader: [ ] - apiKeyQuery: [ ]