API Playground

Create a new family for your active brand. This playground calls the live API and will modify your data.

Authentication Required

You need to Login to test the API playground

Create family

Create a new family for the active brand.

Endpoint URL
POST https://api.commerceclarity.com/api/2026-05/families/create

Body parameters

ParameterTypeRequiredDescription
namestringRequiredFamily name.
family_idstringRequiredBrand-unique family key.
descriptionstringOptionalFamily description.
is_enabledbooleanOptionalWhether the family is active. Default true.

Request Examples

curl -X POST "https://api.commerceclarity.com/api/2026-05/families/create" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Electronics", "family_id": "electronics" }'

Response Example

Success Response
{
  "status": "success",
  "data": {
    "_id": "507f1f77bcf86cd799439011",
    "name": "Electronics",
    "family_id": "electronics",
    "description": "Electronic devices and accessories",
    "is_enabled": true,
    "created_at": "2026-01-15T10:30:00Z",
    "updated_at": "2026-01-15T10:30:00Z"
  }
}
Error Response - Validation
{
  "status": "error",
  "message": "Validation error",
  "errors": {
    "family_id": ["The family_id has already been taken."]
  }
}