{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://api-rc.quinyx.com/v2/opening-hours","description":""}],"paths":{"/groups/{groupId}/opening-hours/{openingHoursId}":{"put":{"tags":["Public API rest endpoint for managing opening hours"],"summary":"Change and update opening hours based on opening hours id","operationId":"updateOpeningHours","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"openingHoursId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHours"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHours"}}}}}},"delete":{"tags":["Public API rest endpoint for managing opening hours"],"summary":"Delete opening hours based on opening hours id","operationId":"deleteOpeningHours","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"openingHoursId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/groups/{groupId}/opening-hours":{"get":{"tags":["Public API rest endpoint for managing opening hours"],"summary":"Get opening hours based on groupId","operationId":"getOpeningHours","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OpeningHours"}}}}}}},"post":{"tags":["Public API rest endpoint for managing opening hours"],"summary":"Create opening hours","operationId":"createOpeningHours","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHours"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpeningHours"}}}}}}},"/groups/{groupId}/open-periods":{"get":{"tags":["Public API rest endpoint for managing opening hours"],"summary":"Get open periods","operationId":"getOpeningHoursPeriods","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"periodStart","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"periodEnd","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OpenPeriod"}}}}}}}}},"components":{"schemas":{"LocalTime":{"type":"object","properties":{"hour":{"type":"integer","format":"int32"},"minute":{"type":"integer","format":"int32"},"second":{"type":"integer","format":"int32"},"nano":{"type":"integer","format":"int32"}},"example":"14:00"},"OpeningHours":{"required":["startDate","type","weekdayHours"],"type":"object","properties":{"groupId":{"type":"integer","format":"int32"},"name":{"maxLength":50,"minLength":0,"type":"string"},"startDate":{"type":"string","format":"date","example":"2023-03-15"},"endDate":{"type":"string","format":"date","example":"2023-04-20"},"type":{"type":"string","example":"STANDARD","enum":["STANDARD","SPECIAL","STANDARD, SPECIAL"]},"weekdayHours":{"type":"array","items":{"$ref":"#/components/schemas/WeekdayHours"}}}},"WeekdayHours":{"required":["endTime","open","startTime","weekday"],"type":"object","properties":{"weekday":{"type":"string","example":"1","enum":["0","1","2","3","4","5","6","0, 1, 2, 3, 4, 5, 6"]},"startTime":{"$ref":"#/components/schemas/LocalTime"},"endTime":{"$ref":"#/components/schemas/LocalTime"},"open":{"type":"boolean","example":true,"enum":[false]}}},"OpenPeriod":{"required":["close","open"],"type":"object","properties":{"open":{"type":"string","format":"date-time"},"close":{"type":"string","format":"date-time"}}}}}}