{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://populon-api.k8s.yoso.fi","description":"Generated server url"}],"tags":[{"name":"group","description":"Group operations"},{"name":"user","description":"Current user operations"},{"name":"email-verification","description":"Mailbox ownership verification"},{"name":"geocoding","description":"Address suggestion/resolution"},{"name":"helsinki","description":"Helsinki (HKI) registration endpoints"},{"name":"membership","description":"Membership-scoped operations"},{"name":"push-token","description":"Push tokens operations"},{"name":"wards","description":"Guardian ward operations"},{"name":"registration","description":"User registration related endpoints"}],"paths":{"/api/users/{userId}/profile":{"get":{"tags":["user"],"summary":"Get a user's basic profile (trusted service)","description":"Returns the user's basic profile - name, date of birth and guardianship flag - and the user's primary contact information (the contact record flagged as primary). It has no language, timezone or messaging settings. Trusted service-to-service callers only (registration scope): unlike GET /api/user/profile, which only returns the caller's own profile, this reads any user by id.  `contact` is the primary contact record as stored, so that it can be written back unchanged: blank emails and phones and addresses without any value are dropped, but an address without a country is kept. It is `null` only when nothing is left. ","operationId":"getSpecificUserProfile","parameters":[{"name":"userId","in":"path","description":"The user's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"The user's profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicUserProfileResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/BasicUserProfileResponse"}}}},"400":{"description":"Invalid userId path parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"401":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden - caller is not a trusted registration service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No user with the given id exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_s2s_auth":["s2s.registration"]}]},"put":{"tags":["user"],"summary":"Update a user's basic profile (trusted service)","description":"Updates the user's first name, last name and date of birth, and the user's primary contact information (the contact record flagged as primary, created when the user has none). Trusted service-to-service callers only (registration scope).  `contact.phones` is replaced wholesale by whatever list is sent - omitting it, or sending it empty, clears the phones of the primary contact record. `contact.emails` and `contact.addresses` follow the same rule but can never be sent empty (see `UserContactRequest`). Other contact records of the user are not touched.  The guardianship flag, username, password, language, timezone, roles and messaging settings are not part of the request and never change. The guardianship flag is changed only by releasing the guardianship. ","operationId":"updateSpecificUserProfile","parameters":[{"name":"userId","in":"path","description":"The user's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicUserProfileRequest"}}},"required":true},"responses":{"200":{"description":"The profile as written: the values of the request. The address `name` is generated by the database when it is not sent, so only a later GET returns it. ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicUserProfileResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/BasicUserProfileResponse"}}}},"400":{"description":"Invalid userId path parameter, or invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"401":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden - caller is not a trusted registration service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No user with the given id exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_s2s_auth":["s2s.registration"]}]}},"/api/membership/{membershipId}":{"get":{"tags":["membership"],"summary":"Get a membership's profile","description":"Returns a membership's profile: the member's own name, date of birth and roles within this membership's group, their contact information, the parent group and the user account linked to them, when one exists. Caller must be an active member of the membership's own group, and either a group admin or the membership's own linked user. The trusted registration service (`s2s.registration` scope) may also read any person membership.  A member with several contact records gets the one flagged as primary, then the one with the lowest id. The trusted registration service gets that record as stored, so that it can be written back unchanged: blank emails and phones and addresses without any value are dropped, but an address without a country is kept, and `contact` is `null` only when nothing is left. Other callers get the usable part only, see `MembershipProfileResponse`. ","operationId":"getMembershipProfile","parameters":[{"name":"membershipId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Membership profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipProfileResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/MembershipProfileResponse"}}}},"400":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"401":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden - only the trusted registration service and active members of the membership's group who are group admins or the membership's owner may read a profile. ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Membership has not been found, or is a Company/Society membership rather than a person (`MembershipType.MEMBER`) - this endpoint only supports person memberships. ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]},"put":{"tags":["membership"],"summary":"Update a membership's profile","description":"Updates a membership's profile: the member's name, date of birth, guardianship flag, roles within this membership's group, and contact information. The parent group and linked user account are read-only and cannot be changed through this endpoint. Same access rule as the GET above; the trusted registration service counts as a non-admin caller, so it must resend `roles` unchanged.  This is a full replace, not a partial patch: `roles` and `contact.phones` are each replaced wholesale by whatever list is sent - omitting one, or sending it empty, clears everything previously on file for it, rather than leaving it unchanged. `contact.emails` and `contact.addresses` follow the same full-replace rule but can never be sent empty (see `MembershipContactRequest`) - a member must always have at least one email and one address on file after this endpoint touches it. ","operationId":"updateMembershipProfile","parameters":[{"name":"membershipId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipProfileRequestDto"}}},"required":true},"responses":{"200":{"description":"Membership profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipProfileResponse"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/MembershipProfileResponse"}}}},"400":{"description":"Invalid membershipId path parameter, or invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"401":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden - the caller may not update this profile (see the callers allowed to read it above), or `roles` differ from the current ones and the caller is not a group admin: the owner and the registration service may only resend the same `roles`. ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Membership has not been found, or is a Company/Society membership rather than a person (`MembershipType.MEMBER`) - this endpoint only supports person memberships. ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/membership/{membershipId}/feature/{uniqueKey}":{"get":{"tags":["membership"],"summary":"Get a member's date-typed feature value","description":"Returns a member's date-typed value for a group feature, identified by their membership and the feature's unique key within that membership's group. Trusted service-to-service callers only (registration scope) - this is internal renewal- process bookkeeping (membership validity, renewal-requested, anonymization-requested), not general member-facing data. ","operationId":"getMemberFeatureValue","parameters":[{"name":"membershipId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"uniqueKey","in":"path","required":true,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"description":"The member's current value for this feature. `value` is absent when the feature has never been set for this membership. ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberFeatureValueDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/MemberFeatureValueDto"}}}},"400":{"description":"The feature exists but is not date-typed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden - caller is not a trusted registration service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Membership has not been found, or no feature with this unique key exists in its group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]},"put":{"tags":["membership"],"summary":"Set a member's date-typed feature value","description":"Sets (or clears, when `value` is omitted) a member's date-typed value for a group feature. Trusted service-to-service callers only (registration scope), same as the GET above. ","operationId":"setMemberFeatureValue","parameters":[{"name":"membershipId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"uniqueKey","in":"path","required":true,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberFeatureValueDto"}}},"required":true},"responses":{"204":{"description":"Value set successfully"},"400":{"description":"The feature exists but is not date-typed, or the value is not one of the feature's allowed options","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden - caller is not a trusted registration service","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Membership has not been found, or no feature with this unique key exists in its group","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/group/{id}/state":{"put":{"tags":["group"],"summary":"update group state","description":"Update the state of a group","operationId":"updateGroupState","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupStateRequestDto"}}},"required":true},"responses":{"204":{"description":"Group state updated successfully"},"403":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/registration/token/exchange":{"post":{"tags":["email-verification"],"summary":"Exchange verification token for email address","operationId":"exchangeToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenExchangeRequestDto"}}},"required":true},"responses":{"200":{"description":"Token exchanged successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenExchangeResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/TokenExchangeResponseDto"}}}},"400":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}}}},"/api/registration/register":{"post":{"tags":["registration"],"summary":"Register a new user account","operationId":"registerUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegistrationRequestDto"}}},"required":true},"responses":{"201":{"description":"User successfully registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegistrationResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/UserRegistrationResponseDto"}}}},"400":{"description":"Invalid registration data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"409":{"description":"Username already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/push-token":{"post":{"tags":["push-token"],"summary":"Register push notification token","description":"Register a push notification token for the current user's device.","operationId":"registerPushToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushTokenRequestDto"}}},"required":true},"responses":{"201":{"description":"Push token was created successfully."},"401":{"description":"User is not authenticated."}},"security":[{"populon_auth":["openid","profile"]}]},"delete":{"tags":["push-token"],"summary":"Remove push notification token","description":"Remove a push notification token.","operationId":"removePushToken","requestBody":{"content":{"text/plain":{"schema":{"type":"string","maxLength":100,"minLength":0}}},"required":true},"responses":{"204":{"description":"Push token was removed successfully."},"401":{"description":"User is not authenticated."},"404":{"description":"Push token does not exist."}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/group/{id}/feature":{"post":{"tags":["group"],"summary":"Create a new group feature","description":"Endpoint for creating a new feature in a group. A feature is a \"user data template\" defined by a group admin describing additional data collected from group members. Trusted service-to-service callers (registration scope) may also create features here. ","operationId":"createGroupFeature","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupFeatureCreationRequestDto"}}},"required":true},"responses":{"201":{"description":"Group feature successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupFeatureCreationResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/GroupFeatureCreationResponseDto"}}}},"403":{"description":"Forbidden - the authenticated user is not an admin of the group, or a non-registration caller requested a system feature (only a trusted registration service may create one). ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Group has not been found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"409":{"description":"A feature with the same unique key already exists in the group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/group/{id}/contact-information/phone":{"post":{"tags":["group"],"summary":"Create a new group phone contact number","description":"Endpoint for updating group phone contact information","operationId":"createPhone","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneCreationRequestDto"}}},"required":true},"responses":{"201":{"description":"Group phone number successfully created"},"403":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Group has not been found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/group/{id}/contact-information/address":{"post":{"tags":["group"],"summary":"Create a new group address","description":"Endpoint for updating group contact address","operationId":"createAddress","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressCreationRequestDto"}}},"required":true},"responses":{"201":{"description":"Group address successfully created"},"403":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Group has not been found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/group/create":{"post":{"tags":["group"],"summary":"create new group","description":"Endpoint for group creation","operationId":"createGroup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreationRequestDto"}}},"required":true},"responses":{"201":{"description":"Group successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreationResponseDto"}}}},"400":{"description":"Invalid registration data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"409":{"description":"Group name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/geo/suggest":{"post":{"tags":["geocoding"],"summary":"Get address suggestions based on partial input","description":"Returns address suggestions for autocomplete functionality. Uses ArcGIS suggest endpoint internally. ","operationId":"suggestAddresses","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSuggestRequestDto"}}},"required":true},"responses":{"200":{"description":"List of address suggestions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoSuggestResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/GeoSuggestResponseDto"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"503":{"description":"Geocoding service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/geo/resolve-address":{"post":{"tags":["geocoding"],"summary":"Resolve an address suggestion to full address details","description":"Resolves an address text to structured address components with coordinates. Uses ArcGIS findAddressCandidates endpoint internally. Returns only the best matching result.  For best results, pass both text and magicKey from a previous suggest response. The magicKey improves accuracy but text is always required. ","operationId":"resolveAddress","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoResolveRequestDto"}}},"required":true},"responses":{"200":{"description":"Resolved address with coordinates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoResolveResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/GeoResolveResponseDto"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No matching address found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"503":{"description":"Geocoding service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/email-verification/send":{"post":{"tags":["email-verification"],"summary":"Send email address verification","operationId":"sendVerificationEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendVerificationEmailRequestDto"}}},"required":true},"responses":{"202":{"description":"Verification email accepted"},"400":{"description":"Shared response for 4xx, 5xx","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}}}},"/api/group/{id}/descendants":{"get":{"tags":["group"],"summary":"List the groups below a group","description":"Lists the groups below this one, at any depth, each with its own path from the root. A leaf group answers with an empty array. Groups that have quit are left out, the way the rest of Populon reads a hierarchy; no other state is filtered.  Only an administrator of this group or of any group above it may read the list, so the visibility level of a descendant is never resolved. ","operationId":"listGroupDescendants","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"The groups below the requested one","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupDescendantDto"}}},"application/problem+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupDescendantDto"}}}}},"400":{"description":"The group id is not a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"401":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"The caller administers neither this group nor any group above it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"The group does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]},"head":{"tags":["group"],"summary":"Check access to the groups below a group","description":"The same status codes as the GET above, with no body and without loading the descendants, for callers that need only the access decision. ","operationId":"checkGroupDescendantsAccess","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"The caller administers this group or a group above it."},"400":{"description":"The group id is not a number."},"401":{"description":"Request authentication fails."},"403":{"description":"The caller administers neither this group nor any group above it."},"404":{"description":"The group does not exist."}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/wards":{"get":{"tags":["wards"],"summary":"List wards of the authenticated guardian","description":"Returns the active wards linked to the currently authenticated guardian.","operationId":"listWards","responses":{"200":{"description":"List of the guardian's wards","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WardListResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/WardListResponseDto"}}}},"401":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/users/{guardianId}/wards":{"get":{"tags":["wards"],"summary":"List a guardian's wards (trusted service)","description":"Returns the active wards of the given guardian. Trusted service-to-service callers only (registration scope) - unlike GET /api/wards, which only returns the caller's own wards, this lets reg-app look up a specific guardian's wards by id. ","operationId":"listWardsForUser","parameters":[{"name":"guardianId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of the guardian's active wards (possibly empty)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WardListResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/WardListResponseDto"}}}},"403":{"description":"Forbidden - caller is not a trusted registration service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No user with the given guardian id exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_s2s_auth":["s2s.registration"]}]}},"/api/user/profile":{"get":{"tags":["user"],"summary":"Get current user's profile","description":"Returns the profile of the currently authenticated user.","operationId":"getUserProfile","responses":{"200":{"description":"User profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/UserProfileResponseDto"}}}},"403":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/registration/check-username":{"get":{"tags":["registration"],"summary":"Check if username is available","operationId":"checkUsernameAvailability","parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string","maxLength":50,"minLength":3,"pattern":"^\\S+$"}}],"responses":{"200":{"description":"Username availability check result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsernameAvailabilityResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/UsernameAvailabilityResponseDto"}}}},"400":{"description":"Invalid username format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/hki/registration/school":{"get":{"tags":["helsinki"],"summary":"List HKI schools","description":"Returns a locale-ordered list of Helsinki schools available for registration.","operationId":"listSchools","parameters":[{"name":"locale","in":"query","required":true,"schema":{"type":"string","enum":["EN","FI","SV","SQ"]}}],"responses":{"200":{"description":"List of schools ordered by the given locale","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HkiSchoolListResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/HkiSchoolListResponseDto"}}}},"400":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/hki/registration/school-extra":{"get":{"tags":["helsinki"],"summary":"List HKI extra school options","description":"Returns a list of special school options identified by negative IDs.","operationId":"listExtraSchoolOptions","responses":{"200":{"description":"List of extra school options","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HkiExtraSchoolOptionListResponseDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/hki/registration/group":{"get":{"tags":["helsinki"],"summary":"List HKI youth house groups","description":"Returns a locale-ordered list of Helsinki youth house groups available for registration.","operationId":"listGroups","parameters":[{"name":"locale","in":"query","required":true,"schema":{"type":"string","enum":["EN","FI","SV","SQ"]}}],"responses":{"200":{"description":"List of groups ordered by the given locale","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HkiGroupListResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/HkiGroupListResponseDto"}}}},"400":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/hello":{"get":{"tags":["hello-controller-impl"],"operationId":"hello","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/api/group/{id}/profile":{"get":{"tags":["group"],"summary":"Get group profile","description":"Returns the public profile of a group together with its place in the group tree. Access depends on the group's visibility level, so a public group is callable without authentication. On top of that, an administrator of the group or of any group above it may read the profile whatever the visibility level is.  A group that does not exist is refused the same way as one the caller may not see, so the answer does not tell them apart. ","operationId":"getGroupProfile","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Group profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupProfileResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/GroupProfileResponseDto"}}}},"400":{"description":"The group id is not a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"The group is not visible to the caller, or does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/group/{id}/memberships":{"get":{"tags":["membership"],"summary":"List the active person memberships of a group","description":"Returns the active person memberships of the group, filtered by `query`, sorted by `orderBy` and paged with a cursor. Caller must be an active admin of the group. ","operationId":"listGroupMemberships","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"query","in":"query","description":"Returns only members whose name contains this text, ignoring case.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}},{"name":"orderBy","in":"query","description":"Sort field, `memberName` by default. For `role` and `email` the member's first value in creation order is used.","required":false,"schema":{"type":"string","enum":["memberName","role","email"]}},{"name":"sortOrder","in":"query","description":"Sort direction, `asc` by default.","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"cursorId","in":"query","description":"Id of the last item of the previous page. Must be sent together with `cursorKey`.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursorKey","in":"query","description":"Sort value of the last item of the previous page, for example `Baumbach Angela` (`<lastName> <firstName>`) for `memberName`. Empty when the member has no value to sort by, for `email` also when `contact` is `null`. Must be sent together with `cursorId`. ","required":false,"schema":{"type":"string","maxLength":255,"minLength":0}},{"name":"limit","in":"query","description":"Maximum number of items to return, 50 by default.","required":false,"schema":{"type":"integer","format":"int32","default":50,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"One page of the group's memberships","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupMembership"}}},"application/problem+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupMembership"}}}}},"400":{"description":"Invalid parameter, or only one of `cursorId` and `cursorKey` is sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"401":{"description":"Shared response for 4xx, 5xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"403":{"description":"Forbidden - the caller is not an active admin of the group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Group has not been found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/group/{id}/feature/{uniqueKey}":{"get":{"tags":["group"],"summary":"Get a group feature by unique key","description":"Returns a group feature's definition (metadata only, not any member's value) by its unique key within the group.","operationId":"getGroupFeature","parameters":[{"name":"id","in":"path","description":"The group's id.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"uniqueKey","in":"path","required":true,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"description":"Group feature found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupFeatureCreationResponseDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/GroupFeatureCreationResponseDto"}}}},"403":{"description":"Forbidden - caller is not a trusted registration service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"Group has not been found, or no feature with this unique key exists in it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_auth":["openid","profile"]}]}},"/api/users/{wardId}/guardianships":{"delete":{"tags":["wards"],"summary":"Release a ward's guardianship links (trusted service)","description":"Releases every active guardianship link where the given user id is the ward, so the ward is no longer under anyone's guardianship. Idempotent: a ward with no active guardianship link is a no-op success. Trusted service-to-service callers only (registration scope). ","operationId":"releaseGuardianship","parameters":[{"name":"wardId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Guardianship links released (or there were none to release)"},"403":{"description":"Forbidden - caller is not a trusted registration service","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}},"404":{"description":"No user with the given ward id exists","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetailDto"}}}}},"security":[{"populon_s2s_auth":["s2s.registration"]}]}}},"components":{"schemas":{"BasicUserProfileResponse":{"type":"object","description":"A user's basic profile: name, date of birth, guardianship flag and primary contact information. `firstName`, `lastName` and `dateOfBirth` can be `null`: the columns are nullable and some existing users have none on file. `contact` is the primary contact record as stored: blank values and addresses without any value are dropped, an address without a country is kept, and `contact` is `null` only when nothing is left. ","properties":{"id":{"type":"integer","format":"int64","description":"The user's id."},"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"isUnderGuardianship":{"type":"boolean","description":"Whether the user is currently under a guardian's control. Read-only."},"contact":{"$ref":"#/components/schemas/UserContact"}},"required":["id","isUnderGuardianship"]},"MembershipAddressDto":{"type":"object","properties":{"city":{"type":"string"},"country":{"type":"string","description":"Country code, ISO 3166-1 alpha-2. `null` only for the trusted registration service, which gets an address as stored, including one without a country. "},"description":{"type":"string"},"latitude":{"type":"string"},"longitude":{"type":"string"},"name":{"type":"string"},"province":{"type":"string"},"street":{"type":"string"},"zipcode":{"type":"string"}}},"UserContact":{"type":"object","description":"The user's primary contact information, with the same shape as a member's.","properties":{"emails":{"type":"array","items":{"type":"string","format":"email"}},"phones":{"type":"array","items":{"type":"string"}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/MembershipAddressDto"}}},"required":["addresses","emails"]},"ProblemDetailDto":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string"}}},"BasicUserProfileRequest":{"type":"object","description":"Full replacement of the user's name, date of birth and primary contact record, see the operation description. ","properties":{"firstName":{"type":"string","maxLength":50,"minLength":0},"lastName":{"type":"string","maxLength":50,"minLength":0},"dateOfBirth":{"type":"string","format":"date"},"contact":{"$ref":"#/components/schemas/UserContactRequest"}},"required":["contact","dateOfBirth","firstName","lastName"]},"MembershipAddressRequestDto":{"type":"object","properties":{"city":{"type":"string","maxLength":255,"minLength":0},"country":{"type":"string","description":"Uppercase ISO 3166-1 alpha-2 country code, or XK for Kosovo. Any other value, such as FIN, fi or ZZ, is rejected with 400.","example":"FI","pattern":"^[A-Z]{2}$"},"description":{"type":"string","maxLength":255,"minLength":0},"latitude":{"type":"string","maxLength":255,"minLength":0},"longitude":{"type":"string","maxLength":255,"minLength":0},"name":{"type":"string","maxLength":255,"minLength":0},"province":{"type":"string","maxLength":255,"minLength":0},"street":{"type":"string","maxLength":255,"minLength":0},"zipcode":{"type":"string","maxLength":255,"minLength":0}},"required":["country"]},"UserContactRequest":{"type":"object","description":"Replacement of the user's primary contact record, with the same shape and rules as a member's (see `MembershipContactRequest`). ","properties":{"emails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":2147483647,"minItems":1},"phones":{"type":"array","items":{"type":"string","maxLength":255,"minLength":0}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/MembershipAddressRequestDto"},"maxItems":2147483647,"minItems":1}},"required":["addresses","emails"]},"MembershipContact":{"type":"object","description":"The lists can be empty only for the trusted registration service, which gets a contact as stored, for example a member with an email and no address. Every other caller gets a contact with at least one email and one address, each with a country. ","properties":{"emails":{"type":"array","items":{"type":"string","format":"email"}},"phones":{"type":"array","items":{"type":"string"}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/MembershipAddressDto"}}},"required":["addresses","emails"]},"MembershipGroupDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"required":["id","name"]},"MembershipProfileResponse":{"type":"object","description":"`id` is this membership's own id (same as the `membershipId` path parameter). `roles`/`emails`/`phones`/`addresses` are arrays because this models the full Populon Community data model - a membership can have more than one of each. `dateOfBirth` can be `null`: it's stored as a nullable field, and some existing members genuinely have none on file. For callers other than the trusted registration service, `contact` is `null` unless the member has at least one email and one address with a country; blank values are dropped. The registration service gets the contact as stored: an address without a country is kept, and `contact` is `null` only when nothing is left. `user` is `null` for a member with no linked account. ","properties":{"id":{"type":"integer","format":"int64"},"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"isUnderGuardianship":{"type":"boolean","description":"Whether the member is currently under a guardian's control."},"roles":{"type":"array","description":"The member's roles within this membership's group (e.g. a team position).","items":{"type":"string"}},"contact":{"$ref":"#/components/schemas/MembershipContact"},"group":{"$ref":"#/components/schemas/MembershipGroupDto"},"user":{"$ref":"#/components/schemas/MembershipUserDto"}},"required":["firstName","group","id","isUnderGuardianship","lastName"]},"MembershipUserDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"}},"required":["id","username"]},"MembershipContactRequest":{"type":"object","description":"Full replacement lists - each array replaces whatever was previously on file for it. `emails` and `addresses` must each contain at least one entry: unlike `phones`, neither can be enforced as present at the database level, so it's enforced here instead. A member's country (via `addresses`) must always be known, to apply local legislative rules correctly. Blank emails and countries are rejected. Every value is limited to 255 characters, the size of the database columns. ","properties":{"emails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":2147483647,"minItems":1},"phones":{"type":"array","items":{"type":"string","maxLength":255,"minLength":0}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/MembershipAddressRequestDto"},"maxItems":2147483647,"minItems":1}},"required":["addresses","emails"]},"MembershipProfileRequestDto":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"isUnderGuardianship":{"type":"boolean"},"roles":{"type":"array","description":"Full replacement list. Omit, or send an empty array, to clear all roles. Each name must already exist as a role in the membership's group - this endpoint never creates one. Only a group admin may change this list; a non-admin caller must resend the same list returned by the GET above. ","items":{"type":"string"}},"contact":{"$ref":"#/components/schemas/MembershipContactRequest"}},"required":["contact","dateOfBirth","firstName","isUnderGuardianship","lastName"]},"MemberFeatureValueDto":{"type":"object","properties":{"value":{"type":"string","format":"date","description":"The member's date value for this feature. On a GET, absent when the feature has never been set for this membership. On a PUT, omit to clear the value. "}}},"GroupStateRequestDto":{"type":"object","properties":{"state":{"type":"string","enum":["CREATED","NOT_IN_USE","PASSIVE","ACTIVE","QUIT","ACCESS_DENIED"]}},"required":["state"]},"TokenExchangeResponseDto":{"type":"object","properties":{"email":{"type":"string","format":"email"},"lang":{"type":"string"}},"required":["email","lang"]},"TokenExchangeRequestDto":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"UserRegistrationResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string","description":"Username must not contain whitespace characters","maxLength":50,"minLength":3,"pattern":"^\\S+$"},"firstName":{"type":"string"},"lastName":{"type":"string"},"streetAddress":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string","description":"Postal code","maxLength":20,"minLength":0},"created":{"type":"string","format":"date"}},"required":["created","firstName","id","lastName","username"]},"UserRegistrationRequestDto":{"type":"object","properties":{"username":{"type":"string","description":"Username must not contain whitespace characters","maxLength":50,"minLength":3,"pattern":"^\\S+$"},"email":{"type":"string","format":"email","maxLength":255,"minLength":0},"phone":{"type":"string","description":"Contact phone number","maxLength":50,"minLength":0},"password":{"type":"string","description":"Password must contain at least one non-whitespace character","maxLength":100,"minLength":8,"pattern":".*\\S.*"},"confirmPassword":{"type":"string","description":"Password must contain at least one non-whitespace character","maxLength":100,"minLength":8,"pattern":".*\\S.*"},"firstName":{"type":"string","maxLength":50,"minLength":1},"lastName":{"type":"string","maxLength":50,"minLength":1},"dateOfBirth":{"type":"string","format":"date"},"language":{"type":"string","enum":["EN","FI","SV","SQ"]},"marketingConditionsAccepted":{"type":"boolean"},"streetAddress":{"type":"string","maxLength":255,"minLength":0},"city":{"type":"string","maxLength":100,"minLength":0},"postalCode":{"type":"string","description":"Postal code","maxLength":20,"minLength":0},"country":{"type":"string","description":"Uppercase ISO 3166-1 alpha-2 country code, or XK for Kosovo. Any other value, such as FIN, fi or ZZ, is rejected with 400.","example":"FI","pattern":"^[A-Z]{2}$"}},"required":["confirmPassword","dateOfBirth","email","firstName","language","lastName","marketingConditionsAccepted","password"]},"PushTokenRequestDto":{"type":"object","properties":{"value":{"type":"string","example":"ExponentPushToken[idLFVFEaMA1ECxpJ69ehpY]","maxLength":100,"minLength":0},"deviceName":{"type":"string","example":"HUAWEI P smart","maxLength":255,"minLength":0}},"required":["value"]},"GroupFeatureCreationResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Database-generated identifier of the created feature."},"name":{"type":"string","description":"Feature name as provided by the group admin.","maxLength":255,"minLength":1},"uniqueKey":{"type":"string","description":"Unique key generated from the feature name, unique within the owner group.","maxLength":255,"minLength":0},"description":{"type":"string","description":"Optional free-text description of the feature.","maxLength":255,"minLength":0},"visibilityLevel":{"type":"string","description":"Visibility of the user-provided feature data.","enum":["VISIBLE_EVERYONE","VISIBLE_REGISTERED_USER","VISIBLE_GROUP_MEMBER","INVISIBLE","VISIBLE_GROUP_ADMIN"]},"dataType":{"type":"string","description":"Data type of the user-provided values for this feature.","enum":["DATE","INTEGER","STRING","DECIMAL"]},"systemFeature":{"type":"boolean","description":"Whether the feature itself is editable by group admins."},"mobileVisible":{"type":"boolean","description":"Whether the user-provided feature data are visible in the mobile app."},"allowedOptions":{"type":"array","description":"The feature's allowed options as stored (string form), in insertion order. Always present; an empty array when the feature has no predefined options. ","items":{"type":"string","maxLength":255,"minLength":1}}},"required":["allowedOptions","dataType","id","mobileVisible","name","systemFeature","uniqueKey","visibilityLevel"]},"GroupFeatureCreationRequestDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":1},"description":{"type":"string","maxLength":255,"minLength":0},"uniqueKey":{"type":"string","description":"Optional unique key of the feature within the owner group. Any caller may supply it to preserve a fixed key (stored as-is, e.g. \"anonymization_requested\"); when omitted it is generated from the name. Limited to lowercase letters, digits, '-' and '_' (see pattern), consistent with generated keys. A duplicate key within the group yields 409. ","maxLength":255,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"visibilityLevel":{"type":"string","enum":["VISIBLE_EVERYONE","VISIBLE_REGISTERED_USER","VISIBLE_GROUP_MEMBER","INVISIBLE","VISIBLE_GROUP_ADMIN"]},"dataType":{"type":"string","enum":["DATE","INTEGER","STRING","DECIMAL"]},"systemFeature":{"type":"boolean","description":"Whether this is a system-managed feature. Only a trusted registration service (a token carrying the registration scope) may set this to true; a group admin requesting a system feature is rejected with 403. "},"mobileVisible":{"type":"boolean","description":"Whether the user-provided feature data are visible in the mobile app."},"allowedOptions":{"type":"array","description":"Optional picklist of allowed options for this feature. Each item must be a valid representation of the feature's dataType (an invalid item yields 400). Omit or leave empty for a free-text feature with no predefined options. ","items":{"type":"string","maxLength":255,"minLength":1}}},"required":["dataType","name","visibilityLevel"]},"PhoneCreationRequestDto":{"type":"object","properties":{"phone":{"type":"string","description":"Contact phone number","maxLength":50,"minLength":0}},"required":["phone"]},"AddressCreationRequestDto":{"type":"object","properties":{"streetAddress":{"type":"string"},"postalCode":{"type":"string","description":"Postal code","maxLength":20,"minLength":0},"city":{"type":"string"},"country":{"type":"string","description":"Uppercase ISO 3166-1 alpha-2 country code, or XK for Kosovo. Any other value, such as FIN, fi or ZZ, is rejected with 400.","example":"FI","pattern":"^[A-Z]{2}$"},"primary":{"type":"boolean"}},"required":["city","country","postalCode","primary","streetAddress"]},"GroupCreationResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"shortName":{"type":"string"},"created":{"type":"string","format":"date"}},"required":["created","id","name","shortName"]},"GroupCreationRequestDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":0},"shortName":{"type":"string","maxLength":50,"minLength":0},"email":{"type":"string","format":"email"},"country":{"type":"string","description":"Uppercase ISO 3166-1 alpha-2 country code, or XK for Kosovo. Any other value, such as FIN, fi or ZZ, is rejected with 400.","example":"FI","pattern":"^[A-Z]{2}$"},"policyAccepted":{"type":"boolean"},"additionalProperties":{"type":"object","additionalProperties":{}}},"required":["country","email","name","policyAccepted","shortName"]},"GeoSuggestResponseDto":{"type":"object","properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/GeoSuggestionDto"}}},"required":["suggestions"]},"GeoSuggestionDto":{"type":"object","properties":{"text":{"type":"string","description":"The formatted suggestion text to display"},"magicKey":{"type":"string","description":"Encoded key to pass to resolve-address endpoint"},"isCollection":{"type":"boolean","description":"True if this is a general category, false if a specific place"}},"required":["magicKey","text"]},"GeoSuggestRequestDto":{"type":"object","properties":{"text":{"type":"string","description":"The partial address or place name to search for","maxLength":200,"minLength":1},"countryCode":{"type":"string","description":"Uppercase ISO 3166-1 alpha-2 country code, or XK for Kosovo. Any other value, such as FIN, fi or ZZ, is rejected with 400.","example":"FI","pattern":"^[A-Z]{2}$"},"maxSuggestions":{"type":"integer","format":"int32","description":"Maximum number of suggestions to return (default 5, max 15)","maximum":15,"minimum":1},"longitude":{"type":"number","format":"double","description":"WGS84 longitude used to bias suggestion results","example":"18.2625","maximum":180,"minimum":-180},"latitude":{"type":"number","format":"double","description":"WGS84 latitude used to bias suggestion results","example":"49.8209","maximum":90,"minimum":-90}},"required":["text"]},"GeoResolveResponseDto":{"type":"object","properties":{"address":{"type":"string","description":"Full formatted address"},"streetAddress":{"type":"string","description":"Street name and number"},"city":{"type":"string","description":"City/municipality name"},"region":{"type":"string","description":"State/province/region"},"postalCode":{"type":"string","description":"Postal code","maxLength":20,"minLength":0},"country":{"type":"string","description":"Country name"},"countryCode":{"type":"string","description":"Uppercase ISO 3166-1 alpha-2 country code, or XK for Kosovo. Null when the geocoding service returns no recognised country.","example":"FI","pattern":"^[A-Z]{2}$"},"latitude":{"type":"number","format":"double","description":"Latitude coordinate (WGS84)"},"longitude":{"type":"number","format":"double","description":"Longitude coordinate (WGS84)"},"score":{"type":"number","format":"double","description":"Match confidence score (0-100)"},"addressType":{"type":"string","description":"Type of address match (e.g., PointAddress, StreetAddress)"}},"required":["address","latitude","longitude"]},"GeoResolveRequestDto":{"type":"object","properties":{"text":{"type":"string","description":"The address text to resolve (from suggest response)","maxLength":200,"minLength":1},"magicKey":{"type":"string","description":"Magic key from a previous suggest response (optional, improves accuracy)"},"countryCode":{"type":"string","description":"Uppercase ISO 3166-1 alpha-2 country code, or XK for Kosovo. Any other value, such as FIN, fi or ZZ, is rejected with 400.","example":"FI","pattern":"^[A-Z]{2}$"}},"required":["text"]},"SendVerificationEmailRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":255,"minLength":0},"language":{"type":"string","enum":["EN","FI","SV","SQ"]},"clientId":{"type":"string","enum":["COACH"]}},"required":["clientId","email","language"]},"WardDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Identifier of the guardian-ward link"},"name":{"type":"string","description":"Full name of the ward"},"userId":{"type":"integer","format":"int64","description":"User account id of the ward"}},"required":["id","name","userId"]},"WardListResponseDto":{"type":"object","properties":{"wards":{"type":"array","items":{"$ref":"#/components/schemas/WardDto"}}},"required":["wards"]},"UserMessageConfiguration":{"type":"object","description":"The user's notifications and newsletters settings.","properties":{"emailOnNotificationPublished":{"type":"boolean","description":"Send an email to the user when a notification is published."},"emailOnNotificationUpdated":{"type":"boolean","description":"Send an email to the user when a notification is updated."},"emailOnActivityPublished":{"type":"boolean","description":"Send an email to the user when an activity is published."},"emailOnActivityUpdated":{"type":"boolean","description":"Send an email to the user when an activity is updated."},"newsletterEnabled":{"type":"boolean","description":"Whether the user receives newsletters."},"newsletterPeriodDays":{"type":"integer","format":"int32","description":"Number of days between newsletters.","maximum":365,"minimum":1},"lastNewsletterSent":{"type":"string","format":"date","description":"When the last newsletter was sent to the user, if ever. Read-only."}},"required":["emailOnActivityPublished","emailOnActivityUpdated","emailOnNotificationPublished","emailOnNotificationUpdated","newsletterEnabled","newsletterPeriodDays"]},"UserProfileResponseDto":{"type":"object","properties":{"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"email":{"type":"string"},"phone":{"type":"string"},"address":{"type":"string"},"language":{"type":"string","enum":["EN","FI","SV","SQ"]},"timezone":{"type":"string","enum":["EUROPE_HELSINKI","EUROPE_LONDON","EUROPE_PRAGUE"]},"messageConfiguration":{"$ref":"#/components/schemas/UserMessageConfiguration"}},"required":["messageConfiguration","username"]},"UsernameAvailabilityResponseDto":{"type":"object","properties":{"available":{"type":"boolean"}},"required":["available"]},"HkiSchoolDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"required":["id","name"]},"HkiSchoolListResponseDto":{"type":"object","properties":{"schools":{"type":"array","items":{"$ref":"#/components/schemas/HkiSchoolDto"}}},"required":["schools"]},"HkiExtraSchoolOptionDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Negative ID that distinguishes this option from regular school IDs"},"otherSchoolOption":{"type":"string","enum":["DO_NOT_STUDY","SCHOOL_NOT_ON_LIST"]}},"required":["id","otherSchoolOption"]},"HkiExtraSchoolOptionListResponseDto":{"type":"object","properties":{"options":{"type":"array","items":{"$ref":"#/components/schemas/HkiExtraSchoolOptionDto"}}},"required":["options"]},"HkiGroupDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"required":["id","name"]},"HkiGroupListResponseDto":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/HkiGroupDto"}}},"required":["groups"]},"GroupProfileAddressDto":{"type":"object","properties":{"address":{"type":"string"},"description":{"type":"string"}},"required":["address"]},"GroupProfileEmailDto":{"type":"object","properties":{"email":{"type":"string"},"description":{"type":"string"}},"required":["email"]},"GroupProfilePhoneDto":{"type":"object","properties":{"phone":{"type":"string"},"description":{"type":"string"}},"required":["phone"]},"GroupProfileResponseDto":{"type":"object","properties":{"name":{"type":"string"},"hierarchyIdentifier":{"type":"string","description":"Path from the root of the group tree, group ids separated by `:` and ending in the group's own id, for example `1:50:456`. A root group's path is its own id alone. "},"emailList":{"type":"array","items":{"$ref":"#/components/schemas/GroupProfileEmailDto"}},"addressList":{"type":"array","items":{"$ref":"#/components/schemas/GroupProfileAddressDto"}},"phoneList":{"type":"array","items":{"$ref":"#/components/schemas/GroupProfilePhoneDto"}}},"required":["addressList","emailList","hierarchyIdentifier","name","phoneList"]},"GroupMembership":{"type":"object","description":"A person membership in the group. `dateOfBirth` is `null` when the member has none. `contact` is `null` unless the member has at least one email and one address with a country; blank values are dropped. ","properties":{"id":{"type":"integer","format":"int64","description":"Id of the membership, not of the member."},"firstName":{"type":"string"},"lastName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"roles":{"type":"array","description":"The member's roles within the group (e.g. a team position).","items":{"type":"string"}},"contact":{"$ref":"#/components/schemas/MembershipContact"}},"required":["firstName","id","lastName"]},"GroupDescendantDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"The group's id."},"name":{"type":"string","description":"Full group name, not the short name."},"hierarchyIdentifier":{"type":"string","description":"Path from the root of the group tree, group ids separated by `:` and ending in the group's own id, for example `1:50:456`. A root group's path is its own id alone. "}},"required":["hierarchyIdentifier","id","name"]}}}}