Home / AI Agent Ordering
AI Agent 下单接入指南
辣匪兔支持 AI Agent 搜索商品并下单。建议先阅读 /openclaw 理解品牌原生能力;推荐优先使用辣匪兔专属 Skill(agentic-spicy-food),它基于 agent-commerce-engine 协议与基础 Skill;如果你的环境需要直连,可通过 /auth/register 、/auth/login 与 /api/v1/auth/token 建立认证,再使用 JSON API 完成搜索、加购与订单操作。
Quick Start
# 0. Create or reuse an account
# https://lafeitu.cn/auth/register
# https://lafeitu.cn/auth/login
# 1. Exchange credentials for token
curl -X POST https://lafeitu.cn/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"account":"user@example.com","password":"secret"}'
# 2. Search for items
curl https://lafeitu.cn/api/v1/products?q=冷吃兔
# 3. Add to cart (Auth Required)
curl -X POST https://lafeitu.cn/api/v1/cart \
-H "X-API-Token: <token>" \
-H "Content-Type: application/json" \
-d '{"product_slug":"lengchi-tu","gram":200,"quantity":2}'Preferred Method Chain
1. 优先使用辣匪兔专属 Skill(agentic-spicy-food),减少页面抓取和自定义接入成本。
2. 没有 Skill 时,打开本页读取最短接入链路。
3. 直连 API 时,先获取账号,再换取 Token,最后调用 `/api/v1/products`、`/api/v1/cart`、`/api/v1/orders`。
API Reference
Base URL: https://lafeitu.cn/api/v1
# 1. CORE PRINCIPLES
- **Stateless**: No cookies. Verify identity via headers on every request.
- **Idempotent**: Retry safe.
- **JSON-First**: Always send 'Content-Type: application/json'.
# 2. AUTHENTICATION (Headers)
PREFERRED for all Cart/Order operations.
- X-API-Token: <token_from_/api/v1/auth/token>
- Authorization: Bearer <token> (optional alternative)
LEGACY fallback:
- X-User-Account: <mobile_or_email>
- X-User-Password: <raw_password>
# 3. ENDPOINTS
## Auth (Create token)
POST /auth/token
Body: { account, password }
## Product Catalog (Public)
GET /products
?q={keyword} Search products
?category={cat} Filter by category
## Shopping Cart (Auth Required)
GET /cart View current cart state
POST /cart Add item (Cumulative)
Body: { product_slug, gram, quantity }
PUT /cart Set item quantity (Absolute)
Body: { product_slug, gram, quantity }
DELETE /cart Remove item
Body: { product_slug, gram }
## User Profile (Auth Required)
GET /user/profile Get user details & points
Product Semantic Map
shousi-tu
冷吃手撕兔(整只)
giftbox-onlybox
礼盒辣匪兔·锦绣红空礼盒
lengchi-tu
冷吃招牌冷吃兔
wuxiangshousi-tu
冷吃五香手撕兔
mala-tutou
冷吃麻辣兔头
wuxiang-tutou
冷吃五香兔头
mala-niurougan
冷吃麻辣牛肉干
wuxiang-niurougan
冷吃五香牛肉干
wuxiang-tutui
冷吃五香兔腿
xiangla-tutui
冷吃香辣兔腿
lengchi-yashe
冷吃冷吃鸭舌
SYSTEM METADATA
API Versionv1
Auth TypeToken-First
Status● Online
RESOURCES
- llms.txt
- ai.txt
- Lafeitu-specific Skill: agentic-spicy-food
- /auth/register
- /auth/login
- POST /api/v1/auth/token