SellGate API

Groups API

Organize products into groups and categories

Groups API

Create and manage product groups to organize your catalog.

Endpoints Overview

MethodEndpointDescription
GET/v1/groupsList all groups
POST/v1/groupsCreate a new group
GET/v1/groups/:idGet group details
PATCH/v1/groups/:idUpdate a group
DELETE/v1/groups/:idDelete a group
GET/v1/groups/:id/productsList products in a group
POST/v1/groups/:id/productsAdd a product to a group
DELETE/v1/groups/:id/productsRemove a product from a group

List Groups

GET /v1/groups

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems 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/groups

Request Body

FieldTypeRequiredDescription
namestringYesGroup name
descriptionstringNoGroup description
imagestringNoImage URL
sort_orderintegerNoDisplay 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/:id

Returns group details.


Update Group

PATCH /v1/groups/:id

All 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/:id

Deleting a group does not delete the products within it. Products will become ungrouped.


Group Object

FieldTypeDescription
idstringGroup identifier
namestringGroup name
descriptionstringGroup description
imagestringImage URL
sort_orderintegerDisplay order
product_countintegerNumber of products in group
created_atstringCreation timestamp
updated_atstringLast update timestamp

Group Products

Manage which products belong to a group.


Sorting

Groups are returned sorted by:

  1. sort_order (ascending)
  2. created_at (descending)

Lower sort_order values appear first. Use this to control the display order in your store.

On this page