文档中心 > API类目 > 电子发票

alibaba.invoice.device.status.update (更新纸票终端设备的登录、在线、就绪等各种状态)

更新纸票终端设备的登录、在线、就绪等各种状态

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
payee_register_no String 必须 911234567890123N 纳税人识别号
device_no String 必须 001 税盘分机号
provider String 必须 hx 硬件设备提供商:hx=航信,bw=百望
ex_info String 必须 {"login_flag":0, "online_status":0, "free_system_status":0, "charge_system_status":0} 设备状态拓展信息,login_flag:登录状态,0否1是;online_status:设备在线状态,0否1是;free_system_status:免费版设备是否就绪 0否1是;charge_system_status: 收费版设备是否就绪 0否1是

响应参数

名称 类型 示例值 描述
result ResultSet result
  • └ error_message
  • String
  • 操作成功
  • errorMessage
  • └ result
  • Boolean
  • true
  • result
  • └ total_count
  • Number
  • 1
  • totalCount
  • └ error_code
  • String
  • 0
  • errorCode

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
1
2
3
4
5
6
7
8
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaInvoiceDeviceStatusUpdateRequest req = new AlibabaInvoiceDeviceStatusUpdateRequest();
req.setPayeeRegisterNo("911234567890123N");
req.setDeviceNo("001");
req.setProvider("hx");
req.setExInfo("{\"login_flag\":0, \"online_status\":0, \"free_system_status\":0, \"charge_system_status\":0}");
AlibabaInvoiceDeviceStatusUpdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
7
8
<alibaba_invoice_device_status_update_response>
    <result>
        <error_message>操作成功</error_message>
        <result>true</result>
        <total_count>1</total_count>
        <error_code>0</error_code>
    </result>
</alibaba_invoice_device_status_update_response>

异常示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
<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

返回
顶部