Skip to content

增值服务

获取增值服务用户余量包

  1. 请求链接: /v2/service/getUserPackage

  2. 请求方式: POST

  3. 参数说明:

无参数

  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
email_countInt邮箱余量单位(条)
sms_countInt短信余量单位(条)
cloudauth_countInt实名认证余量单位(次)
vip_statusInt是否开通高级功能 0否 10是 20否
vip_lock_countInt购买锁数量
vip_expire_atStringvip到期时间
json
{
  "email_count": 0,
  "sms_count": 0,
  "cloudauth_count": 0,
  "vip_status": 0,
  "vip_lock_count": 0,
  "vip_expire_at": "1970-01-01 00:00:00"
}

增值服务套餐购包链接

  1. 请求链接: /v2/service/getPackageUrl

  2. 请求方式: POST

  3. 参数说明:

无参数

  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
sms_buy_urlString短信购买URL
email_buy_urlString邮件购买URL
vip_buy_urlStringVIP购买URL
cloudauth_buy_urlString实名认证购买URL
shopListString商城列表URL
json
{
  "sms_buy_url": "http://local.mall.star-lock.cn/quick_login?mallUrl=%2Fproducts%2F65&id=379&key=8ff35a414cb4ef2d641418314469fc63",
  "email_buy_url": "http://local.mall.star-lock.cn/quick_login?mallUrl=%2Fproducts%2F66&id=379&key=8ff35a414cb4ef2d641418314469fc63",
  "vip_buy_url": "http://local.mall.star-lock.cn/quick_login?mallUrl=%2Fproducts%2F64&id=379&key=8ff35a414cb4ef2d641418314469fc63",
  "cloudauth_buy_url": "http://local.mall.star-lock.cn/quick_login?mallUrl=%2Fproducts%2F67&id=379&key=8ff35a414cb4ef2d641418314469fc63",
  "shopList": "http://local.mall.star-lock.cn/quick_login?id=379&key=8ff35a414cb4ef2d641418314469fc63"
}

自定义模板

添加自定义模板

  1. 请求链接: /v2/service/addTemplate

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
channelTypeintY11短信 2邮件
nameStringY"模板名称"模板名称
langTypeintY1模板语言:通过获取默认模板接口获得
templateTypeintY1模板类型:通过获取默认模板接口获得
regardsStringN"你好!"模板内容-头
tipsStringN"请注意查收!"模板内容-尾
  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
errorCodeInt错误码
descriptionString描述
errorMsgString错误信息
dataObject返回数据对象
json
{
  "errorCode": 0,
  "description": "success",
  "errorMsg": "success",
  "data": {}
}

更新自定义模板

  1. 请求链接: /v2/service/updateTemplate

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
idintY1模板ID
nameStringN"模板名称"模板名称
regardsStringN"你好!"模板内容-头
tipsStringN"请注意查收!"模板内容-尾
  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
errorCodeInt错误码
descriptionString描述
errorMsgString错误信息
dataObject返回数据对象
json
{
  "errorCode": 0,
  "description": "success",
  "errorMsg": "success",
  "data": {}
}

获取已添加模板列表

  1. 请求链接: /v2/service/listTemplate

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
channelTypeintY11短信 2邮件
pageNointN1分页页码
pageSizeintN10分页大小
  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
channelTypeInt渠道类型
listArray模板列表
idInt模板ID
nameString模板名称
regardsString模板内容-头
tipsString模板内容-尾
templateString完整模板内容
templateTypeInt模板类型
langTypeInt语言类型
created_atString创建时间
updated_atString更新时间
pageNoInt当前页码
pageSizeInt分页大小
pagesInt总页数
totalInt总记录数
json
{
  "channelType": 1,
  "list": [
    {
      "id": 39,
      "channelType": 1,
      "templateType": 2,
      "name": "国际-密码",
      "regards": "Hello!",
      "tips": "Please contact the staff if you have any questions",
      "created_at": "2024-07-04T10:07:46.000000Z",
      "updated_at": "2024-07-05T01:58:03.000000Z",
      "langType": 2,
      "template": "Hello!Your room: {LOCKALIAS}, the door password is: {PASSWORD}. {DATENAME}Please contact the staff if you have any questions"
    },
    {
      "id": 37,
      "channelType": 1,
      "templateType": 2,
      "name": "国内-密码",
      "regards": "你好!",
      "tips": "如有疑问请联系工作人员",
      "created_at": "2024-07-04T10:07:23.000000Z",
      "updated_at": "2024-07-05T01:57:20.000000Z",
      "langType": 1,
      "template": "你好!你的房间:{房间名},开门密码是:{密码}。{有效期}如有疑问请联系工作人员"
    }
  ],
  "pageNo": 1,
  "pageSize": 10,
  "pages": 1,
  "total": 2
}

删除模板

  1. 请求链接: /v2/service/deleteTemplate

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
idintY1模板ID
  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
errorCodeInt错误码
descriptionString描述
errorMsgString错误信息
dataObject返回数据对象
json
{
  "errorCode": 0,
  "description": "success",
  "errorMsg": "success",
  "data": {}
}

获取默认模板列表

  1. 请求链接: /v2/service/getDefaultTemplate

  2. 请求方式: POST

  3. 参数说明:

无参数

  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
langTypeInt语言类型
langNameString语言名称
templatesArray模板列表
templateTypeInt模板类型
templateNameString模板名称
templateString模板内容
templatePreviewCodeObject模板预览代码
json
[
  {
    "langType": 1,
    "langName": "国内模板",
    "templates": [
      {
        "templateType": 1,
        "templateName": "电子钥匙",
        "template": "你收到一把电子钥匙,请使用APP来开门。https://pre.lock.star-lock.cn:8093/apps",
        "templatePreviewCode": {
          "{下载地址}": "http://www.baidu.com"
        }
      },
      {
        "templateType": 2,
        "templateName": "密码",
        "template": "你的房间:{房间名},开门密码是:{密码}。{有效期}",
        "templatePreviewCode": {
          "{房间名}": "201",
          "{密码}": "332211",
          "{有效期}": "2021-12-11 12:00 - 2021-12-12 13:00"
        }
      }
    ]
  },
  {
    "langType": 2,
    "langName": "国际模板",
    "templates": [
      {
        "templateType": 1,
        "templateName": "电子钥匙",
        "template": "You received an electronic key, please use the APP to open the door.https://pre.lock.star-lock.cn:8093/apps",
        "templatePreviewCode": {
          "{APPLINK}": "http://www.baidu.com"
        }
      },
      {
        "templateType": 2,
        "templateName": "密码",
        "template": "Your room: {LOCKALIAS}, the door password is: {PASSWORD}. {DATENAME}",
        "templatePreviewCode": {
          "{LOCKALIAS}": "201",
          "{PASSWORD}": "332211",
          "{DATENAME}": "2021-12-11 12:00 - 2021-12-12 13:00"
        }
      }
    ]
  }
]

设置实名认证频次

  1. 请求链接: /v2/service/setFaceAuthentication

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
face_auth_frequenceintY1认证频次:1仅首次,2每日一次,3每周一次,4每月一次
  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
errorCodeInt错误码
descriptionString描述
errorMsgString错误信息
dataObject返回数据对象
json
{
  "errorCode": 0,
  "description": "success",
  "errorMsg": "success",
  "data": {}
}

获取购买记录列表

  1. 请求链接: /v2/service/getBuyRecordList

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
typeStringY"sms"日志类型:vip/email/sms/cloudauth
record_typeintY10记录类型:10充值
pageNointN1分页页码
pageSizeintN10分页大小
  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
pageNoInt当前页码
pageSizeInt分页大小
totalInt总记录数
listArray记录列表
idInt记录ID
user_idInt用户ID
order_numberString订单号
typeString类型
record_typeInt记录类型
sms_countInt购买短信数量
email_countInt购买邮件数量
cloudauth_countInt购买实名认证数量
vip_lock_countIntVIP锁数量
vip_yearIntVIP年数
is_applyInt是否已应用
moneyString购买花费金额
created_atString创建时间
updated_atString更新时间
json
{
  "pageNo": 1,
  "pageSize": 10,
  "total": 1,
  "list": [
    {
      "id": 5,
      "user_id": 379,
      "order_number": "2024032664983",
      "type": "sms",
      "record_type": 10,
      "sms_count": 2,
      "email_count": 0,
      "cloudauth_count": 0,
      "vip_lock_count": 0,
      "vip_year": 0,
      "is_apply": 1,
      "money": "0.00",
      "created_at": "2024-04-15T02:56:30.000000Z",
      "updated_at": "2024-04-15T02:56:30.000000Z"
    }
  ]
}

获取使用记录列表

  1. 请求链接: /v2/service/getUseRecordList

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
typeStringY"sms"日志类型:vip/email/sms/cloudauth
pageNointN1分页页码
pageSizeintN10分页大小
  1. 返回参数及示例:
参数类型描述
statusInt状态码
statusTextString提示信息
contentString返回数据
pageNoInt当前页码
pageSizeInt分页大小
totalInt总记录数
listArray记录列表
json
{
  "pageNo": 1,
  "pageSize": 10,
  "total": 0,
  "list": []
}

增值服务特权详情页

  1. 请求链接: /value-added/vip-intro

  2. 请求方式: GET

  3. 参数说明:

无参数

上报增值服务购买请求

  1. 请求链接: /service/reportBuyRequest

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
typeStringY"cloud_storage"请求类型:cloud_storage(云存储)
lockIdintN/Y1锁ID,当type为cloud_storage时必填
  1. 返回参数及示例:
参数类型描述
errorCodeInt错误码
descriptionString描述
errorMsgString错误信息
json
{
  "errorCode": 0,
  "description": "表示成功或是。",
  "errorMsg": "success or means yes"
}

已废弃接口

以下接口已废弃,请使用上述新接口替代。

获取短信模板列表(已废弃)

请使用"获取已添加模板列表"接口替代

原请求链接: /v2/service/listTemplate (参数 type=1)

获取邮件模板列表(已废弃)

请使用"获取已添加模板列表"接口替代

原请求链接: /v2/service/listTemplate (参数 type=2)

添加短信模板(已废弃)

请使用"添加自定义模板"接口替代

原请求链接: /v2/service/addTemplate

添加邮件模板(已废弃)

请使用"添加自定义模板"接口替代

原请求链接: /v2/service/addTemplate

更新模板信息(已废弃)

请使用"更新自定义模板"接口替代

原请求链接: /v2/service/update

删除模板(已废弃)

请使用"删除模板"接口替代

原请求链接: /v2/service/delete

获取默认模板(已废弃)

请使用"获取默认模板列表"接口替代

原请求链接: /v2/service/getDefaultTemplate (参数 type)

鑫泓佳智能硬件通信协议文档