Platform API平台接口
Round report URL单局报表地址
A one-time URL to a page showing one finished round: result, bets, wins and its wallet transactions.已结束的一局的一次性报表地址:结果、注单、派彩与该局的钱包交易。
POST
/merchant/v1/rounds/report-urlA one-time URL to a page showing one round: the result, the player's bets and wins, and the round's wallet transactions. Request a fresh URL every time someone wants to look.
一局的一次性报表地址:页面显示这一局的结果、玩家每个点位的投注与赢、以及这一局的钱包交易。每次要看都重新申请。
Request body请求正文
roundIdstringrequired必填
The
roundId we sent in /debit and /credit. Only your own rounds, and only rounds that are closed (paid out or refunded).平台在 /debit、/credit 里给的 roundId。只能是本商户的、已经关局(已派彩或已退款)的局。langstringoptional可选
Page language, same rules as
games/launch, e.g. en, zh-Hans. Default en; an unknown value falls back to English.页面语言,规则同 games/launch,如 en、zh-Hans。默认 en,认不出的按英文。timeZonestringoptional可选
Time zone for every time on the page, an IANA name such as
Asia/Shanghai; the page header shows it. Default UTC; an unknown name is INVALID_PARAM.页面上所有时间按这个时区显示,IANA 时区名,如 Asia/Shanghai;页头会标明。默认 UTC,认不出的回 INVALID_PARAM。Response data响应 data
reportUrlstring
Opens once. The first open shows the report; a refresh, a second click or a forwarded copy shows "link expired" (HTTP 410).只能打开一次。第一次打开显示报表;刷新、再点一次或转发给别人都显示「链接已失效」(HTTP 410)。
expiresAtstring
Expiry if never opened (10 minutes after issue).一直没打开时的失效时间(签发后 10 分钟)。
Limit限流At most 60 report URLs per merchant per minute. Above that we answer
MAINTENANCE with message too many report links, retry later; wait a minute and retry. A round that is not yours, not closed or does not exist is ROUND_NOT_FOUND (we do not tell these apart).每个商户每分钟最多 60 个报表地址,超了回 MAINTENANCE,说明 too many report links, retry later,过一分钟再试。不是本商户的、还没关局的、不存在的局一律 ROUND_NOT_FOUND(不区分)。Result codes结果码
In addition to the common codes listed in另可能返回通用结果码,见 Result codes结果码.
Test cases测试用例
Run each case against the staging environment before go-live. Signature, timestamp, request ID and IP cases apply to every endpoint and are listed under上线前请在测试环境逐条执行。签名、时间戳、请求编号与 IP 相关用例适用于所有接口,见 Authentication签名认证.
R-01 Normal正常 A closed round of this merchant本商户已关局的一局 Expected期望 OKroundId of a closed wallet round已关局的钱包局号
reportUrl opens once and shows the round in the requested language and time zone.reportUrl 能打开一次,按请求的语言与时区显示。
R-02 Rejection拒绝 Unknown round局号不存在 Expected期望 ROUND_NOT_FOUNDroundId R0000000000000roundId R0000000000000
The three cases are not distinguished.三种情况不区分。
R-03 Rejection拒绝 Missing roundId缺少 roundId Expected期望 INVALID_PARAM{}{}
R-04 Rejection拒绝 Unrecognized time zone时区无法识别 Expected期望 INVALID_PARAMtimeZone "GMT+8"timeZone "GMT+8"
Use IANA names such as Asia/Shanghai.要用 IANA 名,如 Asia/Shanghai。
R-05 Boundary边界 Rate limit调用频率上限 Expected期望 OK ×60 → MAINTENANCE60 calls, then one more within the same minute同一分钟内调用 60 次后再调用 1 次
message: too many report links, retry later.message:too many report links, retry later。
R-06 Normal正常 Report URL is single-use报表地址一次性有效 Expected期望 HTTP 200 → HTTP 410Open the reportUrl from R-01 twice打开 R-01 返回的 reportUrl 两次
The second open is refused.第二次打开被拒。
R-07 Normal正常 A cancelled round of this merchant本商户已取消的一局 Expected期望 OKroundId of a cancelled wallet round已取消的钱包局号
R-08 Rejection拒绝 A round not yet closed尚未关局的一局 Expected期望 ROUND_NOT_FOUNDroundId of a void / open wallet round作废或未关局的钱包局号
R-09 Rejection拒绝 Another merchant's round其他商户的局 Expected期望 ROUND_NOT_FOUNDroundId of another merchant's closed round其他商户已关局的局号
R-10 Boundary边界 roundId of 32 charactersroundId 长 32 个字符 Expected期望 ROUND_NOT_FOUNDMaximum length, unknown round长度上限,局号不存在
R-11 Boundary边界 roundId of 33 charactersroundId 长 33 个字符 Expected期望 INVALID_PARAMOne character over the limit超出上限 1 个字符
R-12 Normal正常 IANA time zoneIANA 时区 Expected期望 OKtimeZone "Asia/Shanghai"timeZone "Asia/Shanghai"
R-13 Boundary边界 Surrounding spaces are trimmed首尾空格被去除 Expected期望 OKroundId padded with spacesroundId 首尾带空格
R-14 Rejection拒绝 Wrong field type字段类型错误 Expected期望 INVALID_PARAMroundId sent as a numberroundId 以数字发送