Skip to main content

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-Remaining renvoyé sur chaque réponse

Codes d'erreur

CodeSignification
400Validation échouée
401Token invalide ou expiré
403Permission insuffisante
404Ressource introuvable
409Conflit (ex : doublon)
422Entité non traitable
429Rate limit atteint
500Erreur serveur — contactez le support