激活指定授权码的授权
请求地址: POST /sns/{sn}/update_code
接口说明
- 激活指定授权码的授权。
- 返回升级确认码。
请求参数
-
Path
参数名 类型 必需 示例值 说明 sn string 是 ABCDEFG123456 授权码 -
Body
"request info"
或
{
"code": "request info"
}
请求示例
本接口支持请求串、设备码、MAC地址三种形式:
- 请求串直接作为入参,请求串从客户端获取
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/update_code
bitkey: your-key
Content-Type: application/json
"<requestInfo> <version>3</version> <sn>xxx</sn> <code>xxx</code> <sign>xxx</sign> </requestInfo>"
- 使用JSON格式
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/update_code
bitkey: your-key
Content-Type: application/json
{
"code": "<requestInfo> <version>3</version> <sn>xxx</sn> <code>xxx</code> <sign>xxx</sign> </requestInfo>"
}
请求串可以使用设备码,从客户端或集团服务获取,是一个形如 BRW100000000000000000000000000000000000000000000000000000000000000000
或 BRW100-000000000-000000000-000000000-000000000-000000000-000000000-000000000
的字符串
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/update_code
bitkey: your-key
Content-Type: application/json
{
"code": "BRW100-000000000-000000000-000000000-000000000-000000000-000000000-000000000"
}
- 使用MAC地址作为设备码
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/xxx/update_code
bitkey: your-key
Content-Type: application/json
{
"mac": ["00-00-00-00-00-00", "00-00-00-00-00-01"]
}
如果只有一个MAC,入参格式也可以是
{
"mac": "00-00-00-00-00-00"
}
MAC地址支持00-00-00-00-00-00
, 00:00:00:00:00:00
, 000000000000
三种格式
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"code": "<bitLicense>\n <version>3</version>\n <sn>xxx</sn>\n <code>xxx</code>\n <description>\n <snInfo>\n <controlType>LOCAL</controlType>\n </snInfo>\n </description>\n</bitLicense>"
}
]
}
}
批量激活授权
请求地址: POST /sns/update_code
接口说明
- 使用请求串离线升级,要求必须请求串必须包含SN,不支持设备码直接激活。
- 返回升级串。
请求参数
- Body
参数名 类型 必需 示例值 说明 code string 是 youRequestCode 请求串
请求示例
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/update_code
bitkey: xxx;
Content-Type: application/json
{
"code":"xxxxx"
}
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"code": "<bitLicense>\n <version>3</version>\n <sn>xxx</sn>\n <code>xxx</code>\n <description>\n <snInfo>\n <controlType>LOCAL</controlType>\n </snInfo>\n </description>\n</bitLicense>"
}
]
}
}
批量激活授权码的比特ID
请求地址: POST /sns/bitid_update_code
接口说明
- 单向产生比特ID升级串。若比特ID未绑定SN则按照参数自动生成并绑定。若比特ID已绑定SN,则要求所有参数必须和已绑定SN匹配,不会更新已绑定的SN。
- 要求业务必需是比特ID类型的业务。
- 返回升级串。
请求参数
-
Query
参数名 类型 必需 示例值 说明 product_name string 是 product 产品名称 template_name string 是 template 模版名称 business_name string 是 business 业务名称 bitid_guid string 是 guid Bit-ID bitid_type integer 是 5 比特ID类型(5/6) -
Body
参数名 类型 必需 中文名 sn string 否 授权码 startDate string 否 起始日期 endDate string 否 结束日期 volumeNumber integer 否 终端限制 expirationDays integer 否 有效期天数 usageNumber integer 否 使用次数 concurrentNumber integer 否 并发数 usersNumber integer 否 用户数 maxOfflineMinutes integer 否 离线分钟数 transferVolume integer 否 浮动设备 transferNumber integer 否 转移次数
请求示例
POST https://back-office-api.bitanswer.cn/bitanswer/api/sns/bitid_update_code?product_name=软件保护产品&template_name=模版A&business_name=unitTest_bitId&bitid_guid=AAAAAAAAAAAAAAA6&bitid_type=5
bitkey: 12345678
Content-Type: application/json
响应示例
{
"status": 0,
"data": {
"total": 1,
"items": [
{
"code": "<bitLicense>\n <version>3</version>\n <sn>xxx</sn>\n <code>xxx</code>\n <description>\n <snInfo>\n <controlType>LOCAL</controlType>\n </snInfo>\n </description>\n</bitLicense>"
}
]
}
}