{"openapi":"3.0.3","info":{"title":"API Qorha v1","version":"1.0.0","description":"API REST du SIRH Qorha. Authentification par token d\u0027organisation (header `Authorization: Bearer qorha_\u2026`), cr\u00e9\u00e9 dans Gestion de l\u0027application \u2192 Tokens d\u0027API. Chaque token porte des scopes par module (lecture\/\u00e9criture). Limite : 300 requ\u00eates \/ 5 minutes par token. Les champs chiffr\u00e9s (nir, iban, bic) ne sont renvoy\u00e9s qu\u0027avec le scope \u00ab sensitive: read \u00bb. Erreurs normalis\u00e9es : `{\u0022error\u0022: {\u0022code\u0022, \u0022message\u0022, \u0022details\u0022}}`."},"servers":[{"url":"\/","description":"Ce serveur"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"employees","description":"Salari\u00e9s"},{"name":"contracts","description":"Contrats de travail"},{"name":"leaves","description":"Absences et soldes"},{"name":"timesheets","description":"Feuilles de temps"},{"name":"shifts","description":"Planning (cr\u00e9neaux)"},{"name":"trainings","description":"Formations"},{"name":"medical-visits","description":"Visites m\u00e9dicales"},{"name":"documents","description":"Documents (m\u00e9tadonn\u00e9es)"},{"name":"clockings","description":"Pointages (badgeuse)"},{"name":"referentials","description":"R\u00e9f\u00e9rentiels"}],"paths":{"\/api\/v1\/employees":{"get":{"tags":["employees"],"summary":"Lister les salari\u00e9s","description":"Scope requis : employees: read.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"status","in":"query","schema":{"type":"string","enum":["active","exited"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Recherche nom\/pr\u00e9nom\/email"},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Employee"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}},"post":{"tags":["employees"],"summary":"Cr\u00e9er un salari\u00e9","description":"Scope requis : employees: write. Champs obligatoires : first_name, last_name.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/EmployeeWrite"}}}},"responses":{"201":{"description":"Cr\u00e9\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Employee"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"}}}},"\/api\/v1\/employees\/{id}":{"get":{"tags":["employees"],"summary":"D\u00e9tail d\u0027un salari\u00e9","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ressource","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Employee"}}}}}},"404":{"$ref":"#\/components\/schemas\/Error404"}}},"patch":{"tags":["employees"],"summary":"Modifier un salari\u00e9","description":"","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/EmployeeWrite"}}}},"responses":{"200":{"description":"Modifi\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Employee"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"},"404":{"$ref":"#\/components\/schemas\/Error404"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"\/api\/v1\/contracts":{"get":{"tags":["contracts"],"summary":"Lister les contrats","description":"Scope requis : contracts: read.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"employee_id","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contract"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}},"post":{"tags":["contracts"],"summary":"Cr\u00e9er un contrat","description":"Scope requis : contracts: write. Champs obligatoires : employee_id, contract_type.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContractWrite"}}}},"responses":{"201":{"description":"Cr\u00e9\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Contract"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"}}}},"\/api\/v1\/contracts\/{id}":{"get":{"tags":["contracts"],"summary":"D\u00e9tail d\u0027un contrat","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ressource","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Contract"}}}}}},"404":{"$ref":"#\/components\/schemas\/Error404"}}},"patch":{"tags":["contracts"],"summary":"Modifier un contrat","description":"","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContractWrite"}}}},"responses":{"200":{"description":"Modifi\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Contract"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"},"404":{"$ref":"#\/components\/schemas\/Error404"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"\/api\/v1\/leave-requests":{"get":{"tags":["leaves"],"summary":"Lister les demandes d\u0027absence","description":"Scope requis : leaves: read.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"employee_id","in":"query","schema":{"type":"integer"}},{"name":"status","in":"query","schema":{"type":"string","enum":["soumise","validee","refusee","annulee"]}}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/LeaveRequest"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}},"post":{"tags":["leaves"],"summary":"Cr\u00e9er une demande d\u0027absence","description":"Scope requis : leaves: write. D\u00e9compte des jours et contr\u00f4le de chevauchement appliqu\u00e9s (m\u00eames r\u00e8gles que l\u0027interface).","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/LeaveRequestWrite"}}}},"responses":{"201":{"description":"Cr\u00e9\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/LeaveRequest"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"}}}},"\/api\/v1\/leave-requests\/{id}":{"get":{"tags":["leaves"],"summary":"D\u00e9tail d\u0027une demande","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ressource","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/LeaveRequest"}}}}}},"404":{"$ref":"#\/components\/schemas\/Error404"}}},"patch":{"tags":["leaves"],"summary":"Valider ou refuser une demande","description":"Scope requis : leaves: write. `{\u0022status\u0022: \u0022validee\u0022}` ou `{\u0022status\u0022: \u0022refusee\u0022, \u0022refusal_reason\u0022: \u0022\u2026\u0022}` sur une demande \u00ab soumise \u00bb. La validation impute le solde.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/LeaveDecisionWrite"}}}},"responses":{"200":{"description":"Modifi\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/LeaveRequest"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"},"404":{"$ref":"#\/components\/schemas\/Error404"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"\/api\/v1\/leave-balances":{"get":{"tags":["leaves"],"summary":"Soldes d\u0027absence d\u0027un salari\u00e9","description":"Scope requis : leaves: read. Param\u00e8tre employee_id obligatoire.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"employee_id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/LeaveBalance"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}}},"\/api\/v1\/timesheets":{"get":{"tags":["timesheets"],"summary":"Lister les feuilles de temps","description":"Scope requis : timesheets: read. Lecture seule.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"employee_id","in":"query","schema":{"type":"integer"}},{"name":"year","in":"query","schema":{"type":"integer"}},{"name":"week","in":"query","schema":{"type":"integer"},"description":"Semaine ISO (avec year)"}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Timesheet"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}}},"\/api\/v1\/timesheets\/{id}":{"get":{"tags":["timesheets"],"summary":"D\u00e9tail d\u0027une feuille de temps","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ressource","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Timesheet"}}}}}},"404":{"$ref":"#\/components\/schemas\/Error404"}}}},"\/api\/v1\/shifts":{"get":{"tags":["shifts"],"summary":"Lister les cr\u00e9neaux de planning","description":"Scope requis : shifts: read.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"employee_id","in":"query","schema":{"type":"integer"}},{"name":"week","in":"query","schema":{"type":"string","format":"date"},"description":"Lundi de la semaine (AAAA-MM-JJ, toute date de la semaine est accept\u00e9e)"},{"name":"date_from","in":"query","schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date"}},{"name":"status","in":"query","schema":{"type":"string","enum":["brouillon","publie"]}},{"name":"site","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Shift"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}},"post":{"tags":["shifts"],"summary":"Cr\u00e9er un cr\u00e9neau (brouillon)","description":"Scope requis : shifts: write. Champs obligatoires : employee_id, date, start_time, end_time. Toujours cr\u00e9\u00e9 en \u00ab brouillon \u00bb (la publication reste hebdomadaire, via l\u0027interface). Conflits bloquants (salari\u00e9 sorti, absence valid\u00e9e, chevauchement, repos 11 h) \u2192 422 code `conflict` (details = liste de messages). Avertissements de dur\u00e9e (\u003E 10 h\/jour, \u003E 48 h\/semaine) accept\u00e9s par d\u00e9faut, refus\u00e9s en 422 si `\u0022strict\u0022: true`.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ShiftWrite"}}}},"responses":{"201":{"description":"Cr\u00e9\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Shift"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"}}}},"\/api\/v1\/shifts\/{id}":{"get":{"tags":["shifts"],"summary":"D\u00e9tail d\u0027un cr\u00e9neau","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ressource","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Shift"}}}}}},"404":{"$ref":"#\/components\/schemas\/Error404"}}},"patch":{"tags":["shifts"],"summary":"Modifier un cr\u00e9neau","description":"Scope requis : shifts: write. M\u00eames contr\u00f4les de conflits que la cr\u00e9ation (`conflict`, `strict`). Modifier un cr\u00e9neau PUBLI\u00c9 dans la fen\u00eatre du d\u00e9lai de pr\u00e9venance exige un motif `\u0022reason\u0022` (10 caract\u00e8res minimum) \u2192 sinon 422 code `derogation_required`. La d\u00e9rogation est trac\u00e9e (audit + journal des modifications post-publication).","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ShiftWrite"}}}},"responses":{"200":{"description":"Modifi\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Shift"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"},"404":{"$ref":"#\/components\/schemas\/Error404"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"\/api\/v1\/trainings":{"get":{"tags":["trainings"],"summary":"Lister les formations","description":"Scope requis : trainings: read.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"employee_id","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Training"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}},"post":{"tags":["trainings"],"summary":"Cr\u00e9er une formation","description":"Scope requis : trainings: write. Champs obligatoires : employee_id, title.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/TrainingWrite"}}}},"responses":{"201":{"description":"Cr\u00e9\u00e9","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Training"}}}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"}}}},"\/api\/v1\/trainings\/{id}":{"get":{"tags":["trainings"],"summary":"D\u00e9tail d\u0027une formation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ressource","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Training"}}}}}},"404":{"$ref":"#\/components\/schemas\/Error404"}}}},"\/api\/v1\/medical-visits":{"get":{"tags":["medical-visits"],"summary":"Lister les visites m\u00e9dicales","description":"Scope requis : medical_visits: read. Les notes m\u00e9dicales (chiffr\u00e9es) ne sont jamais expos\u00e9es.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"employee_id","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/MedicalVisit"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}}},"\/api\/v1\/medical-visits\/{id}":{"get":{"tags":["medical-visits"],"summary":"D\u00e9tail d\u0027une visite","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ressource","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/MedicalVisit"}}}}}},"404":{"$ref":"#\/components\/schemas\/Error404"}}}},"\/api\/v1\/documents":{"get":{"tags":["documents"],"summary":"Lister les documents (m\u00e9tadonn\u00e9es uniquement)","description":"Scope requis : documents: read. Jamais le contenu du fichier.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"},{"name":"employee_id","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Document"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}}},"\/api\/v1\/clockings":{"post":{"tags":["clockings"],"summary":"Pousser des pointages badgeuse","description":"Scope requis : clockings: write. Corps : un pointage unique {badge_id, date, start_time?, end_time?, total_hours?} ou un lot {\u0022clockings\u0022: [...]} (500 max). Chaque pointage alimente le jour correspondant de la feuille de temps du salari\u00e9 (rattachement par le matricule badgeuse de sa fiche), avec la source \u00ab badgeuse \u00bb. Anomalies rejet\u00e9es ligne par ligne : matricule inconnu, date invalide, plus de 24 h\/jour, chevauchement le m\u00eame jour, semaine d\u00e9j\u00e0 valid\u00e9e (jamais \u00e9cras\u00e9e).","requestBody":{"required":true,"content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/ClockingWrite"},{"type":"object","required":["clockings"],"properties":{"clockings":{"type":"array","maxItems":500,"items":{"$ref":"#\/components\/schemas\/ClockingWrite"}}}}]}}}},"responses":{"200":{"description":"R\u00e9sultat de l\u0027import","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ClockingResult"}}}},"403":{"$ref":"#\/components\/schemas\/Error403"},"422":{"$ref":"#\/components\/schemas\/Error422"}}}},"\/api\/v1\/absence-types":{"get":{"tags":["referentials"],"summary":"Types d\u0027absence","description":"Scope requis : absence_types: read.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/AbsenceType"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}}},"\/api\/v1\/users":{"get":{"tags":["referentials"],"summary":"Utilisateurs de l\u0027organisation","description":"Scope requis : users: read (lecture seule, toujours).","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"}],"responses":{"200":{"description":"Liste pagin\u00e9e","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/User"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"401":{"$ref":"#\/components\/schemas\/Error401"},"403":{"$ref":"#\/components\/schemas\/Error403"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"qorha_ + 40 caract\u00e8res hexad\u00e9cimaux"}},"parameters":{"page":{"name":"page","in":"query","schema":{"type":"integer","default":1},"description":"Num\u00e9ro de page"},"per_page":{"name":"per_page","in":"query","schema":{"type":"integer","default":25,"maximum":100},"description":"\u00c9l\u00e9ments par page (max 100)"}},"schemas":{"Meta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}}},"Error401":{"description":"Non authentifi\u00e9 (token manquant, inconnu, r\u00e9voqu\u00e9 ou expir\u00e9)","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true}}}}},"Error403":{"description":"Scope insuffisant (code forbidden_scope)","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true}}}}},"Error404":{"description":"Ressource introuvable (ou hors de votre organisation)","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true}}}}},"Error422":{"description":"Validation \u00e9chou\u00e9e : details = {champ: message}","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","nullable":true}}}}},"Employee":{"type":"object","properties":{"id":{"type":"integer"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","nullable":true},"email_pro":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"birth_date":{"type":"string","format":"date","nullable":true},"sex":{"type":"string","enum":["M","F"],"nullable":true},"nationality":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"hire_date":{"type":"string","format":"date","nullable":true},"exit_date":{"type":"string","format":"date","nullable":true},"status":{"type":"string","enum":["active","exited"]},"job_title":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"badge_id":{"type":"string","nullable":true,"description":"Matricule badgeuse externe (unique par organisation)"},"nir":{"type":"string","nullable":true,"description":"Uniquement avec scope sensitive: read"},"iban":{"type":"string","nullable":true,"description":"Uniquement avec scope sensitive: read"},"bic":{"type":"string","nullable":true,"description":"Uniquement avec scope sensitive: read"},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}}},"EmployeeWrite":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","nullable":true},"email_pro":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"birth_date":{"type":"string","format":"date","nullable":true},"sex":{"type":"string","enum":["M","F"],"nullable":true},"nationality":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"hire_date":{"type":"string","format":"date","nullable":true},"exit_date":{"type":"string","format":"date","nullable":true},"job_title":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"badge_id":{"type":"string","nullable":true,"description":"Matricule badgeuse externe (unique par organisation)"},"notes":{"type":"string","nullable":true}},"description":"nir\/iban\/bic ne sont pas modifiables par l\u0027API"},"Contract":{"type":"object","properties":{"id":{"type":"integer"},"employee_id":{"type":"integer"},"contract_type":{"type":"string","enum":["CDI","CDD","Interim","Stage"]},"cadre":{"type":"boolean"},"pay_type":{"type":"string","enum":["hourly","monthly"],"nullable":true},"hourly_rate":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"monthly_gross":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"hours_per_week":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"work_time_mode":{"type":"string"},"forfait_days":{"type":"integer","nullable":true},"days_per_week":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"duration_value":{"type":"integer","nullable":true},"duration_unit":{"type":"string","enum":["weeks","months"],"nullable":true},"reason":{"type":"string","nullable":true},"position_label":{"type":"string","nullable":true},"coefficient":{"type":"string","nullable":true},"job_title":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"site_label":{"type":"string","nullable":true},"start_date":{"type":"string","format":"date","nullable":true},"end_date":{"type":"string","format":"date","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}}},"ContractWrite":{"type":"object","properties":{"employee_id":{"type":"integer"},"contract_type":{"type":"string","enum":["CDI","CDD","Interim","Stage"]},"cadre":{"type":"boolean"},"pay_type":{"type":"string","nullable":true},"hourly_rate":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"monthly_gross":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"hours_per_week":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"work_time_mode":{"type":"string","nullable":true},"forfait_days":{"type":"integer","nullable":true},"days_per_week":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"duration_value":{"type":"integer","nullable":true},"duration_unit":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true},"position_label":{"type":"string","nullable":true},"coefficient":{"type":"string","nullable":true},"job_title":{"type":"string","nullable":true},"department":{"type":"string","nullable":true},"site_label":{"type":"string","nullable":true},"start_date":{"type":"string","format":"date","nullable":true},"end_date":{"type":"string","format":"date","nullable":true}}},"LeaveRequest":{"type":"object","properties":{"id":{"type":"integer"},"employee_id":{"type":"integer"},"absence_type":{"$ref":"#\/components\/schemas\/TypeRef"},"start_date":{"type":"string","format":"date","nullable":true},"end_date":{"type":"string","format":"date","nullable":true},"start_afternoon":{"type":"boolean"},"end_morning":{"type":"boolean"},"days_count":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"status":{"type":"string","enum":["soumise","validee","refusee","annulee"]},"comment":{"type":"string","nullable":true},"refusal_reason":{"type":"string","nullable":true},"decided_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}}},"LeaveRequestWrite":{"type":"object","required":["employee_id","absence_type_id","start_date","end_date"],"properties":{"employee_id":{"type":"integer"},"absence_type_id":{"type":"integer"},"start_date":{"type":"string","format":"date","nullable":true},"end_date":{"type":"string","format":"date","nullable":true},"start_afternoon":{"type":"boolean"},"end_morning":{"type":"boolean"},"comment":{"type":"string","nullable":true}}},"LeaveDecisionWrite":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["validee","refusee"]},"refusal_reason":{"type":"string","nullable":true,"description":"Obligatoire si refus"}}},"LeaveBalance":{"type":"object","properties":{"id":{"type":"integer"},"employee_id":{"type":"integer"},"absence_type":{"$ref":"#\/components\/schemas\/TypeRef"},"period_start":{"type":"string","format":"date","nullable":true},"period_end":{"type":"string","format":"date","nullable":true},"acquired":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"taken":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"carry_over":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"fractionnement_bonus":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"remaining":{"type":"number"}}},"Timesheet":{"type":"object","properties":{"id":{"type":"integer"},"employee_id":{"type":"integer"},"week_start":{"type":"string","format":"date","nullable":true},"daily_hours":{"type":"array","items":{"type":"number"},"description":"7 valeurs, lundi \u2192 dimanche"},"total_hours":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"status":{"type":"string","enum":["brouillon","validee"]},"notes":{"type":"string","nullable":true},"validated_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true}}},"Shift":{"type":"object","properties":{"id":{"type":"integer"},"employee_id":{"type":"integer"},"date":{"type":"string","format":"date","nullable":true},"start_time":{"type":"string","example":"09:00"},"end_time":{"type":"string","example":"17:00","description":"Une fin \u003C= d\u00e9but se termine le lendemain (nuit)"},"break_minutes":{"type":"integer"},"duration_hours":{"type":"number","description":"Dur\u00e9e travaill\u00e9e : fin - d\u00e9but - pause"},"site":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"status":{"type":"string","enum":["brouillon","publie"]},"published_at":{"type":"string","format":"date-time","nullable":true},"needs_replacement":{"type":"boolean","description":"Cr\u00e9neau publi\u00e9 orphelin (absence valid\u00e9e apr\u00e8s publication)"}}},"ShiftWrite":{"type":"object","required":["employee_id","date","start_time","end_time"],"properties":{"employee_id":{"type":"integer"},"date":{"type":"string","format":"date","nullable":true},"start_time":{"type":"string","example":"09:00"},"end_time":{"type":"string","example":"17:00"},"break_minutes":{"type":"integer","default":0,"maximum":720},"site":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"strict":{"type":"boolean","default":false,"description":"Refuser (422) les avertissements de dur\u00e9e au lieu de les accepter"},"reason":{"type":"string","nullable":true,"description":"PATCH uniquement : motif de d\u00e9rogation (cr\u00e9neau publi\u00e9 dans le d\u00e9lai de pr\u00e9venance)"}}},"Training":{"type":"object","properties":{"id":{"type":"integer"},"employee_id":{"type":"integer"},"training_type":{"$ref":"#\/components\/schemas\/TypeRef"},"title":{"type":"string"},"provider":{"type":"string","nullable":true},"planned_date":{"type":"string","format":"date","nullable":true},"planned_days":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"realized":{"type":"boolean"},"realized_date":{"type":"string","format":"date","nullable":true},"attestation_received":{"type":"boolean"},"is_mandatory":{"type":"boolean"},"cost":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"notes":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}}},"TrainingWrite":{"type":"object","required":["employee_id","title"],"properties":{"employee_id":{"type":"integer"},"title":{"type":"string"},"training_type_id":{"type":"integer","nullable":true},"provider":{"type":"string","nullable":true},"planned_date":{"type":"string","format":"date","nullable":true},"planned_days":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"realized":{"type":"boolean"},"realized_date":{"type":"string","format":"date","nullable":true},"is_mandatory":{"type":"boolean"},"cost":{"type":"string","nullable":true,"description":"D\u00e9cimal s\u00e9rialis\u00e9 en cha\u00eene"},"notes":{"type":"string","nullable":true}}},"MedicalVisit":{"type":"object","properties":{"id":{"type":"integer"},"employee_id":{"type":"integer"},"type_code":{"type":"string","enum":["SMO","SMR","OTHER"]},"scheduled_date":{"type":"string","format":"date","nullable":true},"planned_date":{"type":"string","format":"date","nullable":true},"realized":{"type":"boolean"},"realized_date":{"type":"string","format":"date","nullable":true},"is_exempt":{"type":"boolean"},"reason":{"type":"string","nullable":true},"periodicity_months":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}}},"Document":{"type":"object","properties":{"id":{"type":"integer"},"employee_id":{"type":"integer"},"type":{"$ref":"#\/components\/schemas\/TypeRef"},"label":{"type":"string","nullable":true},"filename":{"type":"string","nullable":true},"size":{"type":"integer","nullable":true,"description":"Octets"},"doc_date":{"type":"string","format":"date","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true}}},"AbsenceType":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"label":{"type":"string"},"category":{"type":"string"},"color":{"type":"string"},"deduct_from_balance":{"type":"boolean"},"requires_proof":{"type":"boolean"},"legal_days":{"type":"integer","nullable":true},"is_active":{"type":"boolean"}}},"User":{"type":"object","properties":{"id":{"type":"integer"},"nom":{"type":"string"},"email":{"type":"string","nullable":true},"roles":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"}}},"ClockingWrite":{"type":"object","required":["badge_id","date"],"properties":{"badge_id":{"type":"string","description":"Matricule badgeuse du salari\u00e9 (champ badge_id de sa fiche)"},"date":{"type":"string","format":"date","description":"Jour du pointage (AAAA-MM-JJ)"},"start_time":{"type":"string","nullable":true,"description":"Heure de d\u00e9but (HH:MM), avec end_time"},"end_time":{"type":"string","nullable":true,"description":"Heure de fin (HH:MM), avec start_time"},"total_hours":{"type":"string","nullable":true,"description":"Total d\u0027heures du jour (\u00ab 7.5 \u00bb ou \u00ab 7:30 \u00bb), alternative \u00e0 d\u00e9but\/fin"}}},"ClockingResult":{"type":"object","properties":{"imported":{"type":"integer","description":"Jours de feuille de temps aliment\u00e9s"},"rejected":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"reason":{"type":"string"}}}},"replaced":{"type":"array","items":{"type":"string"},"description":"Saisies manuelles remplac\u00e9es (semaines non valid\u00e9es)"},"gaps":{"type":"array","items":{"type":"string"},"description":"\u00c9carts vs dur\u00e9e hebdomadaire contractuelle"}}},"TypeRef":{"type":"object","nullable":true,"properties":{"id":{"type":"integer"},"code":{"type":"string","nullable":true},"label":{"type":"string"}}}}}}