{"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"},"Engagement":{"properties":{"changeDate":{"type":"string"},"commune":{"type":"string"},"companyId":{"type":"string"},"companyName":{"type":"string"},"roles":{"items":{"$ref":"#/components/schemas/Role"},"type":"array"},"statusCode":{"type":"string"},"statusText":{"type":"string"}},"type":"object"},"EngagementsRecord":{"description":"found history engagements(s)","properties":{"changeDate":{"type":"string"},"engagements":{"items":{"$ref":"#/components/schemas/Engagement"},"type":"array"},"firstName":{"type":"string"},"fullName":{"type":"string"},"hitCount":{"format":"int32","type":"integer"},"personalNumber":{"type":"string"},"surName":{"type":"string"}},"type":"object"},"EngagementsResult":{"properties":{"changeDate":{"type":"string"},"engagements":{"items":{"$ref":"#/components/schemas/Engagement"},"type":"array"},"firstName":{"type":"string"},"fullName":{"type":"string"},"hitCount":{"format":"int32","type":"integer"},"personalNumber":{"type":"string"},"status":{"$ref":"#/components/schemas/SearchResultStatus"},"surName":{"type":"string"}},"type":"object"},"HistoryEngagementsResults":{"description":"Person's engagements history results","properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"records":{"description":"found history engagements(s)","items":{"$ref":"#/components/schemas/EngagementsRecord"},"type":"array"},"status":{"$ref":"#/components/schemas/SearchResultStatus"}},"type":"object"},"PaginationInfo":{"description":"Pagination metadata for paginated history responses","properties":{"maxPageSize":{"description":"Maximum pageSize the server will honor for this entity. 0 means no restriction. Clients may request any pageSize up to this value; values above are silently capped.","format":"int32","type":"integer"},"page":{"description":"Current page number (1-indexed)","format":"int32","type":"integer"},"pageSize":{"description":"Effective records per page (may be less than requested if auto-capped)","format":"int32","type":"integer"},"paginationToken":{"description":"HMAC-signed token for follow-up pages (provides free billing and cached counts)","type":"string"},"totalPages":{"description":"Total number of pages available at the current pageSize","format":"int32","type":"integer"},"totalRecords":{"description":"Total records matching the query","format":"int32","type":"integer"}},"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":{"fromDate":{"type":"string"},"roleCode":{"type":"string"},"roleName":{"type":"string"}},"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":"Get engagements for person\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":"Engagements","version":"3.0","x-logo":{"url":"https://assets.roaring.io/svg/engagements-v3.1.svg"}},"openapi":"3.0.1","paths":{"/{personalNumber}":{"get":{"description":"AsOfDate supported","operationId":"view","parameters":[{"description":"Person identification","in":"path","name":"personalNumber","required":true,"schema":{"type":"string"}},{"description":"Date on format yyyy-mm-dd","in":"query","name":"asOfDate","schema":{"type":"string"}},{"description":"Include engagements with roleCodes","explode":true,"in":"query","name":"includeWithRoleCode","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Exclude engagements with roleCodes","explode":true,"in":"query","name":"excludeWithRoleCode","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Include roles with roleCodes","explode":true,"in":"query","name":"includeRoleCode","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Exclude roles with roleCodes","explode":true,"in":"query","name":"excludeRoleCode","schema":{"items":{"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementsResult"}}},"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 engagements for person","tags":["Engagements"]}},"/history/{personalNumber}":{"get":{"description":"Changes of the person's engagements within specified date range. The range includes \"from\" and excludes \"to\". For persons with large histories (e.g., accountants with 500+ engagement versions), non-paginated requests will return 400 — use pagination parameters (page, pageSize) to retrieve results in pages.","operationId":"history","parameters":[{"description":"Number of person","in":"path","name":"personalNumber","required":true,"schema":{"type":"string"}},{"description":"beginning of the date range (including), iso 8601 format","in":"query","name":"fromDate","schema":{"type":"string"}},{"description":"ending of the date range (excluding), iso 8601 format","in":"query","name":"toDate","schema":{"type":"string"}},{"description":"Page number (1-indexed). Enables paginated mode.","in":"query","name":"page","schema":{"format":"int32","type":"integer"}},{"description":"Records per page (default 20, max 500). Server may reduce for entities with large records.","in":"query","name":"pageSize","schema":{"format":"int32","type":"integer"}},{"description":"Token from a previous paginated response. Pagination follow-ups are not billed.","in":"query","name":"paginationToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryEngagementsResults"}}},"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 history engagements by personal number","tags":["Engagements"]}}},"security":[{"OAuth2":[]}],"servers":[{"url":"https://api.roaring.io/se/company/engagement/3.0"}],"x-category":"person","x-countries":["se"],"x-id":"Engagements"}