API Reference - Category Groups

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108058

← Back to API Reference | Getting Started

Category Groups

Category Groups are top-level containers for organizing categories into logical sections. Each category group can be associated with a specific database and used to group related categories together for display and filtering purposes.

Model name in URL: category_group — DB table: category_group

The Category Group Object

FieldTypeDescription
group_idintegerUnique category group ID (primary key, read-only)
group_filenamestringURL-friendly slug for this group
group_namestringDisplay name of the category group
group_desctextDescription of the category group
databasestringThe database/table this group is associated with (EG list_services)
revision_timestamptimestampLast modified timestamp (auto-updated)

List Category Group Records

GET /api/v2/category_group/get

Returns a paginated list of category group records.

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/category_group/get?limit=25" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "group_id": "1",
      "group_filename": "member",
      "group_name": "Member",
      "group_desc": "",
      "database": "list_services",
      "revision_timestamp": "2014-10-30 16:00:55"
    }
  ],
  "total": "1",
  "current_page": 1,
  "total_pages": 1
}

Retrieve a Category Group Record

GET /api/v2/category_group/get/{group_id}

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/category_group/get/1" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "group_id": "1",
      "group_filename": "member",
      "group_name": "Member",
      "group_desc": "",
      "database": "list_services",
      "revision_timestamp": "2014-10-30 16:00:55"
    }
  ],
  "total": "1",
  "current_page": 1,
  "total_pages": 1
}

Create a Category Group Record

POST /api/v2/category_group/create

Example Request

Copy
curl -X POST "https://www.yourdomain.com/api/v2/category_group/create" \
  -H "X-Api-Key: your-api-key-here" \
  -d "group_name=Home+Services" \
  -d "group_filename=home-services" \
  -d "group_desc=Categories+for+home+service+providers" \
  -d "database=list_services"

Example Response

Copy
{
  "status": "success",
  "message": {
    "group_id": "2",
    "group_filename": "home-services",
    "group_name": "Home Services",
    "group_desc": "Categories for home service providers",
    "database": "list_services",
    "revision_timestamp": null
  }
}

Update a Category Group Record

PUT /api/v2/category_group/update

Example Request

Copy
curl -X PUT "https://www.yourdomain.com/api/v2/category_group/update" \
  -H "X-Api-Key: your-api-key-here" \
  -d "group_id=2" \
  -d "group_name=Home+and+Garden+Services" \
  -d "group_desc=Categories+for+home+and+garden+professionals"

Example Response

Copy
{
  "status": "success",
  "message": {
    "group_id": "2",
    "group_filename": "home-services",
    "group_name": "Home and Garden Services",
    "group_desc": "Categories for home and garden professionals",
    "database": "list_services",
    "revision_timestamp": "2026-04-03 23:14:31"
  }
}

Delete a Category Group Record

DELETE /api/v2/category_group/delete

Example Request

Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/category_group/delete" \
  -H "X-Api-Key: your-api-key-here" \
  -d "group_id=2"

Example Response

Copy
{
  "status": "success",
  "message": "category_group record was deleted"
}