Product Metadata

How to load product metadata and attributes directly from the Clerk.io API.

All API endpoints that return product-results also allow you to load metadata about the products in the same request.

This is handled via the attributes parameter in which you list the product attributes that you want for each product.

The resulting product metadata is available as part of the response object in the product_data entry.

curl -X POST \
     -H 'Content-Type: application/json' \
     -d '{"key": "store_api_key",
          "limit": 2
          "attributes": ["id", "name", "price"]}' \
     https://api.clerk.io/v2/recommendations/popular

{
  "status": "ok",
  "result": [123, 456],
  "product_data": [
    {
      "id": 123,
      "name": "Green Lightsaber",
      "price": 1599.95
    },
    {
      "id": 456,
      "name": "Super Death Star",
      "price": 999999999999995.95
    }
  ]
}