Groups API
Organize products into groups and categories
Groups API
Create and manage product groups to organize your catalog.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/groups | List all groups |
POST | /v1/groups | Create a new group |
GET | /v1/groups/:id | Get group details |
PATCH | /v1/groups/:id | Update a group |
DELETE | /v1/groups/:id | Delete a group |
GET | /v1/groups/:id/products | List products in a group |
POST | /v1/groups/:id/products | Add a product to a group |
DELETE | /v1/groups/:id/products | Remove a product from a group |
List Groups
GET /v1/groupsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 25, max: 100) |
Response
{
"data": [
{
"id": "grp_abc123",
"name": "Software Licenses",
"description": "Digital software license keys",
"image": "https://...",
"sort_order": 1,
"product_count": 12,
"created_at": "2025-12-29T10:00:00Z",
"updated_at": "2025-12-29T10:00:00Z"
},
{
"id": "grp_def456",
"name": "Game Keys",
"description": "Video game activation keys",
"image": null,
"sort_order": 2,
"product_count": 8,
"created_at": "2025-12-29T14:00:00Z",
"updated_at": "2025-12-29T14:00:00Z"
}
],
"meta": {
"total": 5,
"limit": 25,
"offset": 0
}
}Example Request
curl -X GET "https://api.sellgate.cc/v1/groups" \
-H "Authorization: Bearer sg_live_your_api_key"Create Group
POST /v1/groupsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Group name |
description | string | No | Group description |
image | string | No | Image URL |
sort_order | integer | No | Display order (default: 0) |
Example Request
curl -X POST "https://api.sellgate.cc/v1/groups" \
-H "Authorization: Bearer sg_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Products",
"description": "High-end digital products",
"sort_order": 1
}'Response (201 Created)
{
"data": {
"id": "grp_new123",
"name": "Premium Products",
"description": "High-end digital products",
"image": null,
"sort_order": 1,
"created_at": "2025-12-29T10:00:00Z",
"updated_at": "2025-12-29T10:00:00Z"
}
}Get Group
GET /v1/groups/:idReturns group details.
Update Group
PATCH /v1/groups/:idAll fields are optional.
Example Request
curl -X PATCH "https://api.sellgate.cc/v1/groups/grp_abc123" \
-H "Authorization: Bearer sg_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Group Name"
}'Delete Group
DELETE /v1/groups/:idDeleting a group does not delete the products within it. Products will become ungrouped.
Group Object
| Field | Type | Description |
|---|---|---|
id | string | Group identifier |
name | string | Group name |
description | string | Group description |
image | string | Image URL |
sort_order | integer | Display order |
product_count | integer | Number of products in group |
created_at | string | Creation timestamp |
updated_at | string | Last update timestamp |
Group Products
Manage which products belong to a group.
Sorting
Groups are returned sorted by:
sort_order(ascending)created_at(descending)
Lower sort_order values appear first. Use this to control the display order in your store.