API Playground

Test the list families endpoint

Authentication Required

You need to Login to test the API playground

List Product Families

Retrieve all product families

This endpoint allows you to retrieve a complete list of all product families defined in your account.

Families are used to group products with similar characteristics and assign family-specific attributes.

Note: This operation does not consume credits
Endpoint URL
GET https://api.commerceclarity.com/api/v1/families

Request Examples

Basic Request
curl -X GET "https://api.commerceclarity.com/api/v1/families" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
PHP Example (Guzzle HTTP Client)
$client = new \GuzzleHttp\Client();

$response = $client->get('https://api.commerceclarity.com/api/v1/families', [
    'headers' => [
        'Authorization' => 'Bearer ' . $apiToken,
        'Accept' => 'application/json',
    ]
]);

$data = json_decode($response->getBody(), true);
JavaScript Example (Fetch API)
const response = await fetch('https://api.commerceclarity.com/api/v1/families', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${apiToken}`,
    'Accept': 'application/json'
  }
});

const data = await response.json();

Response Example

Success Response
{
  "status": "success",
  "data": [
    {
      "_id": "507f1f77bcf86cd799439011",
      "name": "Electronics",
      "family_id": "electronics",
      "description": "Electronic devices and accessories",
      "is_enabled": true,
      "user_id": "507f1f77bcf86cd799439010",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    },
    {
      "_id": "507f1f77bcf86cd799439012",
      "name": "Clothing",
      "family_id": "clothing",
      "description": "Apparel and fashion items",
      "is_enabled": true,
      "user_id": "507f1f77bcf86cd799439010",
      "created_at": "2024-01-16T11:20:00Z",
      "updated_at": "2024-01-16T11:20:00Z"
    },
    {
      "_id": "507f1f77bcf86cd799439013",
      "name": "Home & Garden",
      "family_id": "home_garden",
      "description": "Home improvement and garden products",
      "is_enabled": true,
      "user_id": "507f1f77bcf86cd799439010",
      "created_at": "2024-01-17T09:15:00Z",
      "updated_at": "2024-01-17T09:15:00Z"
    }
  ]
}

Response Structure

The response contains an array of family objects:

Field Type Description
_id string Unique family identifier
name string Display name of the family
family_id string Unique identifier string (slug)
description string Family description
is_enabled boolean Whether the family is active
user_id string User ID who owns the family
created_at string Product creation timestamp (ISO 8601)
updated_at string Last update timestamp (ISO 8601)