{"components":{"schemas":{"BadRequest":{"description":"Returned when something is wrong in the request, e.g. failed argument validation or missed argument","properties":{"attributes":{"description":"Invalid attributes","items":{"$ref":"#/components/schemas/RequestAttribute"},"type":"array"},"error":{"default":"BadRequest","description":"Error name","type":"string"},"message":{"default":"Required arguments are missing in the request","description":"Description of the request error","type":"string"}},"type":"object"},"CompanyRiskIndicatorsWrapper":{"properties":{"companyId":{"type":"string"},"indicators":{"items":{"$ref":"#/components/schemas/RiskIndicatorEvaluation"},"type":"array"},"status":{"$ref":"#/components/schemas/SearchResultStatus"}},"type":"object"},"IndicatorRuleRecord":{"properties":{"disabled":{"description":"Signals whether the rule is disabled. Disabled rules will not appear in the response when querying the API","type":"boolean"},"indicatorName":{"description":"Name of indicator that the rule will be applied to","type":"string"},"ruleTemplateName":{"description":"Name of rule","type":"string"}},"type":"object"},"RequestAttribute":{"description":"Incorrect attribute of request","properties":{"attribute":{"description":"Parameter name","type":"string"},"value":{"description":"Parameter value, subject for validation","type":"string"}},"type":"object"},"RiskIndicatorEvaluation":{"properties":{"actualValue":{"description":"Actual data value of the indicator that was evaluated (only present if the indicatorResult (ie the evaluation) is true)","type":"string"},"indicatorName":{"description":"Name of the indicator that the rule is applied to","type":"string"},"indicatorResult":{"description":"Result from the evaluation of the rule","type":"boolean"},"ruleDescription":{"description":"Rule in readable format that is being evaluated, if the evaluation yields true it is to be considered as a warning/alarm","type":"string"},"templateValue":{"description":"User defined value of the parameter from the template that played significant role in evaluation (might not always be present)","type":"string"}},"type":"object"},"RiskTemplateRecord":{"properties":{"description":{"description":"Free text notes that the customer can add to remember what the template does","type":"string"},"name":{"description":"Name of risk template","type":"string"},"rules":{"description":"Array of rules with indicators that should be evaluated","items":{"$ref":"#/components/schemas/IndicatorRuleRecord"},"type":"array"},"templateId":{"description":"Template id that should be used together with companyId to querying the api looking up a company","type":"string"}},"type":"object"},"RiskTemplatesWrapper":{"properties":{"templates":{"description":"Array of available templates","items":{"$ref":"#/components/schemas/RiskTemplateRecord"},"type":"array"}},"type":"object"},"SearchResultStatus":{"description":"Description of search result","properties":{"code":{"description":"0 - found, 1 - not found","format":"int32","type":"integer"},"text":{"description":"search result description","type":"string"}},"type":"object"},"ServerError":{"description":"Internal server error","properties":{"error":{"default":"InternalServerError","description":"Error name","type":"string"},"message":{"default":"An internal server error occurred, please contact the system administrator with information on the error","description":"Description of the request error","type":"string"}},"type":"object"}},"securitySchemes":{"OAuth2":{"description":"All requests require authentication via OAuth2 client credentials.\n\nBase URL: https://api.roaring.io\n\n1. Obtain a Consumer key and Consumer secret from https://developer.roaring.io/keys\n   (separate sandbox and production pairs).\n2. Request an access token by POSTing to the token endpoint:\n\n   POST https://api.roaring.io/token\n   Content-Type: application/x-www-form-urlencoded\n   Authorization: Basic base64(consumer-key:consumer-secret)\n\n   body: grant_type=client_credentials\n\n   Tokens are valid for 3600 seconds. The response contains an access_token of\n   type Bearer.\n3. Send the access token on every API call:\n\n   Authorization: Bearer <access_token>","flows":{"clientCredentials":{"tokenUrl":"https://api.roaring.io/token","scopes":{}}},"type":"oauth2"}}},"info":{"description":"Fetch company risk information\n\nAll requests require authentication via OAuth2 client credentials.\n\nBase URL: https://api.roaring.io\n\n1. Obtain a Consumer key and Consumer secret from https://developer.roaring.io/keys\n   (separate sandbox and production pairs).\n2. Request an access token by POSTing to the token endpoint:\n\n   POST https://api.roaring.io/token\n   Content-Type: application/x-www-form-urlencoded\n   Authorization: Basic base64(consumer-key:consumer-secret)\n\n   body: grant_type=client_credentials\n\n   Tokens are valid for 3600 seconds. The response contains an access_token of\n   type Bearer.\n3. Send the access token on every API call:\n\n   Authorization: Bearer <access_token>","title":"Company Risk","version":"1.0","x-logo":{"url":"https://assets.roaring.io/svg/risk-api-icon-v1.1.svg"}},"openapi":"3.0.1","paths":{"/{templateId}/{companyId}":{"get":{"description":"Query the indicator data for a given companyId by applying your template","operationId":"view","parameters":[{"description":"id of risk template","in":"path","name":"templateId","required":true,"schema":{"type":"string"}},{"description":"id of company","in":"path","name":"companyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRiskIndicatorsWrapper"}}},"description":"OK, successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"Find company risk information by company id","tags":["CompanyRiskNo"]}},"/templates":{"get":{"description":"It supports showDefault parameter to also load default templates that are available for all users (upcoming feature)","operationId":"findAllTemplates","parameters":[{"description":"Optional flag to include default templates in response true/false (defaults to false)","in":"query","name":"showDefault","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskTemplatesWrapper"}}},"description":"OK, successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"Find all risk templates that are available for you company","tags":["CompanyRiskNo"]}},"/template/{templateId}":{"get":{"description":"Get detailed information regarding your template","operationId":"findTemplateById","parameters":[{"description":"id of risk template","in":"path","name":"templateId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskTemplateRecord"}}},"description":"OK, successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"Find risk template by id","tags":["CompanyRiskNo"]}}},"security":[{"OAuth2":[]}],"servers":[{"url":"https://api.roaring.io/no/company/risk/1.0"}],"x-auth-type":"Application & Application User","x-category":"company","x-countries":["no"],"x-id":"CompanyRiskApiNo"}