Files
saasshop/docs/API_BASELINE.md

61 lines
860 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# API 基础规范(当前版本)
## 基础前缀
- `/api/v1`
## 当前接口
### 系统
- `GET /api/v1/ping`
- `GET /api/v1/platforms`
### 认证
- `POST /api/v1/auth/login`
- `POST /api/v1/auth/channel-login`
### 商品
- `GET /api/v1/products`
- `GET /api/v1/products/{id}`
### 订单
- `GET /api/v1/orders`
- `POST /api/v1/orders`
## 统一返回结构
```json
{
"code": 0,
"message": "ok",
"data": {},
"server_time": "2026-03-08 13:00:00"
}
```
## 多端预留字段
### users
- `register_source`
- `last_login_source`
- `wechat_openid`
- `wechat_unionid`
- `mini_openid`
### orders
- `platform`
- `payment_channel`
- `payment_status`
- `device_type`
### oauth_accounts
- `platform`
- `provider`
- `openid`
- `unionid`
- `app_id`
- `raw_payload`
## 支持方向
- PC
- H5
- 微信公众号
- 微信小程序
- APP预留 API 层)