{"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"},"Charge":{"properties":{"charge":{"description":"The charge represents the type of crime from the Swedish law, which the judicial action is about. It is written as a free text from the source.","type":"string"}},"type":"object"},"CompanyRelatedDocument":{"properties":{"charges":{"description":"For documents from Swedish District Courts, there can be information about which charges are in the document","items":{"$ref":"#/components/schemas/Charge"},"type":"array"},"court":{"description":"Short name for the specific Swedish court or authority","type":"string"},"courtInstanceCode":{"description":"The Swedish court instance where the document comes from","type":"string"},"courtNoticeDate":{"description":"Decision date of the court, if available","type":"string"},"documentId":{"description":"Id of document","type":"string"},"documentType":{"description":"Type of document","type":"string"},"recordDate":{"description":"The system date when this information was originally stored (Date in ISO 8601 standard)","type":"string"}},"type":"object"},"DocumentDescription":{"description":"Describes document","properties":{"caseNumbers":{"description":"List of case numbers","items":{"description":"List of case numbers","type":"string"},"type":"array"},"charges":{"description":"For documents from Swedish District Courts, there can be information about which charges are in the document","items":{"$ref":"#/components/schemas/Charge"},"type":"array"},"companyId":{"description":"National identifier for the company","type":"string"},"court":{"description":"Short name for the specific Swedish court or authority","type":"string"},"courtInstanceCode":{"description":"The Swedish court instance where the document comes from","type":"string"},"courtNoticeDate":{"description":"Decision date of the court, if available","type":"string"},"documentId":{"description":"Id of document","type":"string"},"documentType":{"description":"Type of document","type":"string"},"header":{"description":"Header","type":"string"},"personIds":{"description":"List of ids for related company key persons","items":{"description":"List of ids for related company key persons","type":"string"},"type":"array"},"recordDate":{"description":"The system date when this information was originally stored (Date in ISO 8601 standard)","type":"string"},"redacted":{"description":"Whether the document has restricted access","type":"boolean"},"shortText":{"description":"Short description","type":"string"}},"type":"object"},"DocumentDescriptionResults":{"description":"Roaring Group document description results","properties":{"records":{"description":"Document description results","items":{"$ref":"#/components/schemas/DocumentDescription"},"type":"array"},"status":{"$ref":"#/components/schemas/SearchResultStatus"}},"type":"object"},"FetchLegalDocumentUri":{"properties":{"documentId":{"description":"Id of document","type":"string"},"downloadLink":{"description":"Download link to file","type":"string"},"fileExtension":{"description":"Document file extension","type":"string"},"fileName":{"description":"Document file name","type":"string"}},"type":"object"},"FetchLegalDocumentUriResults":{"description":"Roaring Group fetch legal document uri results","properties":{"records":{"description":"fetched legal document uri results","items":{"$ref":"#/components/schemas/FetchLegalDocumentUri"},"type":"array"},"status":{"$ref":"#/components/schemas/SearchResultStatus"}},"type":"object"},"LegalInfo":{"properties":{"changeDate":{"description":"Latest date some field was changed (Date in ISO 8601 standard)","type":"string"},"companyId":{"description":"National identifier for the company ","type":"string"},"companyRelatedDocuments":{"description":"The documents where the companyId is mentioned","items":{"$ref":"#/components/schemas/CompanyRelatedDocument"},"type":"array"},"personRelatedDocuments":{"description":"The documents where a person related to the company is mentioned","items":{"$ref":"#/components/schemas/PersonRelatedDocument"},"type":"array"}},"type":"object"},"LegalInfoResults":{"description":"Roaring Group company legalinfo results","properties":{"records":{"description":"found legalinfo results","items":{"$ref":"#/components/schemas/LegalInfo"},"type":"array"},"status":{"$ref":"#/components/schemas/SearchResultStatus"}},"type":"object"},"PersonRelatedDocument":{"properties":{"charges":{"description":"For documents from Swedish District Courts, there can be information about which charges are in the document","items":{"$ref":"#/components/schemas/Charge"},"type":"array"},"court":{"description":"Short name for the specific Swedish court or authority","type":"string"},"courtInstanceCode":{"description":"The Swedish court instance where the document comes from","type":"string"},"courtNoticeDate":{"description":"Decision date of the court, if available","type":"string"},"documentId":{"description":"Id of document","type":"string"},"documentType":{"description":"Type of document","type":"string"},"recordDate":{"description":"The system date when this information was originally stored (Date in ISO 8601 standard)","type":"string"},"rolesInCompany":{"description":"An array of all roles which are related to this document.","items":{"$ref":"#/components/schemas/RolesInCompany"},"type":"array"}},"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"},"Role":{"properties":{"isCurrent":{"description":"Whether belongs to current (true) or history (false) person relation","type":"boolean"},"roleCode":{"description":"Shows the detailed role","type":"string"}},"type":"object"},"RolesInCompany":{"properties":{"roleCollectionCode":{"description":"A grouping for different types of relationship between a related person and the company","type":"string"},"roles":{"description":"A list of detailed role codes","items":{"$ref":"#/components/schemas/Role"},"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":"Legal information for the company including key persons legal 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 legal information","version":"1.0","x-logo":{"url":"https://assets.roaring.io/svg/legal-information-company-v3.1.svg"}},"openapi":"3.0.1","paths":{"/documentDescription":{"get":{"operationId":"viewDocumentDescription","parameters":[{"description":"national identifier for the company","in":"query","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"id of document","in":"query","name":"documentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDescriptionResults"}}},"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":"Fetch document description","tags":["LegalInfoSe"]}},"/fetchDocumentUri/{documentId}":{"get":{"description":"fetches document file uri by document id","operationId":"viewLargeDocument","parameters":[{"description":"id of legal information document","in":"path","name":"documentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchLegalDocumentUriResults"}}},"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":"Fetch legal information document uri","tags":["LegalInfoSe"]}},"/{companyId}":{"get":{"description":"number of years for documents history and person relation history dates are supported","operationId":"view","parameters":[{"description":"national identifier for the company","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"number of years for matching history documents to include","in":"query","name":"documentHistoryYears","schema":{"default":5,"format":"int32","type":"integer"}},{"description":"person relation documents start date","in":"query","name":"relationHistoryDateFrom","schema":{"type":"string"}},{"description":"person relation documents end date","in":"query","name":"relationHistoryDateTo","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalInfoResults"}}},"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":"Fetch company legal information","tags":["LegalInfoSe"]}}},"security":[{"OAuth2":[]}],"servers":[{"url":"https://api.roaring.io/se/company/legal/1.0"}],"x-category":"company","x-countries":["se"],"x-id":"LegalInfoApiSe"}