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

alibaba.einvoice.taxcode.query (查询用户税收分类编码列表)

查询用户税收分类编码列表

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
tax_code_query_dto TaxCodeQueryDto 必须 税编查询类
  • └ return_relate_rule_num
  • Boolean
  • 可选
  • false
  • 是否返回税收分类编码关联的规则数量,true:返回,false:不返回
  • └ platform_user_id
  • String
  • 必须
  • 123456
  • 业务平台商户ID/用户ID
  • └ return_default_tax_code
  • Boolean
  • 可选
  • false
  • 是否返回默认税收分类编码
  • └ tax_code
  • String
  • 可选
  • adfadf
  • 税收分类编码
  • └ source_flag
  • String
  • 可选
  • aaa
  • 调用来源标记
  • └ platform_code
  • String
  • 必须
  • ANT
  • 业务平台code,由中台生成
  • └ payee_register_no
  • String
  • 必须
  • faadgad112321
  • 税号

响应参数

名称 类型 示例值 描述
tax_code_query_result_list TaxCodeQueryResultDto [] 税编查询结果列表
  • └ relate_rule_num
  • String
  • 3
  • 税收分类编码关联的规则数量
  • └ default_tax_code
  • String
  • false
  • 是否默认税收分类编码,true:是,false:否
  • └ zero_rate_flag
  • String
  • 1
  • 零税率标识
  • └ tax_rate
  • String
  • 0.01
  • 税率
  • └ tax_code_desc
  • String
  • 小麦
  • 税收分类编码描述
  • └ tax_code_name
  • String
  • 小麦
  • 货物和劳务名称
  • └ tax_code
  • String
  • 1010101020000000000
  • 税收分类编码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaEinvoiceTaxcodeQueryRequest req = new AlibabaEinvoiceTaxcodeQueryRequest();
AlibabaEinvoiceTaxcodeQueryRequest.TaxCodeQueryDto obj1 = new AlibabaEinvoiceTaxcodeQueryRequest.TaxCodeQueryDto();
obj1.setReturnRelateRuleNum(false);
obj1.setPlatformUserId("123456");
obj1.setReturnDefaultTaxCode(false);
obj1.setTaxCode("adfadf");
obj1.setSourceFlag("aaa");
obj1.setPlatformCode("ANT");
obj1.setPayeeRegisterNo("faadgad112321");
req.setTaxCodeQueryDto(obj1);
AlibabaEinvoiceTaxcodeQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_einvoice_taxcode_query_response>
    <tax_code_query_result_list>
        <tax_code_query_result_dto>
            <relate_rule_num>3</relate_rule_num>
            <default_tax_code>false</default_tax_code>
            <zero_rate_flag>1</zero_rate_flag>
            <tax_rate>0.01</tax_rate>
            <tax_code_desc>小麦</tax_code_desc>
            <tax_code_name>小麦</tax_code_name>
            <tax_code>1010101020000000000</tax_code>
        </tax_code_query_result_dto>
    </tax_code_query_result_list>
</alibaba_einvoice_taxcode_query_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

返回
顶部