Repository navigation
API Reference
Simone Di Mambro edited this page Oct 10, 2026
·
8 revisions
Base path /api/v1, JSON. Authentication: Authorization: Bearer <token> obtained from POST /auth/login. Errors: {"error":"message"} with a meaningful HTTP status (400, 401, 403, 404, 409, 429, 502).
-
GET /setup→{needsSetup, version, push, publicUrl} -
POST /setup{username, password, displayName, mywellness?: {username, password, facilityUrl, maxBookings}}→{token, user, profile?, profileError?}(only while no users exist) -
POST /auth/login{username, password, deviceName, selfOnly}→{token, user, version, push, selfOnly}; withselfOnly: truethe device sees only the person's own profile even if admin (the iOS app always sends it); 5 failures per IP → 15 min lockout (429) -
POST /auth/logout,GET /me→{user, device, version, push, myProfileId},POST /me/password{oldPassword, newPassword} -
POST /devices/apns{token}registers the APNs token of the calling device;POST /devices/test-notification
-
DELETE /items/{id}(?rule=1for the recurrence) → removes the tracked class and cancels it on mywellness (unbook if booked, leave the waiting list if waiting); returns{ok, removed, unbooked[], leftWaitingList[], errors[]}. Classes whose cancellation fails are kept. -
GET /settings→ the caller's effective settings pluscustom(true when the user has personal settings);?scope=default(admin) → the defaults.PUT /settingssaves the caller's personal settings (?scope=default, admin: the defaults).DELETE /settingsremoves the personal settings (back to defaults). -
POST /profileswith{facilityUrl, maxBookings, copyFromProfileId}→ adds another club for the mywellness account of profilecopyFromProfileId(credentials, owner and visibility copied; label defaults to " · "). -
GET /profiles→ visible profiles (id, label, username, displayName, firstName, lastName, nickName, email, pictureUrl, thumbUrl, identity, facilityUrl, facilityId, facilityName, maxBookings, ownerUserIds, lastLoginAt, lastLoginError, activeBookings, limits);identityis the mywellnessuserContextobject as returned at login (tokens and passwords removed);cardis its normalized form (fullName, nickName, email, gender, birthDate, culture, measurementSystem, memberSince, timeZoneWindowsId, userId, extra) for readable profile pages -
POST /profiles{label, username, password, facilityUrl, maxBookings, private, mine, userId}— verifies the mywellness login before saving;mine: truemakes it the caller's own profile,userId(admin) assigns it to another user -
PUT /profiles/{id}{label?, password?, maxBookings?, private?},DELETE /profiles/{id},POST /profiles/{id}/relogin -
GET /profiles/{id}/classes?q=&refresh=1→ schedule for the next daysAhead days: upstream fields plusstart,end,opensOn,tracked(item, if any) -
GET /profiles/{id}/bookings?refresh=1→ future classes withisParticipant=true(booked by the gateway or on mywellness) -
POST /profiles/{id}/unbook{classId, partitionDate}→ cancels on mywellness (409 with a message when too late, i.e. less than 2 hours before); a tracked item becomescancelled -
POST /profiles/{id}/leave-waiting-list{classId, partitionDate, removeItem}→ leaves the mywellness waiting list; the tracked item becomescancelled(or is removed withremoveItem: true)
-
GET /items?profile=;POST /items{profileId, classId, partitionDate, recurring};DELETE /items/{id}?rule=1(also stop the weekly rule) ;POST /items/{id}/retry - Item:
id, profileId, classId, partitionDate, name, start, end, room, trainer, pictureUrl, serverOpensOn, fireAt, recurring, state, lastMessage, lastCheck, attempts, bookedAt, availablePlaces, maxParticipants - States:
pending, bursting, watching, waitingList, booked, failed, expired, cancelled
-
GET /settings,PUT /settings(admin),GET /log?profile=&limit=,GET /status
-
GET /users(withprofileId/profileLabelof the person's own profile),PUT /users/{id}{username?, displayName?, isAdmin?, password?},POST /users{username, password, displayName, isAdmin, mywellness?}(creates the person's own profile too),DELETE /users/{id},POST /users/{id}/password,GET /devices,DELETE /devices/{id}
wellness-gateway