Product

How Products are represented in Clerk.io

A product is represented as a product object. A product object is a JSON object where each key, value pair corresponds to a product attribute name, attribute value.

All attribute names must be strings and values can be either bool, int, float, string or a list of the former.

A product can have any number of attributes but must at least contain the following marked as Required:

AttributeTypeRequiredContent
idint or strRequiredThe product ID.
namestrRequiredThe product name.
descriptionstrRequiredThe product description.
pricefloatRequiredThe product current selling price.
list_pricefloatOptionalThe product original list price.
imagestrRequiredThe full URL for the product image. This will be used for thumbnails when displaying products. We recommend a maximum image size of 200x200px.
urlstrRequiredThe full URL for the product page.
categorieslist of int or strRequiredA list of the category IDs for the product categories.
created_atunix timestampRequiredUnix timestamp for when the product was created.
brandstrOptionalThe product brand as a string.
skustrOptionalThe product SKU (Stock Keeping Unit).
stockintOptionalStock count of this product.
ageintOptionalThe number of days since the product was created.
on_saleboolOptionaltrue if this product is on sale, else false.
genderstrOptionalIs the product for a specific gender? Add that information.
color / colorsstr or list of strOptionalColor information about the product.
keywordsstr or list of strOptionalKeywords or synonyms that should be searchable for the product.
indexIf false, the product will not be indexed and thus not shown in any results. It will still be kept in the database as historic data so results like alternatives and personal recommendations can be based on it.

If true, the product will be indexed as normal.

Defaults to true if not sent.
[
  {
    "id": 135,
    "name": "Green Lightsaber",
    "description": "Antique Rebel Lightsaber",
    "price": 99995.95,
    "image": "https://galactic-empire-merch.com/images/a-r-lightsaber.jpg",
    "url": "https://galactic-empire-merch.com/antique-rebel-lightsaber",
    "brand": "Je’daii",
    "categories": [987, 654],
    "created_at": 1199145600
  },
  {
    "id": 261,
    "name": "Death Star Deluxe",
    "description": "Death Star - Guaranteed idiot proof",
    "price": 99999999999999.95,
    "image": "https://galactic-empire-merch.com/images/death-star.jpg",
    "url": "https://galactic-empire-merch.com/death-star",
    "brand": "Imperial Inc.",
    "categories": [345678],
    "created_at": 1197565600
  }
]