{"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"},"GroupCompany":{"properties":{"companyId":{"description":"Company identifier (company registration number / organization number) of group member","type":"string"},"companyLevel":{"description":"Group member level in group structure tree.","format":"int32","type":"integer"},"companyName":{"description":"Company name of group member","type":"string"},"countryCode":{"description":"Country code of group member","type":"string"},"motherCompanyId":{"description":"Company identifier (company registration number / organization number) of closest mother","type":"string"},"ownedPercentage":{"description":"Percentage of ownership by the closest mother","format":"double","type":"number"}},"type":"object"},"GroupStructureWrapper":{"properties":{"companyId":{"type":"string"},"companyName":{"type":"string"},"countryCode":{"type":"string"},"groupCompanies":{"items":{"$ref":"#/components/schemas/GroupCompany"},"type":"array"},"hitCount":{"format":"int32","type":"integer"},"latestChangeDate":{"type":"string"},"responseInfo":{"$ref":"#/components/schemas/ResponseInfo"},"status":{"$ref":"#/components/schemas/SearchResultStatus"}},"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"},"ResponseInfo":{"properties":{"hitCount":{"format":"int32","type":"integer"},"noMatchIds":{"items":{"type":"string"},"type":"array"},"requestCount":{"format":"int32","type":"integer"}},"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":"Group structure of the company\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":"Group Structure","version":"1.0","x-logo":{"url":"https://assets.roaring.io/svg/org-structure-v3.1.svg"}},"openapi":"3.0.1","paths":{"/{companyId}":{"get":{"description":"AsOfDate supported","operationId":"view","parameters":[{"description":"id of company","in":"path","name":"companyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupStructureWrapper"}}},"description":"OK, successfull 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"},"401":{"description":"Returned when the user is not authenticated"},"403":{"description":"Returned when the user is not authorized to access the resource"},"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 group structure","tags":["GroupStructure"]}}},"security":[{"OAuth2":[]}],"servers":[{"url":"https://api.roaring.io/se/company/group-structure/1.0"}],"x-category":"company","x-countries":["se"],"x-id":"GroupStructure"}