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/productsGET /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-HEXExample 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
}| Field | Meaning |
|---|---|
| sku | Unique product identifier — use this in cart links |
| name / description | Display text |
| price / currency | Current catalog price, always USD |
| availability | in_stock or out_of_stock — live stock is re-validated when items are added to a cart |
| category | Sub-category label, matches /products?category= |
| tags | Keywords for matching user requests to products |
| url | Canonical product page (has schema.org JSON-LD markup) |
| weight_lb | Shipping weight in pounds (present when known) |
| image_url | Absolute 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,...:QTYis optional and defaults to1(e.g.add=SKU1,SKU2adds one of each).- If a SKU contains spaces or other special characters, URL-encode it (spaces become
%20). - Unrecognized SKUs are skipped, not fatal — the visitor sees which ones couldn't be added.
- Visiting the link adds the items and redirects to a clean
/cartURL, so refreshing the page won't add them twice.
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:13. Recommended workflow
- Fetch
/api/products(or specific SKUs) to get current names, prices, and stock. - Pick the items that match what the person asked for.
- Build a cart link with those SKUs and quantities.
- 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.
