Skip to content

游戏列表查询 ​

获取当前 Agent 已授权激活的可用游戏列表。

环境地址 ​

环境Base URL
生产环境https://hub-panel-api.v7stech.com
测试环境https://hub-panel-api-dev.v7stech.com

接口信息 ​

属性值
路径POST /papi/v1/game/list
认证Agent Token(Bearer)
Content-Typeapplication/x-www-form-urlencoded

请求头 ​

Header值必填
AuthorizationBearer {agent_token}✅ 必填

请求参数 ​

参数名类型必填说明
brand_guidstring否Hub Brand GUID,推荐用它精确筛选品牌
brandstring否按当前 Brand Code 或 Name 搜索,可能匹配多个品牌
game_genreinteger(form 中为数字文本)否2 Slot、3 Fish、4 Sport、5 Card、6 Live、7 Other;旧 game_type / category 不再用于筛选
currencystring否结算货币代码,只返回支持且已为当前 Agent 启用的游戏;传 all 或 ALL 则不按单一币种过滤
pageint否当前页码,默认 1
pageSizeint否每页数据量,默认 10,最大限制 100

请求示例 ​

bash
curl -X POST https://api.example.com/papi/v1/game/list \
  -H "Authorization: Bearer {agent_token}" \
  -d "brand_guid=30ff77f5-0616-4ecc-a8a3-80e35fcaaf3e&game_genre=2&page=1&pageSize=20"

AI 开发提示词(可直接复制) ​

text
请修改当前包网项目的 VCT 游戏目录接入,复用现有 HTTP Client、Agent Token、分页和错误处理。

接口:POST {VCT_BASE_URL}/papi/v1/game/providers 与 POST {VCT_BASE_URL}/papi/v1/game/list。
Content-Type:application/x-www-form-urlencoded;Authorization:Bearer {agent_token}。凭证及签名只在后端处理。

实现要求:
1. providers 的 data 数组和 game/list 的 data.list 均保存 brand_guid、brand_code、brand_name;providers.data 另外返回 Brand 图片字段 logo_url。两个目录响应不再返回 brand,不要要求或读取这个响应字段。名称、编码和图片地址读取 Hub 的 Brand 主资料,不从 Product Name 推导。
2. brand_guid 是 Hub Brand 唯一键;不同 GUID 即使 Code、Name 完全相同也必须分别保存。以 brand_guid 做关联、缓存键和选择器 value;显示 brand_name,辅以 brand_code。logo_url 只用于展示,不得作为身份或缓存键;为空时显示默认图或占位图。
3. 选中 Brand 后调用 game/list 传 brand_guid 精确筛选,不再用名称或 Code 唯一定位;类型筛选改传数字 game_genre,保留 currency 与分页。page 默认 1,pageSize 默认 10、最大 100;批量拉取按 data.total 读完全部分页。
4. 游戏仍以返回的 id 作为 game_id 保存和启动;不要把 brand_guid 当作 game_id。currency 可能为逗号分隔的实际可用币种;请求 currency=ALL 或省略表示不过滤单一币种,不绕过授权,也不能用 ALL 启动游戏。
5. 成功需同时满足 HTTP 成功、code=0、status 不为 false;空数组是正常结果。保留维护状态、图片、币种和分类逻辑,切换筛选取消过期请求。
6. 迁移旧数据时保留历史交易与关联;禁止仅凭名称或 Code 自动合并、猜测 GUID。可唯一确认的旧关联才回填;有歧义的列出清单。新接口未部署或缺少 brand_guid 时给出升级提示,停止迁移,不能回退为按名称合并或清空已有数据。
7. bet-push 回调也携带 brand_guid、brand_code、brand_name,注单通过 brand_guid 关联目录。game/rates 也支持 brand_guid 精确筛选并返回三个 Brand 字段;费率、目录和注单使用同一 GUID 关联,保留历史账单及计算规则。
8. 测试同名同 Code 不同 GUID 保持独立、GUID 筛选、两接口字段一致、Brand 改名后关联不变、多页完整拉取、空结果、旧响应缺字段与迁移歧义。凭证和完整 Token 不得进入前端或普通日志。

先检查现有代码,然后完成最小必要修改、测试和迁移说明;说明修改文件及仍需人工确认的旧数据。

Brand 唯一标识与迁移 ​

两接口统一通过已有 brand_guid 查询 Hub Brand 主资料,返回 brand_guid、brand_code、brand_name;/game/providers 还返回 logo_url。不再返回重复的 brand 响应字段。编码使用 brand_code,名称使用 brand_name。Code 与 Name 都可能跨来源重复,包网必须用 brand_guid 作为唯一键,名称仅用于显示。logo_url 只用于展示,可能为空或因运营更换图片而变化。

/game/providers 按 Brand GUID 保持独立,不合并同 Code / Name 的不同 Brand;选择 Brand 后,将它的 brand_guid 原样传给 /game/list。原 brand 参数仍可按当前 Code 或 Name 搜索,但可能返回多个 Brand。缺失或已删除的 Brand、空 Brand Code 不返回。

此契约需部署更新后的 Hub 后端才能使用。对缺少 brand_guid 的旧响应,应提示升级并暂停迁移,不能退回按名称合并。旧关联只在能唯一确认时回填 GUID,保留历史交易,有歧义的数据人工核对。

游戏日志推送使用相同的 Brand GUID 关联注单。费率查询也支持相同的 brand_guid 精确筛选与关联。

响应字段 ​

Data 字段结构 ​

字段类型说明
listarray游戏对象列表
totalint总条数
pageint当前页码
pageSizeint每页条数

list[Item] 结构 ​

字段类型说明
idstring游戏 GUID
namestring游戏名称
codestring游戏代码
game_genreinteger游戏类型数字;未知/未整理的数据返回 0
game_genre_namestring本地展示名称:2 Slot、3 Fish、4 Sport、5 Card、6 Live、7 Other;其余为空字符串
currencystring结算货币代码
brand_guidstringHub Brand 唯一 GUID,关联和选择器使用此字段
brand_codestringHub Brand 主资料的当前 Code,不保证跨 Brand 唯一
brand_namestringHub Brand 主资料的当前 Name,仅用于显示
imagestring游戏图片 URL
is_maintenanceboolean是否处于维护状态

币种与 ALL 游戏规则 ​

游戏商主数据中的 currency=ALL 是“由平台币种白名单决定”的标记,不是可直接启动的币种,也不会原样返回给包网。Hub 会将它替换为当前全局已启用、且同时满足游戏/Brand、Agent 币种权限和佣金授权的实际币种;响应中的 currency 是最终可启动币种列表。

因此:

  • 在 Currency Management 停用某币种后,该币种不会出现在 ALL 游戏的 currency,也不能用它启动游戏。
  • 若 ALL 游戏未返回,除请求筛选条件外,请确认至少有一个币种通过上述全部授权;currency=all/ALL 只是不按单一币种筛选,并不绕过授权。
  • 包网应使用响应内实际返回的币种调用启动接口,不要以 ALL 作为 /game/launch 的 currency。

成功响应 ​

json
{
  "status": true,
  "code": 0,
  "data": {
    "list": [
      {
        "id": "210889a00fc2472992eb040d10d4527f",
        "name": "10 Sparkling Crown",
        "code": "526",
        "game_genre": 2,
        "game_genre_name": "Slot",
        "currency": "IDR",
        "brand_guid": "example-ja-brand-guid",
        "brand_code": "JA",
        "brand_name": "JA",
        "image": "https://images.gscplusmd.com/statics/staging/publics/images/games/1/1091/SLOT/526.png",
        "is_maintenance": false
      }
    ],
    "total": 1,
    "page": 1,
    "pageSize": 20
  },
  "msg": "获取成功"
}

失败响应 ​

json
{
  "status": false,
  "code": 7,
  "data": {},
  "msg": "operator_code mismatch"
}

VCT Gaming Integration Platform