API SynHR
Base URL : https://app.synhr.ch/api/v1
Heures
POST /timesheets
{
"user_id": "u_42",
"date": "2026-05-11",
"entries": [
{ "start": "08:30", "end": "12:00", "category": "normal" },
{ "start": "13:00", "end": "17:30", "category": "normal" }
]
}
Congés
POST /leaves
{
"user_id": "u_42",
"type": "vacation",
"start_date": "2026-07-01",
"end_date": "2026-07-14"
}
Export Crésus
GET /exports/cresus?period=2026-05&format=csv
Réponse : flux CSV au format d'import natif Crésus Salaires.
Rate limiting
- 600 req/min par token
- Header
X-RateLimit-Remainingrenvoyé sur chaque réponse
Codes d'erreur
| Code | Signification |
|---|---|
| 400 | Validation échouée |
| 401 | Token invalide ou expiré |
| 403 | Permission insuffisante |
| 404 | Ressource introuvable |
| 409 | Conflit (ex : doublon) |
| 422 | Entité non traitable |
| 429 | Rate limit atteint |
| 500 | Erreur serveur — contactez le support |