{"openapi":"3.1.0","info":{"title":"AbaNinja Time Tracking API - Closures","version":"3.0.0","x-domain-id":"time-tracking"},"servers":[{"url":"https://api.abaninja.ch","description":"The AbaNinja API server"}],"tags":[{"name":"time-tracking-closures","description":"Manage time tracking closures","x-displayName":"Closures"}],"security":[{"ApiToken":[]}],"paths":{"/accounts/{accountUuid}/time/v2/employees/{employeeUuid}/closures":{"get":{"tags":["time-tracking-closures"],"summary":"Get closures","description":"Get all closures of an employee","operationId":"time_list_closures","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"employeeUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"type":"array","items":{"title":"Employee Closure Resource","properties":{"uuid":{"type":"string","format":"uuid"},"accountUuid":{"type":"string","format":"uuid"},"employeeUuid":{"type":"string","format":"uuid"},"closureDate":{"type":"string","format":"date"},"holidays":{"type":"number"},"holidayCorrection":{"type":"number"},"flextime":{"type":"number"},"timeCorrection":{"type":"number"},"shortWork":{"type":"number"},"deleteable":{"type":"boolean","deprecated":true},"deletable":{"type":"boolean"}},"type":"object"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/time-tracking"]}],"x-legacy-operation-id":"85c97f27f491d63cbb761373072b6701","x-required-scopes":["time-tracking"]},"post":{"tags":["time-tracking-closures"],"summary":"Add closure","description":"Add a closure for an employee","operationId":"time_create_closures","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"employeeUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Add closure","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/time-employee-closure.schema.json","description":"A Schema for creating timetracking employee closure in AbaNinja over API","type":"object","properties":{"closureDate":{"type":"string","format":"date"}},"required":["closureDate"]}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":201},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/time-tracking"]}],"x-legacy-operation-id":"da5c485516fddb0314f6ed09b4899cc6","x-required-scopes":["time-tracking"]}},"/accounts/{accountUuid}/time/v2/employees/{employeeUuid}/closures/{closureUuid}":{"delete":{"tags":["time-tracking-closures"],"summary":"Delete closure","description":"Delete a closure for an employee","operationId":"time_delete_closures","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"employeeUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"closureUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Successful response"},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/time-tracking"]}],"x-legacy-operation-id":"00570eda9902bbe79c217c65a6a5533e","x-required-scopes":["time-tracking"]}},"/accounts/{accountUuid}/time/v2/employees/{employeeUuid}/closures/last-closure-date":{"get":{"tags":["time-tracking-closures"],"summary":"Get last closure date","description":"Get the date of the last closure of an employee","operationId":"time_list_last_closure_date","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"employeeUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Last Employee Closure Resource","properties":{"timeTrackingStart":{"type":["string","null"],"format":"date"},"lastClosureDate":{"type":["string","null"],"format":"date"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/time-tracking"]}],"x-legacy-operation-id":"259b7587df2456c8a89dc25f5026b92f","x-required-scopes":["time-tracking"]}}},"components":{"securitySchemes":{"ApiToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Create tokens in Settings > API Token."}}}}