Introduction
This functionality can help family members (household) to share the same account. The more members are sharing the same account, the more profiles become more necessary.
Overview of endpoints
We track user profiles using the following entity. Our API endpoints expose the entity.
Entity | Purpose |
---|---|
UserProfile | This stores information about profiles of an account. |
Use cases
Each account can have multiple profiles
It is possible that each account have multiple profiles but they should have different profile names.
GET api/users/v1/users/{user_id}/user_profiles
By calling the above API, it will returns list of profiles of that user
{ "data": [ { "type": "UserProfile", "id": "84eb61a9-75d4-42c7-8c15-84c3d7776227", "attributes": { "name": "Dad", "user_id": 42, "is_child_profile": false, "age_limit": 16, "is_default": false }, "links": { "self": "https://demo.aminocom.com/api/users/v1/5b56765e-fa7b-45d2-8dee-2869ec736cc9/user_profiles/84eb61a9-75d4-42c7-8c15-84c3d7776227" } } ] }
User can create multiple profiles
An Authorised user can create multiple accounts as long as they have different names.
POST api/users/v1/users/{user_id}/user_profiles
By calling the above API, a profile belongs to that user will be created. Here is an example of a request body to create a profile.
{ "name": "Dad", "user_id": 42, "is_child_profile": false, "age_limit": 16, "is_default": false }
And response body after the successful call.
{ "data": [ { "type": "UserProfile", "id": "dc11a654-882d-47cb-a971-bb1fc6f0ffd8", "attributes": { "name": "Dad", "user_id": 42, "is_child_profile": false, "age_limit": 16, "is_default": false }, "links": { "self": "https://demo.aminocom.com/api/users/v1/5b56765e-fa7b-45d2-8dee-2869ec736cc9/user_profiles/dc11a654-882d-47cb-a971-bb1fc6f0ffd8" } } ] }
Profile can be set as Child profile
When the profile is created, user can set it as Child profile which contains specific things for children or limit them from sensitive channels or adult contents.
We can set it by set the property "is_child_profile": true in the request body of the following API
POST api/users/v1/users/{user_id}/user_profiles
By default there should be 1 profile created per account.
When an account is created, the default profile is created correspondingly. The default name of that profile is the account's first name or "Default" if the first name is empty.