文档中心 > API类目 > 智慧园区API

alibaba.campus.bs.voucher.get (凭证查询)

查询用户的凭证信息,如:人脸、二维码等

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param VoucherQuery 必须 参数
  • └ voucher_type
  • String
  • 必须
  • QR_CODE
  • 凭证类型
  • └ is_generate_pic
  • Boolean
  • 可选
  • false
  • 是否生成二维码图片
  • └ mobile
  • String
  • 必须
  • 18209090909
  • 用户手机号
  • └ user_name
  • String
  • 必须
  • 张三
  • 用户姓名
  • └ idno
  • String
  • 可选
  • 1
  • 身份证号
  • └ sponsor_code
  • String
  • 必须
  • xxx
  • 主办方标识
  • └ activity_code
  • String
  • 必须
  • 1
  • 活动唯一标识
  • └ qr_code_type_enum
  • String
  • 必须
  • DYNAMIC
  • 二维码类型:动态、静态
  • └ access_key
  • String
  • 必须
  • 1
  • 访问授权
  • └ mozi_id
  • String
  • 可选
  • 1
  • 墨子id
  • └ valid_time
  • Number
  • 可选
  • 300
  • 动态二维码有效期
  • └ email
  • String
  • 可选
  • 1
  • 邮箱

响应参数

名称 类型 示例值 描述
result Boolean true result
result_code String 200 错误码
content VoucherResourceDto xxx 业务结果
  • └ face_http_url
  • String
  • https://xxx.jpg
  • 人脸图片
  • └ qr_code_http_url
  • String
  • https://xxx.jpg
  • 二维码图片
  • └ qr_code
  • String
  • xxx
  • 二维码字符串
result_msg String success 错误码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusBsVoucherGetRequest req = new AlibabaCampusBsVoucherGetRequest();
AlibabaCampusBsVoucherGetRequest.VoucherQuery obj1 = new AlibabaCampusBsVoucherGetRequest.VoucherQuery();
obj1.setVoucherType("QR_CODE");
obj1.setIsGeneratePic(false);
obj1.setMobile("18209090909");
obj1.setUserName("张三");
obj1.setIdno("1");
obj1.setSponsorCode("xxx");
obj1.setActivityCode("1");
obj1.setQrCodeTypeEnum("DYNAMIC");
obj1.setAccessKey("1");
obj1.setMoziId("1");
obj1.setValidTime(300L);
obj1.setEmail("1");
req.setParam(obj1);
AlibabaCampusBsVoucherGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_bs_voucher_get_response>
    <result>true</result>
    <result_code>200</result_code>
    <content>
        <face_http_url>https://xxx.jpg</face_http_url>
        <qr_code_http_url>https://xxx.jpg</qr_code_http_url>
        <qr_code>xxx</qr_code>
    </content>
    <result_msg>success</result_msg>
</alibaba_campus_bs_voucher_get_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部