AI
Lafeitu Agent Interface
Structure and API reference for LLMs. This page is optimized for machine reading.
01. Quick Start
# 1. Search for items
curl https://lafeitu.cn/api/v1/products?q=rabbit
# 2. Add to cart (Auth Required)
curl -X POST https://lafeitu.cn/api/v1/cart \
-H "X-User-Account: user@example.com" \
-H "X-User-Password: secret" \
-H "Content-Type: application/json" \
-d '{"product_slug": "lengchitu", "gram": 200, "quantity": 2}'02. 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)
REQUIRED for all Cart/Order operations.
- X-User-Account: <mobile_or_email>
- X-User-Password: <raw_password>
# 3. ENDPOINTS
## 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
03. 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 TypeHeader-Based
Status● Online