开放平台API
  1. 进项数据
开放平台API
  • 海关数据
    • 出口报关单获取接口
      POST
    • 进口报关单获取接口
      POST
    • 进口税单获取接口
      POST
    • 保证金获取接口
      POST
    • 海关编码获取接口
      POST
    • 退税商品编码获取接口
      POST
    • 下载任务状态查询
      POST
  • 进项数据
    • 进项发票获取接口
      POST
    • 进项发票查验接口
      POST
    • 进项异常发票获取接口
      POST
    • 进项票据OCR识别接口
      POST
  • 销项数据
    • 销项发票申请接口
      POST
    • 销项发票获取接口
      POST
    • 销项发票红冲接口
      POST
    • 销项发票作废接口
      POST
    • 记账凭证回推接口-XINVOICE.DBACK
      POST
  • 退税数据
    • 生产企业
    • 外贸企业
      • 退税申报批次-汇总数据申请下载接口
      • 退税申报批次-汇总数据查询(下载完成后调用)
      • 自检状态查询
    • 退税申报批次申请下载接口
      POST
    • 退税申报批次数据获取接口
      POST
    • 已申报批次基本信息获取接口
      POST
  • 企业数据
    • 企业信息获取接口
      POST
    • 是否一般纳税人查询接口
      POST
    • 税局违法企业获取接口
      POST
    • 企业财税数据获取接口
      POST
    • 企业开通申请接口
      POST
    • 企业开通申请结果获取接口
      POST
    • 企业备案信息申请下载接口
      POST
    • 企业备案信息结果获取接口
      POST
    • 企业开通申请接口WEB版
      POST
    • 渠道关联企业-续期接口WEB版
      POST
  • 开票服务
    • 登录电票平台接口
    • 获取是否需要人脸识别接口
    • 获取人脸识别二维码接口
  • 其他数据服务
    • 汇率查询
  1. 进项数据

进项发票查验接口

POST
/post/rest/invoice/dii
此接口支持通过关键字(含:发票类型,发票号码,代码,开票日期,发票金额,校验码,纳税人识别号)查验企业自身的发票,并返回发票的真伪信息(含:发票的号码,代码,开票日期,发票状态,购销方信息,备注,金额,税额,商品,规格型号,单位,单价,数据等信息),帮助企业校验发票真伪,规避税务的风险。

请求参数

Header 参数
Content-Type
string 
可选
示例值:
application/json
Body 参数application/json
authorize
object 
安全凭证
必需
appSecId
string 
密钥ID
必需
平台随机生成
appSec
string 
签名串
必需
根据密钥ID和KEY生成的签名串
globalInfo
object 
接口信息
必需
appId
string 
接口ID
必需
例:JXFP
version
string 
接口版本号
必需
例:V1.0
interfaceCode
string 
接口编码
必需
例:INVOICE.CY
enterpriseCode
string 
企业编码
必需
dataExchangeId
string 
接口数据加密
必需
例:默认值dataExchangeId
data
object 
获取条件参数
必需
由获取条件参数通过用Base64加密生成的字符串
checkCode
string 
校验码
可选
1,发票校验码后6位,发票种类为04,10,11,14时此项 不可为空
2,发票种类为100的,填写发票校验码5位
invoiceAmount
string 
发票金额
可选
发票种类为01,02,03,08,16,008,010,83时不可为空,填写发票不含税金额
invoiceCode
string 
发票代码
可选
数电发票不用填写(票种:008、010、83除外)
invoiceDate
string 
开票日期
必需
格式YYYYMMDD
invoiceNo
string 
发票号码
必需
invoiceType
string 
发票种类
必需
增值税专用发票:01
货运运输业增值税专用发票:02
机动车销售统一发票:03
增值税普通发票:04
增值税普通发票(电子):10
增值税普通发票(卷式):11
通行费发票:14
增值税专用发票(电子):08
区块链电子发票:100
数电专普:31
数电普票:32
通用电子发票:102
数电纸票(增值税专用发票):008
数电纸票(普通发票):010
数电发票(铁路电子客票):83
taxNo
string 
纳税人识别号
可选
xfmc
string 
销方名称
可选
xfsbh
string 
销方税号
可选
区块链,通用电子发票必填
dq
string 
地区编码
可选
区块链发票必填
浙江通用电子发票:3300
广东通用电子发票:4400
深圳区块链发票:4402
云南区块链发票:5300
北京区块链发票:1100
示例
{
  "authorize": {
    "appSecId": "string",
    "appSec": "string"
  },
  "globalInfo": {
    "appId": "string",
    "version": "string",
    "interfaceCode": "string",
    "enterpriseCode": "string",
    "dataExchangeId": "string"
  },
  "data": {
    "checkCode": "string",
    "invoiceAmount": "string",
    "invoiceCode": "string",
    "invoiceDate": "string",
    "invoiceNo": "string",
    "invoiceType": "string",
    "taxNo": "string",
    "xfmc": "string",
    "xfsbh": "string",
    "dq": "string"
  }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://117.78.0.163/51GP/post/rest/invoice/dii' \
--header 'Content-Type: application/json' \
--data-raw '{
    "authorize": {
        "appSecId": "string",
        "appSec": "string"
    },
    "globalInfo": {
        "appId": "string",
        "version": "string",
        "interfaceCode": "string",
        "enterpriseCode": "string",
        "dataExchangeId": "string"
    },
    "data": {
        "checkCode": "string",
        "invoiceAmount": "string",
        "invoiceCode": "string",
        "invoiceDate": "string",
        "invoiceNo": "string",
        "invoiceType": "string",
        "taxNo": "string",
        "xfmc": "string",
        "xfsbh": "string",
        "dq": "string"
    }
}'

返回响应

🟢200成功
application/json
Body
data
object 
返回参数
必需
由返回的参数通过用Base64加密生成的字符串
result
array [object {62}] 
发票数据
必需
totalRows
integer 
数据的总条数
必需
returnStateInfo
object 
接口状态信息
必需
returnCode
string 
返回状态编码
必需
例:0000
returnMessage
string 
返回信息
必需
例:处理成功
示例
{
    "data": "eyJyZXN1bHQiOlt7ImJhbmRNb2RlbCI6bnVsbCwiYmx1ZUlu...",
    "returnStateInfo": {
        "returnCode": "0000",
        "returnMessage": "处理成功"
    }
}

//data加密前的数据

{
    "result": [
        {
            "bandModel": null,
            "blueInvoiceCode": null,
            "blueInvoiceNo": null,
            "buyerAccount": null,
            "buyerAddressPhone": null,
            "buyerName": null,
            "buyerTaxNo": "913101153987159026",
            "cancellationMark": null,
            "carNumber": null,
            "carrierName": null,
            "carrierTaxNo": null,
            "certificateOfImport": null,
            "checkCode": " ",
            "checkCount": null,
            "commodityInspectionNo": null,
            "consignorName": null,
            "consignorTaxNo": null,
            "detailList": [
                {
                    "detailAmount": "322.64",
                    "detailNo": "1",
                    "expenseItem": null,
                    "goodsName": "*餐饮服务*餐费",
                    "num": "1",
                    "plateNo": null,
                    "specificationModel": null,
                    "taxAmount": "19.36",
                    "taxDetailAmount": null,
                    "taxRate": "6%",
                    "taxUnitPrice": null,
                    "trafficDateEnd": null,
                    "trafficDateStart": null,
                    "type": null,
                    "unit": null,
                    "unitPrice": "322.64"
                },
                {
                    "detailAmount": "322.64",
                    "detailNo": "1",
                    "expenseItem": null,
                    "goodsName": "*餐饮服务*餐费",
                    "num": "1",
                    "plateNo": null,
                    "specificationModel": null,
                    "taxAmount": "19.36",
                    "taxDetailAmount": null,
                    "taxRate": "6%",
                    "taxUnitPrice": null,
                    "trafficDateEnd": null,
                    "trafficDateStart": null,
                    "type": null,
                    "unit": null,
                    "unitPrice": "322.64"
                }
            ],
            "draweeName": null,
            "draweeTaxNo": null,
            "drawer": null,
            "engineNo": null,
            "idNo": null,
            "invoiceAmount": "322.64",
            "invoiceCode": "全电发票",
            "invoiceDate": "20231008",
            "invoiceNo": "23312000000094022820",
            "invoiceType": "32",
            "limitedPeopleCount": null,
            "machineNo": " ",
            "payee": null,
            "produceArea": null,
            "qualifiedNo": null,
            "receiveName": null,
            "receiveTaxNo": null,
            "remark": null,
            "resultCode": "0001",
            "resultTip": "查验成功,重复查验",
            "reviewer": null,
            "salerAccount": null,
            "salerAddress": null,
            "salerAddressPhone": null,
            "salerBankAccount": null,
            "salerBankName": null,
            "salerName": "上海昕怡小南国餐饮管理有限公司",
            "salerPhone": null,
            "salerTaxNo": "91310104570820588K",
            "taxAmount": "19.36",
            "taxAuthorityCode": null,
            "taxAuthorityName": null,
            "taxDiskNumber": null,
            "taxPaymentCertificateNo": null,
            "taxRate": "0",
            "throughAddress": null,
            "tonnage": null,
            "totalAmount": "342.00",
            "trafficFeeFlag": null,
            "transportGoodsInfo": null,
            "vehicleIdentificationNo": null,
            "vehicleTonnage": null,
            "vehicleType": null,
            "zeroTaxRateFlag": null
        }
    ],
    "totalRows": 1
}
修改于 2023-12-13 07:41:38
上一页
进项发票获取接口
下一页
进项异常发票获取接口
Built with