.. vale off Point Groups ============ Use this endpoint to manipulate and obtain details on Salesbox's Point Groups. Base Endpoint ------------ .. code-block:: text https://segmentai.salesbox.com.br/api/point-groups Get Point Group ------------- .. code-block:: text GET /api/point-groups/{id} Get an individual Point Group by ID. **HTTP Request** ``GET /api/point-groups/ID`` **Response** ``Expected Response Code: 200`` .. code-block:: json { "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** .. list-table:: :header-rows: 1 * - 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 --------------- .. code-block:: text GET /api/point-groups Get a list of point groups. **Query Parameters** .. list-table:: :header-rows: 1 * - 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 --------------- .. code-block:: text POST /api/point-groups/new Create a new point group. **Request Body** .. list-table:: :header-rows: 1 * - 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 ------------- .. code-block:: text PATCH /api/point-groups/{id}/edit Edit an existing point group. **Request Body** Same fields as Create Point Group. Delete Point Group --------------- .. code-block:: text DELETE /api/point-groups/{id}/delete Delete an existing point group. .. vale off