Point Groups

Use this endpoint to manipulate and obtain details on Salesbox’s Point Groups.

Base Endpoint

https://segmentai.salesbox.com.br/api/point-groups

Get Point Group

GET /api/point-groups/{id}

Get an individual Point Group by ID.

HTTP Request

GET /api/point-groups/ID

Response

Expected Response Code: 200

{
    "pointGroup": {
        "id": 1,
        "name": "Active Customers",
        "description": "Customers with high engagement",
        "isPublished": true,
        "minimumPoints": 100,
        "maximumPoints": 500,
        "color": "#4CAF50",
        "createdAt": "2024-01-15T10:00:00+00:00",
        "modifiedAt": "2024-01-15T10:00:00+00:00",
        "createdBy": 1,
        "createdByUser": "John Smith",
        "modifiedBy": 1,
        "modifiedByUser": "John Smith"
    }
}

Point Group Properties

Name

Type

Description

id

int

ID of the Point Group

name

string

Name of the Point Group

description

string/null

Description of the Point Group

isPublished

boolean

Whether the point group is active

minimumPoints

int

Minimum points required for this group

maximumPoints

int

Maximum points allowed for this group

color

string

Color code for the Point Group

createdAt

datetime

Point Group creation date/time

modifiedAt

datetime/null

Point Group last modified date/time

createdBy

int

ID of the User that created the Point Group

createdByUser

string

Name of the User that created the Point Group

modifiedBy

int

ID of the User that last modified the Point Group

modifiedByUser

string

Name of the User that last modified the Point Group

List Point Groups

GET /api/point-groups

Get a list of point groups.

Query Parameters

Name

Type

Description

search

string

Text to search point groups by

page

int

Which page to display

limit

int

How many records to return

orderBy

string

Column to sort by

orderByDir

string

Sort direction: asc or desc

isPublished

boolean

Filter by published status

Create Point Group

POST /api/point-groups/new

Create a new point group.

Request Body

Name

Type

Description

name

string

Point Group name

description

string

Point Group description

isPublished

boolean

Whether the point group should be active

minimumPoints

int

Minimum points required

maximumPoints

int

Maximum points allowed

color

string

Color code for the point group

Edit Point Group

PATCH /api/point-groups/{id}/edit

Edit an existing point group.

Request Body

Same fields as Create Point Group.

Delete Point Group

DELETE /api/point-groups/{id}/delete

Delete an existing point group.