Organisation
API & webhooks
Subscribe to the platform's events into your own systems and manage the federation's machine clients (M2M OAuth2). Outgoing calls are always signed; failed deliveries are retried with exponential backoff (max 5 attempts, 10 s × n²).
| Subscription | Endpoint URL | Events | Status | Latest delivery |
|---|---|---|---|---|
| Results → federation site | https://skanebf.se/hooks/petanque | result.published, ranking.updated | active | 2 min ago · 200 OK |
| Licences → member system | https://medlem.skanebf.se/api/hook | license.issued, license.transferred | active | 1 h ago · 200 OK |
| Competitions → calendar partner | https://kalender.nordvik.example/in | competition.created, competition.completed | auto-disabled | 8 errors in a row · 24 h 100% errors |
| Sanctions → integrity partner | https://integrity.betline.example/wh | sanction.created | paused | 3 d ago · 200 OK |
Actions per row: test (sends a test event) · pause/resume · rotate secret · delete. Auto-disabled = 24 h with 100% errors (too_many_failures) — reactivate after fixing.
| Event | Description |
|---|---|
| competition.created | New competition published in the calendar |
| competition.completed | Competition completed, final results locked |
| result.published | Results published (per round/final) |
| license.issued | New licence issued |
| license.transferred | Licence moved between clubs |
| ranking.updated | Ranking list recomputed |
| sanction.created | New sanction registered (integrity flow) |
| Time | Subscription | Event | Attempts | Responses | Status | |
|---|---|---|---|---|---|---|
| 09:41:12 | Results → federation site | result.published | 1/5 | 200 OK · 84 ms | delivered | |
| 09:38:55 | Licences → member system | license.issued | 1/5 | 200 OK · 122 ms | delivered | |
| 09:31:02 | Competitions → calendar partner | competition.created | 5/5 | 503 · timeout | DLQ | |
| 09:12:47 | Results → federation site | ranking.updated | 2/5 | 200 OK · 91 ms (after retry 10 s) | delivered | |
| 08:58:20 | Sanctions → integrity partner | sanction.created | — | paused subscription | skipped |
Retry: exponential backoff (base 30 s, up to 8 attempts in the developer flow, 5 in the standard flow). After exhausted attempts
the delivery lands in the DLQ. Replay resends with the header X-Petanque-Replay-Of so the recipient can
deduplicate. Endpoints are auto-disabled after 24 h with 100% errors.
At rotation, deliveries are signed with both the old and new secret for 24 h.
The overlay lets a partner prove the event's authenticity to a third party without knowing the shared HMAC secret.
| Client | Client id | Scopes | Rate limit | IP allowlist (CIDR) | Status |
|---|---|---|---|---|---|
| Member system Nordvik | m2m_5f8a…c2 | members:read, licenses:read | 600 req/min | 193.14.88.0/24 | active |
| Results TV (arena) | m2m_9b1d…e7 | results:read, live-scoring:read | 1 200 req/min | — | active |
| Legacy import (one-off) | m2m_2c4f…a9 | imports:write | 100 req/min | 10.0.40.0/28 | blocked |
Token issuance: POST /auth/m2m/token (OAuth2 client credentials, RFC 6749 §4.4) → ES512 JWT. Secrets are hashed (SHA-256) and can be rotated without interruption.
Public data (rankings, results, calendar, venue directory) requires no client — third-party developers self-serve keys, sandbox and data products in the developer portal (developer.petanque.life).