开放平台 API 文档
卡种查询、提货、订单查询与账户余额。基于原始接口开发文档整理,字段与状态码保持原文定义。
接入信息
拟定接口基础地址:https://api.auroradigital.gg/api。接口均使用 POST,JSON 请求体包含 appId、timeStamp、sign;具体业务字段详见各接口。
开放平台账号、密码及 appSecret 请联系对接方获取;不要在浏览器端代码或公开文档中存放密钥。
注意:新域名与简短路径仅在文档中拟定,当前服务端仍使用旧路径;上线前需配置并验证域名及网关路由,不能直接按本页地址调用。页面中的 JSON 是结构示意,签名必须按各接口实际业务字段生成。原文未明确时间戳单位、时效窗口或测试环境地址,接入前请与接口提供方确认。本页不自动发起请求。
签名规则
按字段名排序,将 appSecret + key1 + value1 + ... + keyN + valueN + appSecret 的 UTF-8 字节计算 MD5,输出小写十六进制字符串。只放参与签名的业务字段,不把 sign 本身加入参数 Map;示例中的标识均为占位值。
Java · 签名函数
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.Map;
public static String sign(Map<String, String> params, String appSecret) throws Exception {
String[] keys = params.keySet().toArray(new String[0]);
Arrays.sort(keys);
StringBuilder input = new StringBuilder(appSecret);
for (String key : keys) {
input.append(key).append(params.get(key));
}
input.append(appSecret);
byte[] digest = MessageDigest.getInstance("MD5")
.digest(input.toString().getBytes(StandardCharsets.UTF_8));
StringBuilder output = new StringBuilder();
for (byte value : digest) {
output.append(String.format("%02x", value & 0xff));
}
return output.toString();
}
// params 中仅放参与该接口签名的业务字段,不包括 sign。
// appId 和 appSecret 由对接方提供;不要写入客户端公开代码。没有匹配的接口。
01 / 04POST
获取卡种
查询可用卡种、库存和字段说明。
POST
https://api.auroradigital.gg/api/open/categories请求参数
Content-Type: application/json · 请求体 JSON
| 名称 | 类型 | 是否必须 | 默认值 | 备注 |
|---|---|---|---|---|
appId | string | 必须 | — | appId |
timeStamp | string | 必须 | — | 时间戳 |
sign | string | 必须 | — | 签名 |
响应字段
通用响应包含 code、msg 和 data。
| 名称 | 类型 | 默认值 | 备注 |
|---|---|---|---|
code | integer | — | 200 成功、 400 参数错误、 429 重复提交、 500 系统异常 |
msg | string | — | 成功或错误信息 |
data | string | — | 返回对象 |
data 字段
| 字段 | 类型 | 必填 | 默认值 | 说明 | 补充 |
|---|---|---|---|---|---|
| — | object [] | 非必须 | — | — | item 类型: object |
categoryCode | string | 非必须 | — | 卡种code | — |
cardName | string | 非必须 | — | 名称 | — |
inventory | integer | 非必须 | — | 库存 | — |
cardCost | number | 非必须 | — | 销售单价(保留两位小数) | — |
cardCategoryDetails | object [] | 非必须 | — | 卡种字段与解释 | item 类型: object |
fieldName | string | 非必须 | — | 字段名称 | 如cardNo、pwd、str1等 |
columeName | string | 非必须 | — | 字段中文名 | — |
业务状态码
200 成功400 参数错误429 重复提交500 系统异常
02 / 04POST
提货
按订单号和卡种提货,返回卡号与密码。
POST
https://api.auroradigital.gg/api/open/outbound请求参数
Content-Type: application/json · 请求体 JSON
| 名称 | 类型 | 是否必须 | 默认值 | 备注 |
|---|---|---|---|---|
appId | string | 必须 | — | AppID |
orderNo | string | 必须 | — | 订单号(唯一) |
timeStamp | string | 必须 | — | 时间戳 |
categoryCode | string | 必须 | — | 卡种code |
count | integer | 必须 | — | 发货数量 |
sign | string | 必须 | — | 签名 |
响应字段
通用响应包含 code、msg 和 data。
| 名称 | 类型 | 默认值 | 备注 |
|---|---|---|---|
code | integer | — | 200 成功、 400 参数错误、 411 卡种不存在、 412 余额不足、 413 库存不足、 414 订单号已存在、 429 重复提交、 500 系统异常 |
msg | string | — | 成功或错误信息 |
data | string | — | 返回对象 |
data 字段
| 字段 | 类型 | 必填 | 默认值 | 说明 | 补充 |
|---|---|---|---|---|---|
| — | object [] | 非必须 | — | — | item 类型: object |
cardNo | string | 非必须 | — | 卡号 | — |
pwd | string | 非必须 | — | 密码 | — |
str1 | string | 非必须 | — | 备用字段1 | — |
str2 | string | 非必须 | — | 备用字段2 | — |
str3 | string | 非必须 | — | 备用字段3 | — |
str4 | string | 非必须 | — | 备用字段4 | — |
str5 | string | 非必须 | — | 备用字段5 | — |
str6 | string | 非必须 | — | 备用字段6 | — |
str7 | string | 非必须 | — | 备用字段7 | — |
str8 | string | 非必须 | — | 备用字段8 | — |
str9 | string | 非必须 | — | 备用字段9 | — |
str10 | string | 非必须 | — | 备用字段10 | — |
业务状态码
200 成功400 参数错误411 卡种不存在412 余额不足413 库存不足414 订单号已存在429 重复提交500 系统异常
03 / 04POST
订单查询
按订单号查询提货结果与卡密。
POST
https://api.auroradigital.gg/api/open/order请求参数
Content-Type: application/json · 请求体 JSON
| 名称 | 类型 | 是否必须 | 默认值 | 备注 |
|---|---|---|---|---|
appId | string | 必须 | — | AppID |
timeStamp | string | 必须 | — | 时间戳 |
orderNo | string | 必须 | — | 订单号 |
sign | string | 必须 | — | 签名 |
响应字段
通用响应包含 code、msg 和 data。
| 名称 | 类型 | 默认值 | 备注 |
|---|---|---|---|
code | integer | — | 200 成功、 400 参数错误、 429 重复提交、 500 系统异常 |
msg | string | — | 成功或错误信息 |
data | string | — | 返回对象 |
data 字段
| 字段 | 类型 | 必填 | 默认值 | 说明 | 补充 |
|---|---|---|---|---|---|
orderNo | string | 非必须 | — | 订单号 | — |
cardName | string | 非必须 | — | 卡种名称 | — |
createTime | string | 非必须 | — | 提货时间 | — |
takeNum | integer | 非必须 | — | 提货数量 | — |
advanceCharge | number | 非必须 | — | 采购价(保留两位小数) | — |
openOutBounds | object [] | 非必须 | — | 卡密 | item 类型: object |
cardNo | string | 非必须 | — | 卡号 | — |
pwd | string | 非必须 | — | 密码 | — |
str1 | string | 非必须 | — | 备用字段1 | — |
str2 | string | 非必须 | — | 备用字段2 | — |
str3 | string | 非必须 | — | 备用字段3 | — |
str4 | string | 非必须 | — | 备用字段4 | — |
str5 | string | 非必须 | — | 备用字段5 | — |
str6 | string | 非必须 | — | 备用字段6 | — |
str7 | string | 非必须 | — | 备用字段7 | — |
str8 | string | 非必须 | — | 备用字段8 | — |
str9 | string | 非必须 | — | 备用字段9 | — |
str10 | string | 非必须 | — | 备用字段10 | — |
业务状态码
200 成功400 参数错误429 重复提交500 系统异常
04 / 04POST
账户余额
查询当前开放平台账户余额。
POST
https://api.auroradigital.gg/api/open/balance请求参数
Content-Type: application/json · 请求体 JSON
| 名称 | 类型 | 是否必须 | 默认值 | 备注 |
|---|---|---|---|---|
appId | string | 必须 | — | AppID |
timeStamp | string | 必须 | — | 时间戳 |
sign | string | 必须 | — | 签名 |
响应字段
通用响应包含 code、msg 和 data。
| 名称 | 类型 | 默认值 | 备注 |
|---|---|---|---|
code | integer | — | 200 成功、 400 参数错误、 429 重复提交、 500 系统异常 |
msg | string | — | 成功或错误信息 |
data | string | — | 返回对象 |
data 字段
| 字段 | 类型 | 必填 | 默认值 | 说明 | 补充 |
|---|---|---|---|---|---|
| — | number | 非必须 | — | 账户余额(保留两位小数) | — |
业务状态码
200 成功400 参数错误429 重复提交500 系统异常