票据信息批量查询

说明

  • url: /common/invoice/findReceiptsByPage
  • method: POST
  • 数据格式: JSON
  • 数据量: 分页查询,每次一百条
  • 查询结束条件: 查询结果数据量不满一百条时,认为是最后一页
  • 当没有任何精确字段填写时
    • 查询条件中的创建时间的范围会被限制在3天 (max_creation_date - min_creation_date <= 3 * 24 * 60 * 60 * 1000),超过三天报错
    • 若没有创建时间的相关参数,则默认取最近3天
  • 范围值(金额,发票日期,创建时间)需要成对传参,要么都传要么都不传,单独传一个报错

请求参数

参数名 类型 必填 说明
biz_id String Y 本次业务唯一标识
page_num Integer Y 页码
purchase_invoice String Y 票据池 (Y: 采购发票池,N: 消费记录池)
expense_id List<Integer> N 消费记录id集合 (精确,一次最多查一百个消费记录id)
invoice_type List<String> N 发票类型集合
invoice_num String N 发票号码 (精确)
invoice_code String N 发票代码 (精确)
seller_tax_code String N 销售方税号 (精确)
seller_name String N 销售方名称 (模糊匹配)
min_amount BigDecimal N 最小金额
max_amount BigDecimal N 最大金额
min_receipt_date Long N 最小发票日期 (时间戳)
max_receipt_date Long N 最大发票日期 (时间戳)
min_creation_date Long N 最小创建时间 (时间戳)
max_creation_date Long N 最大创建时间 (时间戳)
min_last_update_date Long N 最小最后更新时间 (时间戳)
max_last_update_date Long N 最大最后更新时间 (时间戳)
created_by String N 持有人code (精确)
submit_user String N 创建人code (精确)
status Integer N 状态(0: 未报销,1: 外部系统锁定,2: 已使用)

响应参数

参数名 类型 说明
resCode Integer
resMsg String
bizId String
data JSON
data.page_num Integer 当前页码
data.page_info Array 数据集合

page_info集合对象参数说明

参数名 类型 说明
receipt_id Integer 票据ID
company_id Integer 公司ID
expense_id Integer 消费记录ID
purchase_invoice String 票据池 (Y: 采购发票池,N: 消费记录池)
source_file String 发票附件是否是源文件 (Y: 附件是源文件,N: 非源文件,该字段为null时不具有任何意义)
invalid_invoice String 无效发票标记 (Y: 无效发票)
invoice_type String 发票类型
invoice_status String 票据状态
invoice_code String 发票代码
invoice_num String 发票号码
invoice_serial String 校验码
currency String 币种
buyer_name String 购买方名称
buyer_tax_code String 购买方税号
seller_name String 销售方名称
seller_tax_code String 销售方税号
created_by String 持有人code
submit_user String 创建人code
amount BigDecimal 金额 (价税合计)
accumulation_type_id Integer 计算因子(当值为-1时,amount字段需要乘-1得到票面原始金额)
net_amount BigDecimal 不含税金额
tax_amount BigDecimal 税额
receipt_date Long 发票日期 (时间戳)
creation_date Long 创建时间(时间戳)
last_update_date Long 最后修改时间(时间戳)
status Byte 状态
digital_attachments_status String 版式文件下载状态
digital_attachments_message String 版式文件信息
digital_attachments String 版式文件

请求示例

请求参数

{
  "biz_id": "deea2bf1-ddb9-47da-9f33-387cff8f125a",
  "page_num": 1,
  "purchase_invoice": "N",
  "invoice_type": ["04"],
  "invoice_num": "07137577",
  "invoice_code": "031002100104",
  "min_amount": 200.00,
  "max_amount": 300.00,
  "min_receipt_date": 1666022400000,
  "max_receipt_date": 1666022400000,
  "created_by": "support-1368579927556096@cloudpense.com",
  "submit_user": "support-1368579927556096@cloudpense.com",
  "status": 0
}

响应参数

{
  "resCode": 200000,
  "resMsg": "查询成功",
  "bizId": "deea2bf1-ddb9-47da-9f33-387cff8f125a",
  "data": {
    "page_num": 1,
    "page_info": [
      {
        "receipt_id": 474183,
        "company_id": 3809,
        "expense_id": 41984514,
        "purchase_invoice": "N",
        "invoice_type": "04",
        "invoice_code": "031002100104",
        "invoice_num": "07137577",
        "invoice_serial": "04190929504682180154",
        "amount": 236.00,
        "net_amount": 230.00,
        "tax_amount": 6.00,
        "currency": "CNY",
        "buyer_name": "阿拉山口振德医用纺织有限公司",
        "buyer_tax_code": "91652702MA77504P39",
        "seller_name": "上海恩祈酒店有限公司",
        "seller_tax_code": "91310105694215216Q",
        "created_by": "support-1368579927556096@cloudpense.com",
        "submit_user": "support-1368579927556096@cloudpense.com",
        "receipt_date": 1666022400000,
        "creation_date": 1666022400000,
        "last_update_date": 1666022400000,
        "status": 0
      }
    ]
  }
}

results matching ""

    No results matching ""