라우트 사양에서 REST 엔드포인트 문서
복사 붙여넣기 없이 모든 엔드포인트에 일관된 OpenAPI 스타일 문서
입력 및 출력 미리보기
입력
- Auth Type
- api-key
- Api Info
- Create a draft invoice
출력 (발췌)
### 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.