Venddor API - Product Features

Product Features

Product features allow you to define and manage various attributes of products in your store. Features help customers compare products and make informed purchasing decisions.

External Documentation:

For comprehensive information about product features, please visit the CS-Cart Developer Guide:

Product Features Documentation

Overview of Product Features

Product features are characteristics or attributes that define products in your store. They can be used to:

Types of Product Features

The Venddor API supports several types of product features:

Type Code Type Name Description
C Checkbox A simple yes/no feature (e.g., "Waterproof")
S Select Box A dropdown with predefined variants (e.g., "Material" with options like "Cotton", "Polyester", etc.)
M Multiple Checkbox Multiple options can be selected (e.g., "Connectors" with options like "HDMI", "USB", "DisplayPort")
N Number Numeric values (e.g., "Weight in kg")
T Text Free-form text input (e.g., "Model Number")
D Date Date selection (e.g., "Manufacturing Date")
E Extended Brand/Manufacturer selection (a specialized feature type)

API Endpoints for Product Features

GET /product_features

Retrieves a list of all product features with their details.

Query Parameters

Parameter Type Required Description
feature_types string No Filter features by type (e.g., "C,S,M" for Checkbox, Select Box, and Multiple Checkbox)
get_variants string No Set to "Y" to include feature variants in the response
GET /product_features/{feature_id}

Retrieves details of a specific product feature.

Path Parameters

Parameter Type Required Description
feature_id* integer Yes The unique identifier of the feature to retrieve
POST /product_features

Creates a new product feature.

Request Parameters

Parameter Type Required Description
feature_type* string Yes The type of feature (e.g., "C", "S", "M", etc.)
description* string Yes The name/description of the feature
categories_path string No Category IDs where the feature should be available (comma-separated)
variants array No Feature variants (required for Select Box and Multiple Checkbox types)
{
  "feature_type": "S",
  "description": "Material",
  "categories_path": "12,15,18",
  "variants": [
    {
      "variant": "Cotton"
    },
    {
      "variant": "Polyester"
    },
    {
      "variant": "Wool"
    }
  ]
}

Assigning Features to Products

After creating product features, you can assign them to specific products:

PUT /products/{product_id}

Updates a product to assign features.

{
  "product_features": {
    "16": "42",    // Feature ID 16 = Variant ID 42
    "18": "Y",     // Checkbox feature ID 18 = Yes
    "23": "500",   // Number feature ID 23 = 500
    "25": "Model X15" // Text feature ID 25 = "Model X15"
  }
}
Tip: When working with large product catalogs, you can create product feature groups to organize related features. This makes it easier for customers to navigate through product specifications.

Feature Filters

Product features can be used to create powerful filtering capabilities in your store. The API supports retrieving filtered products:

GET /products?features_hash={features_hash}

Retrieves products filtered by specific feature values.

Query Parameters

Parameter Type Required Description
features_hash string No Encoded filter criteria based on feature values
Note: The features_hash parameter uses a specific format to encode filtering criteria. Refer to the external documentation for details on constructing this parameter.