https://api.[tenant].getomneo.com/api/v3.
How favourite groups work
A favourite Group Definition is ownable by a Profile. The definition holds no members itself; instead, each owner Profile gets its own instance, and the members of that instance are resolved from the definition’s source. The only current source is a Connection Definition. The definition’ssource_type is connection_definition and its source_id points at a Connection Definition. Each instance’s members are the Profiles connected to its owner through that Connection Definition. The owner is the instance’s own Profile; the members are the connected Profiles.
Create the Definition
Create the definition withPOST /groups/definitions, type: "favourite", and the source fields.
| Field | Required | Description |
|---|---|---|
type | Yes | favourite. |
source_type | Yes | The source of members. connection_definition is the only current value. |
source_id | Yes | The id of the Connection Definition members are resolved from. |
Manage per-Profile instances
Instances are managed through the profile-scoped endpoints under/profiles/{profile}/groups. The instance URL never contains the word “favourite”; the definition’s type is what makes these instances favourite groups.
List the instances a Profile owns:
200; a newly created instance returns 201.
| Field | Required | Description |
|---|---|---|
group_definition_id | Yes | The favourite Group Definition to instantiate for this Profile. |
meta | No | Free-form metadata stored on the instance. |
| Field | Description |
|---|---|
id | The instance id. This is the {group} you use in the member and single-instance endpoints below. |
group_definition_id | The favourite Group Definition this instance was created from. |
owner | The owner, as { type, id }. For a Profile owner, type is profile and id is the Profile UUID. |
status | The instance state, active by default. |
meta | Free-form metadata. |
created_at / updated_at | Timestamps. |
group_definition_id) holds the source_type, source_id, and other settings. Read the definition through the Group Definition endpoints when you need those.
Read or delete a single instance by its id:
Manage members within an instance
An instance’s members are the connected Profiles. List, add, and remove them through the member endpoints under the instance. List the members of an instance:| Field | Required | Description |
|---|---|---|
profile_id | Yes | The connected Profile to add as a member. |
{profile} is the owner and {member} is the connected Profile you are adding or removing.
The instance member listing returns the connected Profiles. The same members also appear in the unified definition listing, GET /groups/definitions/{group}/profiles, where each row’s record_type is connection and record is the connection linking the owner to the member. current_member_count on a favourite definition is always 0, so count members from either listing rather than that field.
Worked example: favourite stores
This runs a favourite group from definition to a per-customer set.Create the definition
POST /groups/definitions with type: "favourite", source_type: "connection_definition", and source_id set to the Connection Definition. The response is 201 with the definition id, for example 42.Give a customer their instance
POST /profiles/{profile}/groups with { "group_definition_id": 42 }. A first call returns 201 with a new instance; a repeat returns 200 with the one the Profile already owns. Note the instance id for the member calls.Add favourites
POST /profiles/{profile}/groups/{group}/profiles with the connected Profile’s profile_id for each store the customer favourites.Read the set
GET /profiles/{profile}/groups/{group}/profiles returns the members for that owner. The same members appear in GET /groups/definitions/42/profiles as connection rows across all owners.Errors
| Status | When |
|---|---|
200 | Creating an instance the Profile already owns (idempotent). |
201 | A new instance or a new member was created. |
204 | An instance or a member was deleted. |
401 | Missing or invalid bearer token. |
403 | The token lacks the scope or permission for this Profile or group. |
404 | The definition, the instance, or the member is not found under the Profile or instance named in the URL. |
422 | Validation failed. For example, creating a profile-owned instance of a static or dynamic definition, or a favourite definition without a valid source_type and source_id. |
Edge cases and gotchas
- The definition holds no members. Each owner Profile gets its own instance, and each instance resolves its own members. Read members per instance, or across all owners through the unified definition listing.
- Instances are favourite only. Creating a profile-owned instance of a
staticordynamicdefinition returns422. - The instance URL never says “favourite”. Instances live under
/profiles/{profile}/groups; the definition’stypeis what makes them favourite groups. - Members come from connections. The only
source_typeisconnection_definition, and members are the Profiles connected to the owner through that Connection Definition. current_member_countis always0. It never reflects favourite members. Count from a member listing.- Owner versus member. In the member paths,
{profile}is the owner and{member}is the connected Profile.
Related
- Groups concept
- Working with Groups
- Building dynamic groups
- Connections concept
- Add Group Definition API
- Group instances this Profile owns API
- Create or return a Profile’s instance API
- Read a Profile’s group instance API
- Delete a Profile’s group instance API
- List members of an instance API
- Add a member to an instance API
- Remove a member from an instance API