根据路由规范生成 REST 端点文档
无需复制粘贴,为每个端点生成风格统一的 OpenAPI 式文档
查看输入和输出预览
输入
- Method
- POST
- Path
- /v1/invoices
- Summary
- Create a draft invoice
- Auth
- Bearer token
输出(节选)
### POST /v1/invoices
Create a draft invoice for a customer. Drafts can be finalised later via `POST /v1/invoices/{id}/finalize`.
**Auth:** Bearer token (scope: `invoices:write`).
**Request body:**
```json
{ "customer_id": "cus_123", "currency": "usd", "line_items": [{"description": "Q3 retainer", "amount": 250000}] }
```
**Response 201:** the full Invoice object with `status: "draft"`. **400** on missing customer_id. **402** when the customer has past-due invoices. **429** with `Retry-After` header above 100 req/min.