Skip to main content
A favourite group gives each Profile its own set of Profiles. You create one favourite Group Definition, and every Profile that activates it gets a personal Group instance whose members are resolved from that Profile’s connections. Use this for per-customer sets such as favourite stores or preferred stylists. This guide covers creating the definition, managing per-Profile instances, and managing the members within an instance. For the model behind groups, see the Groups concept. All endpoints are bearer authenticated and live under 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’s source_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 with POST /groups/definitions, type: "favourite", and the source fields.
FieldRequiredDescription
typeYesfavourite.
source_typeYesThe source of members. connection_definition is the only current value.
source_idYesThe 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:
Create an instance for a Profile by referencing the definition:
This is idempotent. If the Profile already owns an instance of that definition, the response is 200; a newly created instance returns 201.
FieldRequiredDescription
group_definition_idYesThe favourite Group Definition to instantiate for this Profile.
metaNoFree-form metadata stored on the instance.
The response is the instance, a lightweight record that links an owner Profile to a definition:
FieldDescription
idThe instance id. This is the {group} you use in the member and single-instance endpoints below.
group_definition_idThe favourite Group Definition this instance was created from.
ownerThe owner, as { type, id }. For a Profile owner, type is profile and id is the Profile UUID.
statusThe instance state, active by default.
metaFree-form metadata.
created_at / updated_atTimestamps.
The instance carries the membership, not the configuration: the definition (via 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:
Add a member by its Profile id:
FieldRequiredDescription
profile_idYesThe connected Profile to add as a member.
Remove a member by its Profile id:
In these paths, {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.
1

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.
2

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.
3

Add favourites

POST /profiles/{profile}/groups/{group}/profiles with the connected Profile’s profile_id for each store the customer favourites.
4

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.
5

Remove one or tidy up

DELETE /profiles/{profile}/groups/{group}/profiles/{member} removes a favourite. DELETE /profiles/{profile}/groups/{group} removes the whole instance for that customer.

Errors

StatusWhen
200Creating an instance the Profile already owns (idempotent).
201A new instance or a new member was created.
204An instance or a member was deleted.
401Missing or invalid bearer token.
403The token lacks the scope or permission for this Profile or group.
404The definition, the instance, or the member is not found under the Profile or instance named in the URL.
422Validation 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 static or dynamic definition returns 422.
  • The instance URL never says “favourite”. Instances live under /profiles/{profile}/groups; the definition’s type is what makes them favourite groups.
  • Members come from connections. The only source_type is connection_definition, and members are the Profiles connected to the owner through that Connection Definition.
  • current_member_count is always 0. 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.