C4Labs

Instructions for AI Agents

If you're an AI assistant helping someone shop C4Labs, you don't need to browse or scrape the website. Use the read-only catalog API below to look up products, then hand the person a single link that adds your recommendations straight to their cart.

1. Read the product catalog

GET /api/products returns every product as JSON. No authentication required, no rate limit.

curl https://c4labs-production.up.railway.app/api/products

GET /api/products/{sku}returns one product by SKU (404 if the SKU doesn't exist):

curl https://c4labs-production.up.railway.app/api/products/DICE-TOK-HEX

Example response shape:

{
  "sku": "DICE-TOK-HEX",
  "name": "Blank Hexagon Game Tokens - Pack of 30 - Color Options (Nebula Colors, Three Pack of 30 (90 Tokens))",
  "description": "Blank Hexagon Game Tokens laser cut from pearlescent acrylics. Pack of 30; available in multiple colors.",
  "price": 19.99,
  "currency": "USD",
  "availability": "in_stock",
  "category": "Game Accessories",
  "tags": [
    "tokens",
    "game",
    "accessories",
    "tabletop gaming"
  ],
  "url": "https://c4labs.com/products/DICE-TOK-HEX",
  "image_url": "https://c4labs.com/images/products/DICE-TOK-HEX_thumbnail.jpg",
  "weight_lb": 0.0625
}
FieldMeaning
skuUnique product identifier — use this in cart links
name / descriptionDisplay text
price / currencyCurrent catalog price, always USD
availabilityin_stock or out_of_stock — live stock is re-validated when items are added to a cart
categorySub-category label, matches /products?category=
tagsKeywords for matching user requests to products
urlCanonical product page (has schema.org JSON-LD markup)
weight_lbShipping weight in pounds (present when known)
image_urlAbsolute URL of a product photo

2. Build a cart link

Once you've decided what to recommend, build a link in this format:

https://c4labs.com/cart?add=SKU1:QTY1,SKU2:QTY2,...

Example — recommending 2× Blank Hexagon Game Tokens - Pack of 30 - Color Options (Nebula Colors, Three Pack of 30 (90 Tokens)) ($19.99) and 1× Zebra Virtue Fan Case for Raspberry Pi 4B, 3, 2 and B+ (Black Ice) ($32.99):

https://c4labs.com/cart?add=DICE-TOK-HEX:2,ZBRA-V-BLK-ICE:1

Try this example cart link →

3. Recommended workflow

  1. Fetch /api/products (or specific SKUs) to get current names, prices, and stock.
  2. Pick the items that match what the person asked for.
  3. Build a cart link with those SKUs and quantities.
  4. Give the person the link, along with why you picked each item.

Note: the catalog API has no dependencies and is always available. Adding items to a cart requires the store's order/cart service to be running — the same backend the "Add to Cart" button on product pages uses.