# Build a cart

Send variant IDs and quantities. You get back the line items, the total and a checkout link on the store website.

> Nothing is bought here. The shopper opens the checkout link, reviews the cart and pays on the store's own checkout.

## Next actions

1. **Build a cart** — `POST https://agents.campfirehosting.com/cart?format=md`
   Body fields (form-encoded or JSON):
   - `items` (required): variant_id:quantity, comma separated, e.g. 123456:1,789012:2. Variant IDs are on each product page.
2. **Build a cart with a link** — `GET https://agents.campfirehosting.com/cart?format=md`
   If you can only open pages: https://agents.campfirehosting.com/cart?format=md?items=123456:1,789012:2 does the same.
   Query parameters:
   - `items` (required): variant_id:quantity, comma separated, e.g. 123456:1,789012:2. Variant IDs are on each product page.
3. **Search products** — `GET https://agents.campfirehosting.com/products?format=md`
   Filter by keyword, category, price, rating, stock and options.
   Query parameters:
   - `q` (optional): Keywords, e.g. "dotted notebook"
   - `max_price` (optional; number): Highest price in USD
   - `in_stock` (optional; select; one of: true, false)
4. **Compare products** — `GET https://agents.campfirehosting.com/compare?format=md`
   Side by side: price, rating, stock, options and specs.
   Query parameters:
   - `handles` (required): 2 to 5 product handles, comma separated
5. **List categories** — `GET https://agents.campfirehosting.com/categories?format=md`
6. **Shipping, returns and policies** — `GET https://agents.campfirehosting.com/policies?format=md`
7. **Build a cart** — `GET https://agents.campfirehosting.com/cart?format=md`
   Returns a checkout link for the shopper; nothing is paid here.
8. **Agent door index** — `GET https://agents.campfirehosting.com/?format=md`
