创建活动
描述
创建免费投注活动,并向指定玩家发放免费次数。活动绑定一款游戏和一种币种,创建后不能修改参数,只能取消。请求以 request_id 保证幂等。
请求方式
| Item | Name | Sample |
|---|---|---|
| Path | Path | {Api_Address}/merchant/activity/create |
| Request Method | POST |
请求参数
| Name | Type | Required | Description |
|---|---|---|---|
| Sign Params | Y | Api 接入规范 | |
| request_id | string | Y | 请求唯一标识,用于幂等。重复请求返回第一次的结果 |
| activity_name | string | Y | 活动名称,允许重复 |
| player_id | array | Y | 获得免费次数的玩家 ID,支持一个或多个 |
| start_time | string | Y | 免费次数可使用的开始时间,YYYY-MM-DDTHH:MM:SS,UTC |
| end_time | string | Y | 免费次数可使用的结束时间,格式同上,必须晚于 start_time |
| activity_type | string | Y | 目前仅支持 freebet |
| game_id | string | Y | 游戏数字 ID(游戏列表接口返回的 game_id)。活动绑定该单款游戏,该游戏必须支持免费投注 |
| currency | string | Y | 投注币种 |
| bet_amount | string | N | 每次免费次数的投注金额,玩家无需支付。为空则默认游戏最小投注额 |
| max_payout | string | N | 每次免费次数的最大派奖金额。为空则默认游戏最大派奖金额 |
| free_times | int | Y | 每个玩家获得的免费次数,必须大于 0 |
返回参数
| Name | Type | Required | Description |
|---|---|---|---|
| code | int | Y | 0 表示成功 |
| msg | string | Y | 对应 code 的错误描述 |
| activity_id | string | Y | 创建成功的活动 ID |
请求示例
Http Request
Post Method
URL : {Api_Address}/merchant/activity/create?mid=1697028447&sign=...&ts=1713768205
Content-Type:application/json
{"request_id":"req_20250620_001","activity_name":"Welcome bonus","player_id":["p456","p457"],"start_time":"2025-06-20T00:00:00","end_time":"2025-06-25T23:59:59","activity_type":"freebet","game_id":"10000","currency":"PHP","bet_amount":"0.2","max_payout":"10","free_times":5}
Http Response(success)
{"code":0,"msg":"","activity_id":"act_freebet456789"}