商品是你賣的東西——一個商品底下可以有多個價格(例如同一個商品有月繳跟年繳兩種價格)。
GET/api/Product— 列出這個工作區的商品
| 屬性 | 值 |
|---|
| 所需權限 | products:read |
| Idempotency-Key | 不需要 |
| 參數 | 位置 | 型別 | 必填 |
|---|
page | query | integer (int32) | |
pageSize | query | integer (int32) | |
orderBy | query | string | |
orderDirection | query | string | |
createdFrom | query | string (date-time) | |
createdTo | query | string (date-time) | |
POST/api/Product— 建立一個新商品
| 屬性 | 值 |
|---|
| 所需權限 | products:write |
| Idempotency-Key | 不需要 |
| 參數 | 位置 | 型別 | 必填 |
|---|
active | body | boolean | |
description | body | string | |
metadata | body | object | |
name | body | string | |
GET/api/Product/{productId}— 讀取單一商品
| 屬性 | 值 |
|---|
| 所需權限 | products:read |
| Idempotency-Key | 不需要 |
| 參數 | 位置 | 型別 | 必填 |
|---|
productId | path | string | 必填 |
PUT/api/Product/{productId}— 更新商品(名稱、描述、上架狀態)
| 屬性 | 值 |
|---|
| 所需權限 | products:write |
| Idempotency-Key | 不需要 |
| 參數 | 位置 | 型別 | 必填 |
|---|
productId | path | string | 必填 |
active | body | boolean | |
description | body | string | |
metadata | body | object | |
name | body | string | |