發放代金券
HTTP 請求
POST /v5/broker/award/distribute-award
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
accountId | true | string | 用戶ID |
awardId | true | string | 代金券ID |
specCode | true | string | 自定義唯一標識碼, 最長8位 |
amount | true | string | 代金券金額 |
brokerId | true | string | Broker ID |
響應參數
無
請求示例
- HTTP
- Python
- Node.js
POST /v5/broker/award/distribute-award HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1726110531734
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 128
{
"accountId": "2846381",
"awardId": "123456",
"specCode": "award-001",
"amount": "100",
"brokerId": "v-28478"
}
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.issueBrokerVoucher({
accountId: '2846381',
awardId: '123456',
specCode: 'award-001',
amount: '100',
brokerId: 'v-28478',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": ""
}