Get Credential Discounts
Description
取得憑證優惠列表。
Resource
GET /v1/basic/credential-discounts
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| id | string | 憑證編號 (optional) |
Request Example
GET /v1/basic/credentials?id=CX0001
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| credentials | Credential | 憑證列表 |
Response Body Parameters - Credential
| Name | Type | Description |
|---|---|---|
| id | string | 憑證編號 |
| name | string | 憑證名稱 |
| discount_type | string (enum) |
折扣類型 ALLOWED VALUES:
|
| discount_rate | float | 折扣率 (optional) |
| discount_amount | integer | 折價金額 (optional) |
| description | boolean | 憑證描述 |
Response Example - Http code = 200
{
"credentials": [
{
"id": "CX0001",
"name": "員工證",
"discount_type": "DISCOUNT_PERCENTAGE",
"discount_rate": 0.9,
"discount_amount": 0,
"description": "員工證可以打九折"
}
]
}
Response Example - Http code = 404
{
"message": "查無憑證優惠資訊"
}