{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://api.quinyx.com/v2/statistics","description":""}],"paths":{"/standard-variables":{"post":{"tags":["Public API REST endpoint for managing standard variables in Statistics"],"summary":"Fetches standard variables from the statistics service.","operationId":"getStatistics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedStatisticsRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Statistic"}}}}}}}},"/groups/{groupId}/ai-scheduled-headcount/{shiftTypeId}":{"get":{"tags":["Public API REST endpoint for managing ai scheduled headcount"],"summary":"Fetches ai scheduled headcount. The requested period must not exceed 120 days","operationId":"getScheduledHeadcountSnapshot","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"shiftTypeId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/HeadCount"}}}}}}}},"components":{"schemas":{"AdvancedStatisticsRequest":{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"integer","format":"int32"}},"period":{"$ref":"#/components/schemas/StatisticsPeriod"},"variables":{"type":"array","items":{"type":"string","enum":["scheduled-hours","worked-hours","leave-hours","optimal-hours","forecast-hours","forecast-sales","actual-sales","actual-staff-cost","forecast-staff-cost","base-schedule-hours","productive-hours","kpi-scheduled-hours","kpi-scheduled-hours-excl-ut","kpi-worked-hours","scheduled-staff-cost","scheduled-staff-cost-excluding-absences","scheduled-hours-excluding-absences","worked-hours-excluding-absences","expected-staff-cost","scheduled-break-hours","punched-break-hours","base-schedule-cost","expected-kpi-scheduled-hours","expected-kpi-worked-hours"]}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filter"}},"baseScheduleData":{"$ref":"#/components/schemas/BaseScheduleData"},"baseScheduleIds":{"type":"array","items":{"type":"string"}},"displayItems":{"type":"array","items":{"type":"string","enum":["people","shifts","tasks","punches","absences"]}},"statisticsFilterTypes":{"type":"string","writeOnly":true,"enum":["and","or"]},"people-filter-type":{"type":"string","enum":["and","or"]},"shifts-filter-type":{"type":"string","enum":["and","or"]},"tasks-filter-type":{"type":"string","enum":["and","or"]},"punches-filter-type":{"type":"string","enum":["and","or"]},"absences-filter-type":{"type":"string","enum":["and","or"]}}},"BaseScheduleData":{"type":"object","properties":{"baseScheduleId":{"type":"string"},"dayIndex":{"type":"integer","format":"int32"}}},"Filter":{"type":"object","properties":{"name":{"type":"string","enum":["employee","employee-skill","employee-section","employee-unit","staff-category","shift-type","shift-status","section","shift-id","task-status","task-type","task-section","punch-type","punch-id","absence-type","absence-shift-id","attest-status","absence-attest-status","punch-attest-status","tag-ids","agreement","base-schedule"]},"values":{"type":"array","items":{"type":"integer","format":"int32"}}}},"StatisticsPeriod":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"aggregation-type":{"type":"string","enum":["m","H","D","W","M"]},"aggregation-value":{"type":"integer","format":"int32"}}},"Statistic":{"type":"object","properties":{"variable":{"type":"string","enum":["scheduled-hours","worked-hours","leave-hours","optimal-hours","forecast-hours","forecast-sales","actual-sales","actual-staff-cost","forecast-staff-cost","base-schedule-hours","productive-hours","kpi-scheduled-hours","kpi-scheduled-hours-excl-ut","kpi-worked-hours","scheduled-staff-cost","scheduled-staff-cost-excluding-absences","scheduled-hours-excluding-absences","worked-hours-excluding-absences","expected-staff-cost","scheduled-break-hours","punched-break-hours","base-schedule-cost","expected-kpi-scheduled-hours","expected-kpi-worked-hours"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/StatisticPeriodValue"}},"total-value":{"type":"number","format":"double"}}},"StatisticPeriodValue":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"value":{"type":"number","format":"double"},"employeeId":{"type":"integer","format":"int32"}}},"HeadCount":{"type":"object","properties":{"variable":{"type":"string"},"resolution":{"type":"integer","format":"int32"},"values":{"type":"array","items":{"$ref":"#/components/schemas/StatisticPeriodValue"}},"total-value":{"type":"number","format":"double"}}}}}}