API Playground

Test the get family endpoint

Authentication Required

You need to Login to test the API playground

Get Family Details

Retrieve details of a specific family

This endpoint allows you to retrieve detailed information about a specific product family by providing its ID.

The response includes all family data including name, description, and configuration.

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

Path Parameters

Parameter Type Required Description
id string Required The unique family identifier (Family ID or family_id)

Request Examples

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

$familyId = '507f1f77bcf86cd799439011';

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

$data = json_decode($response->getBody(), true);
JavaScript Example (Fetch API)
const familyId = '507f1f77bcf86cd799439011';

const response = await fetch(`https://api.commerceclarity.com/api/v1/families/${familyId}`, {
  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"
  }
}
Error Response - Validation
{
  "status": "error",
  "message": "Family not found",
  "code": 404
}

Response Structure

The response contains complete family information:

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)