Files
agent-loop/async-agent-lab/fixture/order-service/docs/api-contract.md
2026-11-12 15:29:12 +08:00

31 lines
850 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.

# 订单接口约定
## GET /orders/:id
```json
{
"id": "o_1001",
"amount": 12900,
"status": "PAID",
"updatedAt": 1794448946000
}
```
| 字段 | 说明 |
| --- | --- |
| `id` | 订单号 |
| `amount` | 金额,单位分 |
| `status` | 订单状态,取值 `CREATED`、`PAID`、`SHIPPED`、`CANCELLED` |
| `updatedAt` | 最后一次状态变化的毫秒时间戳 |
## 调用方
仓库内的调用方在 `src/consumers/`,随本仓库一起发版。
仓库外还有两个调用方直接读取这个返回体,它们有各自的发版节奏,本仓库改不到:
- **App 订单详情页**(iOS、Android),按 App 版本灰度,旧版本会在线上留存一段时间。
- **合作方对账服务**,由合作方维护,接口变更需要提前通知。
接口字段的增删要先确认这两个调用方的兼容安排。