# 销项发票明细查询

# 应用场景

发票明细批量查询

# 地址

/tax-api/statistic/invoice-detail/v1

# 请求参数

参数名称 类型 必填 描述 示例
tax_code string 企业税号 110101201801010113
accounting_subject string 核算主体 核算主体1
buyer_name string 购方名称 购方名称1
invoice_type_code string 票种 ,如不填则查询所有票种:
004:增值税专用发票
007:增值税普通发票
025:增值税卷式发票
026:增值税电子发票
028:增值税电子专票
032:区块链电子发票
032
tax_rate string 税率("0", "0.01", "0.03", "0.04", "0.05", "0.06", "0.09", "0.10", "0.11", "0.13", "0.16", "0.17") "0.06"
year int32 统计的年份 2020
month int32 统计的月份 01
callback_url string 回调地址,用于异步返回统计结果 http://xxx.cn/callback
page int32 页数(0为第一页) 0
size int32 每页发票数 10

# 响应参数

参数名称 类型 必填 描述 示例
record_id string 唯一id 0000001

# 回调响应参数

字段 类型 必须 备注
record_id string 唯一id
page int32 页数(0为第一页)
size int32 每页发票数
total int32 发票总数
has_more int32 是否还有下一页
list list 当前页发票列表
list.invoice_type_code string 税种代码:
004:增值税专用发票
007:增值税普通发票
025:增值税卷式发票
026:增值税电子发票
028:增值税电子专票
032:区块链电子发票
list.ticket_sn string 发票编码
list.ticket_code string 发票号码
list.total_price string 发票金额
list.total_tax string 发票税额
list.total_price_tax string 价税合计
list.remark string 备注
list.stamp int64 开票时间戳

# 请求示例

{
    "tax_code": "110101201801010113",
    "invoice_type_code": "007",
    "tax_rate": "0.06",
    "callback_url": "http://127.0.0.1:9090/detail",
    "year": 2020,
    "month": 6,
    "page": 0,
    "size": 10
}

# 响应示例

{
    "code": 0,
    "message": "已接收发票详情数据请求,数据将会自动往回调地址推送",
    "data": {
          "record_id":"5f082009b4ff7d6b03389fbf"
    }
}

# 回调响应示例

{
  "code": 0,
  "message": "success",
  "data": {
    "record_id":"5f082009b4ff7d6b03389fbf"
    "page": 1,
    "size": 10,
    "total": 14,
    "list": [{
      "invoice_type_code": "007",
      "ticket_sn": "28787456",
      "ticket_code": "050000000004",
      "total_price": "1.89",
      "total_tax": "0.11",
      "total_price_tax": "2.00",
      "remark": "",
      "stamp": "1574946343"
    },{
      "invoice_type_code": "007",
      "ticket_sn": "28787465",
      "ticket_code": "050000000004",
      "total_price": "11.32",
      "total_tax": "0.68",
      "total_price_tax": "12.00",
      "remark": "测试",
      "stamp": "1575097809"
    },{
      "invoice_type_code": "007",
      "ticket_sn": "24674554",
      "ticket_code": "050000000004",
      "total_price": "1.89",
      "total_tax": "0.11",
      "total_price_tax": "2.00",
      "remark": "test",
      "stamp": "1572950783"
    },{
      "invoice_type_code": "007",
      "ticket_sn": "28787461",
      "ticket_code": "050000000004",
      "total_price": "32.08",
      "total_tax": "1.92",
      "total_price_tax": "34.00",
      "remark": "ces",
      "stamp": "1575091289"
    }],
    "has_more": false
  }
}