简要描述:

  • 第三方系统,通过迅联云接入认证后,能够通过此接口查询发票单据信息。

接口版本:

版本号 制定人 制定日期 修订日期
无 王佳田 2022-4-8 2022-4-8

请求方式:

  • POST

请求头:

参数名 是否必须 类型 说明
Content-Type 是 String 请求类型: application/json

请求URL:

post /sco-invoice-legged-biz/tax/output/openapi/queryDoc

请求参数:

主信息
字段 参数名称 是否必须 类型 长度 说明
invoiceCode 发票代码 String 否 12 发票号码与发票代码要么同时为空,要么同时不为空
invoiceNumber 发票号码 String 否 8 发票号码与发票代码要么同时为空,要么同时不为空
requisitionApplyNo 第三方开票申请单编号 String 否 96
otherId 第三方平台主键 String 否 100

请求示例:

{
  "invoiceCode": "",
  "invoiceNumber": "",
  "otherId": "28045669365055401",
  "requisitionApplyNo": ""
}

返回示例:

正确时返回:

{
  "body": [
    {
      "additionalReferenceVos": null,
      "adverseDid": null,
      "blueInvoiceCode": null,
      "blueInvoiceNo": null,
      "buyerAddress": "北京市xx101楼620室010-58688395",
      "buyerBankAndId": "xxx0200001919200131264",
      "buyerCompanyId": null,
      "buyerName": "xx开票测试科技有限公司",
      "buyerPhone": null,
      "buyerTaxId": "915001006220997PX5",
      "calculateMoney": false,
      "callbackUrl": null,
      "checkCode": "",
      "codeVersion": null,
      "companyDataResource": "guoneng",
      "complianceFail": null,
      "complianceStatus": 0,
      "computeDiscountLine": null,
      "computeWithTax": 1,
      "contractDocumentReference": null,
      "cooperativeStatus": null,
      "creditNoteApplyNo": null,
      "dataSerialNo": null,
      "deliveryStatus": null,
      "departmentId": null,
      "despatchDocumentReference": null,
      "discount": null,
      "discountRate": null,
      "docComplianceFail": "",
      "docComplianceStatus": 1,
      "docId": null,
      "docStatus": "ISSUED",
      "documentTitle": null,
      "draftType": null,
      "drawer": "张三",
      "expressNumber": null,
      "extData": {
        "ofdUrl": ""
      },
      "extractionCode": null,
      "id": "INV20210422000027",
      "imagePath": null,
      "inventoryMark": null,
      "invoiceCode": "5000181530",
      "invoiceDate": 1619107200000,
      "invoiceNumber": "10902882",
      "invoiceStatus": null,
      "invoiceTypeCode": "01",
      "invoiceUuid": "7bf8ee0a-1bbb-430c-8778-1276bdba3b9f",
      "issueDate": 1619107200000,
      "lineCounter": 1,
      "lines": [
        {
          "discount": null,
          "discountGroup": "0e3b8229-2388-4716-a823-90e193e35f35",
          "dispatchDocumentReference": null,
          "dispatchLineReference": null,
          "favouredPolicyMark": null,
          "favouredPolicyName": null,
          "id": "1",
          "itemModelName": null,
          "itemName": "*电子计算机*笔记本电脑",
          "lineAmountExcludeTax": 4570.8,
          "lineAmountIncludeTax": 5165,
          "lineAttribute": "0",
          "lineDiscountExcludeTax": null,
          "lineDiscountRate": null,
          "lineId": "1335027811521396736",
          "lineOrder": 1,
          "materialCode": null,
          "noticeCodeNo": null,
          "noticeLineId": null,
          "orderLineId": null,
          "orderLineReference": null,
          "orderNo": null,
          "orderReference": null,
          "priceExcludeTax": 4570.8,
          "priceIncludeTax": 5165,
          "quantity": 1,
          "receiptDocumentReference": null,
          "receiptLineReference": null,
          "reconciliationDocumentReference": null,
          "reconciliationSheetLineReference": null,
          "relationReferences": null,
          "requisitionLineNo": null,
          "specialManagement": null,
          "statementCode": null,
          "statementLineId": null,
          "taxAmount": 594.2,
          "taxClassificationCode": "1090509010000000000",
          "taxDiscount": null,
          "taxRate": 0.13,
          "unit": "台",
          "zeroTaxRateFlag": null
        }
      ],
      "localId": 5189,
      "machineCode": null,
      "mailingStatus": null,
      "maximumAmountLimit": 100000,
      "multiRate": "13",
      "nationalDownloadUrl": null,
      "note": null,
      "noticeCodeNo": null,
      "ofdUrl": "",
      "onSplit": null,
      "operatorName": null,
      "orderReference": null,
      "originatorDocumentReference": null,
      "otherId": "28045669365055401",
      "payee": "李四",
      "receiptDocumentReference": null,
      "receiveAddress": null,
      "receiveMsgEmail": null,
      "receiveMsgPhone": null,
      "receiveRecipient": null,
      "reconciliationSheetReference": null,
      "relationReferences": null,
      "remark": null,
      "requestNo": null,
      "requisitionApplyNo": "KPTZ20210422002",
      "reviewer": "王五",
      "secretZone": "",
      "sellerAddress": "上海市徐汇区虹梅路1535号星联科研楼2幢3-4楼 24081101",
      "sellerBankAndId": "汇丰银行(中国)有限公司上海分行088-296504-011",
      "sellerCompanyId": "be17e0a0-3ebd-4e89-b7ff-d885a18a09e7",
      "sellerName": "91110101201912260A",
      "sellerPhone": null,
      "sellerTaxId": "91110101201912260A",
      "specialInvoiceMark": "00",
      "splitReference": null,
      "statementCode": null,
      "status": null,
      "taxRateMark": null,
      "taxStatus": null,
      "totalAmountExcludeTax": 4570.8,
      "totalAmountIncludeTax": 5165,
      "totalDiscount": null,
      "totalTaxAmount": 594.2,
      "upload": null,
      "userId": null,
      "warningFail": "",
      "warningStatus": 0,
      "zeroTaxType": null
    }
  ],
  "ok": true,
  "requestNum": null,
  "status": {
    "description": null,
    "message": null,
    "path": null,
    "returnCode": "200",
    "serviceCode": null,
    "time": null
  }
}

错误时返回:

返回参数说明:

参数名 类型 是否必然存在 描述 长度 说明
ok Boolean 是 请求是否处理成功, true表示成功
body Object[] 否 返回的信息

body返回参数说明

字段 参数名称 是否必须 类型 长度 说明
operateType 本次操作类型 是 Integer 2 0:已开具 2:已删除 4:已作废 5:已红冲 6:申请单
requisitionApplyNo 开票申请单编号 否 String 96
requisitionStatus 申请单状态 否 String 2 02:部分开具;03:已开具发票;(红冲和作废发票均还原为部分开具)04:已删除
otherId 第三方平台发票唯一标识 否 String 100 本次操作类型为已红冲时,该字段是原蓝票的otherId;
docId 平台单据编号 是 String 20 本次操作类型为已红冲时,该字段是原蓝票的docId;
invoiceUuid 平台单据UUID 是 String 36 本次操作类型为已红冲时,该字段是原蓝票的invoiceUuid;
companyDataResource 数据来源 否 String 36 只能是字母或数字
buyerAddress 购方地址、电话 否 String 100 中文占2字节
buyerBankAndId 购方开户行及账号 否 String 100 中文占2字节
buyerName 购方名称 是 String 100 中文占2字节
buyerTaxId 购方税号 否 String 20
sellerAddress 销方地址、电话 否 String 100 中文占2字节
sellerBankAndId 销方开户行及账号 否 String 100 中文占2字节
sellerName 销方名称 是 String 100 中文占2字节
sellerTaxId 销方税号 是 String 20
docStatus 发票状态 是 String 2 ISSUED-已开具;CANCELED-已作废;
invoiceTypeCode 发票类型代码 是 String 2 专票:01;普票:04;电子普票票:10; 电子专票08;
invoiceCode 发票代码 是 String 12 本次操作类型为已红冲时,该字段是红票的发票代码
invoiceNumber 发票号码 是 String 8 本次操作类型为已红冲时,该字段是红票的发票号码
issueDate 开票日期 是 String 20 时间戳 毫秒
blueInvoiceCode 原蓝票发票代码 否 String 12
blueInvoiceNo 原蓝票发票号码 否 String 8
totalAmountExcludeTax 发票金额 是 BigDecimal 12/13 小数点后2位
totalTaxAmount 发票税额 是 BigDecimal 12/13 小数点后2位
totalAmountIncludeTax 价税合计 是 BigDecimal 13/14 小数点后2位
checkCode 校验码 否 String 128
codeVersion 编码表版本号 否 String 20
computeWithTax 含税标识 是 Integer 2 是否含税 :0不含税 1含税
drawer 开票人 否 String 20 中文占2字节
payee 收款人 否 String 16 中文占2字节
reviewer 复核人 否 String 16 中文占2字节
note 备注 否 String 212 中文占2字节
specialInvoiceMark 特殊票种标识 否 String 2 00:非特殊票种 08:成品油销售
receiveRecipient 收件人 否 String 10
receiveAddress 收件人地址 否 String 200
receiveMsgEmail 接收电票下载信息邮箱号 否 String 64
receiveMsgPhone 接收电票下载信息手机号 否 String 12
ofdUrl Ofd发票下载地址 否 String
statementCode 对账单编号 否 String 100
noticeCodeNo 通知单编号 否 String 100
lines 行信息 是 object[]
lines明细信息
字段 参数名称 是否必须 类型 长度 说明
id 明细编号 否 String 20 平台生成的编号
requisitionLineNo 申请单行号 否 String 20 申请单创建时的明细行号
lineAttribute 发票行性质 是 String 2 发票行性质; 0:正常行(无折扣),1:折扣行 2:被折扣行(有折扣)
itemName 货物名称 是 String 92 中文占2字节
unit 单位 否 String 14 中文占2字节
itemModelName 供应商规格型号 否 String 40 中文占2字节
quantity 数量 否 BigDecimal 16 小数点后8位
priceExcludeTax 不含税单价 否 BigDecimal 16 小数点后8位
priceIncludeTax 含税单价 否 BigDecimal 16 小数点后8位
lineAmountExcludeTax 不含税金额 是 BigDecimal 12 小数点后2位
lineAmountIncludeTax 含税金额 是 BigDecimal 12 小数点后2位
taxAmount 税额 是 BigDecimal 12 小数点后2位
taxRate 税率 是 BigDecimal 12 小数点后2位
discount 含税折扣额 否 BigDecimal 12 小数点后2位,被折扣行有值且为正数
lineDiscountExcludeTax 不含税折扣额 否 BigDecimal 12 小数点后2位,被折扣行有值且为正数
taxDiscount 折扣税额 否 BigDecimal 12 小数点后2位,(正数)
taxClassificationCode 税收分类编码 否 String 20
materialCode 物料编码 否 String 20
zeroTaxRateFlag 零税率标识 否 String 2 空代表无1出口免税和其他免税优惠政策 2 不征增值税 3 普通零税率
favouredPolicyMark 优惠政策标识 否 String 2 0:未使用,1:使用
favouredPolicyName 优惠政策名称 否 String 500 中文占2字节
orderNo 订单编号 否 String 100
orderLineId 订单行号 否 String 20
statementCode 对账单编号 否 String 100
StatementLineId 对账单行号 否 String 20
noticeCodeNo 通知单编号 否 String 100
noticeLineId 通知单行号 否 String 20
文档更新时间: 2022-09-26 14:35   作者:王佳田