Add Group

Lets you create a new user group. Groups you create will be added to the default loyalty program of the org automatically.

API endpoint example

https://eu.api.capillarytech.com/v2/userGroup2

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Access group resource: Read and write access to the User Group resource

Resource information

URI/v2/userGroup2
HTTP MethodPOST
PaginationNo
Batch supportNo
Rate limit informationNA

Request body parameters

Parameter
(Parameters marked with * are mandatory)
TypeDescription
externalId*stringUnique ID of the group. The maximum number of allowed characters is 50.
groupNamestringName of the group. The maximum number of allowed characters is 50.
maxGroupSize*integerMaximum size of the group. The maximum group size is as defined by the product configuration CONF_MAX_FLEET_GROUP_SIZE. If this configuration is not set, the default maximum size is 30,000.
limitintegerMaximum number of items to be retrieved.
extendedFieldsarrayAn array containing the extended fields and their corresponding values, enabled for specific verticals within the organisation. These extended fields capture additional information about the group. Example: A brand X wants to capture the type of group: Platinum, Gold, or Silver. It uses the extended fields to capture the information and decides the rewards depending on the group.
Note: Extended field support is available for fields created using the entity type usergroup2.
{
    "externalId": "purple_externalId",
    "groupName": "name_purple",
    "maxGroupSize": 110
}
{
    "externalId": "natwest_16",
    "groupName": "natwest14",
    "maxGroupSize": 110,
    "extendedFields": {
        "platinum": "25"
    }
}

Response parameters

ParameterDescription
entityUnique ID of the user group created.
warningsArray containing warning messages, if any.
{
    "entity": 2361,
    "warnings": []
}
{
    "entity": 51298,
    "warnings": []
}

API-specific error codes

Error codeDescription
1633Group ID exists. Change the value of the field externalId
91017Value of the extended field does not match the data type.
Note: This is a warning, The user group is created, but the extended fields are not updated.
91016Extended field name is incorrect.
Note: This is a warning. The user group is created, but the extended fields are not updated.
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!