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:
Attribute | Type | Required | Content |
---|---|---|---|
|
| Required | The product ID. |
|
| Required | The product name. |
|
| Required | The product description. |
|
| Required | The product current selling price. |
|
| Optional | The product original list price. |
|
| Required | The full URL for the product image. This will be used for thumbnails when displaying products. We recommend a maximum image size of 200x200px. |
|
| Required | The full URL for the product page. |
|
| Required | A list of the category IDs for the product categories. |
|
| Required | Unix timestamp for when the product was created. |
|
| Optional | The product brand as a string. |
|
| Optional | The product SKU (Stock Keeping Unit). |
|
| Optional | Stock count of this product. |
|
| Optional |
|
|
| Optional | Is the product for a specific gender? Add that information. |
|
| Optional | Color information about the product. |
|
| Optional | Keywords or synonyms that should be searchable for the product. |
| If If Defaults to |
[
{
"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
}
]