{
    "openapi": "3.0.0",
    "info": {
        "title": "发票查验 - API文档",
        "version": "1.0.0",
        "description": "通过发票代码、发票号码、开票日期、合计金额、校验码等信息获取发票详情。支持包括增值税专票、电子专票、普票、电子普票、卷票、货运专票、机动车销售发票、二手车销售发票等类型增值税发票。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/invoiceverify\/index": {
            "get": {
                "summary": "查验发票信息",
                "tags": [
                    "发票查验"
                ],
                "description": "获取发票详细票面信息",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "code",
                        "in": "query",
                        "description": "发票代码",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 33002300211,
                            "description": "发票代码"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "开票日期",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2023-12-29",
                            "description": "开票日期"
                        }
                    },
                    {
                        "name": "number",
                        "in": "query",
                        "description": "发票号码",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 48345072,
                            "description": "发票号码"
                        }
                    },
                    {
                        "name": "totalfee",
                        "in": "query",
                        "description": "合计金额(不含税)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "9676.58",
                            "description": "合计金额(不含税)"
                        }
                    },
                    {
                        "name": "checkcode",
                        "in": "query",
                        "description": "校验码(后六位，普票必填)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "288296",
                            "description": "校验码(后六位，普票必填)"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "+num": {
                                            "type": "string",
                                            "example": "1.00000000",
                                            "description": "数量"
                                        },
                                        "code": {
                                            "type": "string",
                                            "example": "033002300211",
                                            "description": "发票代码"
                                        },
                                        "date": {
                                            "type": "string",
                                            "example": "2023-12-29",
                                            "description": "开票日期"
                                        },
                                        "type": {
                                            "type": "string",
                                            "example": "10",
                                            "description": "发票种类代码"
                                        },
                                        "+name": {
                                            "type": "string",
                                            "example": "*信息技术服务*软件服务费",
                                            "description": "商品名称"
                                        },
                                        "+type": {
                                            "type": "string",
                                            "description": "规格型号"
                                        },
                                        "+unit": {
                                            "type": "string",
                                            "example": "套",
                                            "description": "计量单位"
                                        },
                                        "buyer": {
                                            "type": "string",
                                            "example": "上海觉克信息科技有限公司",
                                            "description": "购买方名称"
                                        },
                                        "state": {
                                            "type": "string",
                                            "example": "1",
                                            "description": "发票状态"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "浙江,增值税电子普通发票",
                                            "description": "发票标题"
                                        },
                                        "+price": {
                                            "type": "string",
                                            "example": "9128.85000000",
                                            "description": "单价"
                                        },
                                        "number": {
                                            "type": "string",
                                            "example": "48345072",
                                            "description": "发票号码"
                                        },
                                        "remark": {
                                            "type": "string",
                                            "description": "备注信息"
                                        },
                                        "seller": {
                                            "type": "string",
                                            "example": "阿里云计算有限公司",
                                            "description": "销售方名称"
                                        },
                                        "+taxfee": {
                                            "type": "string",
                                            "example": "547.73",
                                            "description": "税额"
                                        },
                                        "+taxrate": {
                                            "type": "string",
                                            "example": "0.060",
                                            "description": "税率"
                                        },
                                        "district": {
                                            "type": "string",
                                            "example": "浙江",
                                            "description": "所属地区"
                                        },
                                        "itemlist": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            },
                                            "description": "商品明细列表"
                                        },
                                        "totalfee": {
                                            "type": "string",
                                            "example": "9676.58",
                                            "description": "价税合计"
                                        },
                                        "totaltax": {
                                            "type": "string",
                                            "example": "547.73",
                                            "description": "税额"
                                        },
                                        "+totalfee": {
                                            "type": "string",
                                            "example": "9128.85",
                                            "description": "金额"
                                        },
                                        "buyerbank": {
                                            "type": "string",
                                            "description": "购买方开户行及账号"
                                        },
                                        "checkcode": {
                                            "type": "string",
                                            "example": "72780415894017288296",
                                            "description": "校验码"
                                        },
                                        "goodsinfo": {
                                            "type": "string",
                                            "example": "*信息技术服务*软件服务费██套█0.060█9128.85000000█9128.85█1.00000000█547.73██3040201990000000000█",
                                            "description": "商品信息原始串"
                                        },
                                        "verifynum": {
                                            "type": "string",
                                            "example": "1",
                                            "description": "查验次数"
                                        },
                                        "sellerbank": {
                                            "type": "string",
                                            "example": "招商银行杭州高新支行 571905493610702",
                                            "description": "销售方开户行及账号"
                                        },
                                        "equipmentno": {
                                            "type": "string",
                                            "example": "661814586395",
                                            "description": "开票设备编号"
                                        },
                                        "buyeraddress": {
                                            "type": "string",
                                            "description": "购买方地址电话"
                                        },
                                        "buyercreditno": {
                                            "type": "string",
                                            "example": "91310114MA1GTG89XA",
                                            "description": "购买方税号"
                                        },
                                        "extaxtotalfee": {
                                            "type": "string",
                                            "example": "547.73",
                                            "description": "不含税金额"
                                        },
                                        "selleraddress": {
                                            "type": "string",
                                            "example": "浙江省杭州市西湖区三墩镇灯彩街1008号云谷园区1-2-A06室 0571-85022088",
                                            "description": "销售方地址电话"
                                        },
                                        "+commoditycode": {
                                            "type": "string",
                                            "example": "3040201990000000000",
                                            "description": "商品编码"
                                        },
                                        "creditnoteinfo": {
                                            "type": "string",
                                            "example": "[],033002300211,48345072",
                                            "description": "红冲信息"
                                        },
                                        "sellercreditno": {
                                            "type": "string",
                                            "example": "91330106673959654P",
                                            "description": "销售方税号"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "code": "033002300211",
                                        "date": "2023-12-29",
                                        "type": "10",
                                        "buyer": "上海觉克信息科技有限公司",
                                        "state": "1",
                                        "title": "浙江,增值税电子普通发票",
                                        "number": "48345072",
                                        "remark": "",
                                        "seller": "阿里云计算有限公司",
                                        "district": "浙江",
                                        "itemlist": [
                                            {
                                                "num": "1.00000000",
                                                "name": "*信息技术服务*软件服务费",
                                                "type": "",
                                                "unit": "套",
                                                "price": "9128.85000000",
                                                "taxfee": "547.73",
                                                "taxrate": "0.060",
                                                "totalfee": "9128.85",
                                                "commoditycode": "3040201990000000000"
                                            }
                                        ],
                                        "totalfee": "9676.58",
                                        "totaltax": "547.73",
                                        "buyerbank": "",
                                        "checkcode": "72780415894017288296",
                                        "goodsinfo": "*信息技术服务*软件服务费██套█0.060█9128.85000000█9128.85█1.00000000█547.73██3040201990000000000█",
                                        "verifynum": "1",
                                        "sellerbank": "招商银行杭州高新支行 571905493610702",
                                        "equipmentno": "661814586395",
                                        "buyeraddress": "",
                                        "buyercreditno": "91310114MA1GTG89XA",
                                        "extaxtotalfee": "547.73",
                                        "selleraddress": "浙江省杭州市西湖区三墩镇灯彩街1008号云谷园区1-2-A06室 0571-85022088",
                                        "creditnoteinfo": "[],033002300211,48345072",
                                        "sellercreditno": "91330106673959654P"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查验发票信息",
                "tags": [
                    "发票查验"
                ],
                "description": "获取发票详细票面信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "code": {
                                        "type": "int",
                                        "example": 33002300211,
                                        "description": "发票代码"
                                    },
                                    "date": {
                                        "type": "string",
                                        "example": "2023-12-29",
                                        "description": "开票日期"
                                    },
                                    "number": {
                                        "type": "int",
                                        "example": 48345072,
                                        "description": "发票号码"
                                    },
                                    "totalfee": {
                                        "type": "string",
                                        "example": "9676.58",
                                        "description": "合计金额(不含税)"
                                    },
                                    "checkcode": {
                                        "type": "string",
                                        "example": "288296",
                                        "description": "校验码(后六位，普票必填)"
                                    }
                                },
                                "required": [
                                    "key",
                                    "code",
                                    "date",
                                    "number",
                                    "totalfee",
                                    "checkcode"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "+num": {
                                            "type": "string",
                                            "example": "1.00000000",
                                            "description": "数量"
                                        },
                                        "code": {
                                            "type": "string",
                                            "example": "033002300211",
                                            "description": "发票代码"
                                        },
                                        "date": {
                                            "type": "string",
                                            "example": "2023-12-29",
                                            "description": "开票日期"
                                        },
                                        "type": {
                                            "type": "string",
                                            "example": "10",
                                            "description": "发票种类代码"
                                        },
                                        "+name": {
                                            "type": "string",
                                            "example": "*信息技术服务*软件服务费",
                                            "description": "商品名称"
                                        },
                                        "+type": {
                                            "type": "string",
                                            "description": "规格型号"
                                        },
                                        "+unit": {
                                            "type": "string",
                                            "example": "套",
                                            "description": "计量单位"
                                        },
                                        "buyer": {
                                            "type": "string",
                                            "example": "上海觉克信息科技有限公司",
                                            "description": "购买方名称"
                                        },
                                        "state": {
                                            "type": "string",
                                            "example": "1",
                                            "description": "发票状态"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "浙江,增值税电子普通发票",
                                            "description": "发票标题"
                                        },
                                        "+price": {
                                            "type": "string",
                                            "example": "9128.85000000",
                                            "description": "单价"
                                        },
                                        "number": {
                                            "type": "string",
                                            "example": "48345072",
                                            "description": "发票号码"
                                        },
                                        "remark": {
                                            "type": "string",
                                            "description": "备注信息"
                                        },
                                        "seller": {
                                            "type": "string",
                                            "example": "阿里云计算有限公司",
                                            "description": "销售方名称"
                                        },
                                        "+taxfee": {
                                            "type": "string",
                                            "example": "547.73",
                                            "description": "税额"
                                        },
                                        "+taxrate": {
                                            "type": "string",
                                            "example": "0.060",
                                            "description": "税率"
                                        },
                                        "district": {
                                            "type": "string",
                                            "example": "浙江",
                                            "description": "所属地区"
                                        },
                                        "itemlist": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            },
                                            "description": "商品明细列表"
                                        },
                                        "totalfee": {
                                            "type": "string",
                                            "example": "9676.58",
                                            "description": "价税合计"
                                        },
                                        "totaltax": {
                                            "type": "string",
                                            "example": "547.73",
                                            "description": "税额"
                                        },
                                        "+totalfee": {
                                            "type": "string",
                                            "example": "9128.85",
                                            "description": "金额"
                                        },
                                        "buyerbank": {
                                            "type": "string",
                                            "description": "购买方开户行及账号"
                                        },
                                        "checkcode": {
                                            "type": "string",
                                            "example": "72780415894017288296",
                                            "description": "校验码"
                                        },
                                        "goodsinfo": {
                                            "type": "string",
                                            "example": "*信息技术服务*软件服务费██套█0.060█9128.85000000█9128.85█1.00000000█547.73██3040201990000000000█",
                                            "description": "商品信息原始串"
                                        },
                                        "verifynum": {
                                            "type": "string",
                                            "example": "1",
                                            "description": "查验次数"
                                        },
                                        "sellerbank": {
                                            "type": "string",
                                            "example": "招商银行杭州高新支行 571905493610702",
                                            "description": "销售方开户行及账号"
                                        },
                                        "equipmentno": {
                                            "type": "string",
                                            "example": "661814586395",
                                            "description": "开票设备编号"
                                        },
                                        "buyeraddress": {
                                            "type": "string",
                                            "description": "购买方地址电话"
                                        },
                                        "buyercreditno": {
                                            "type": "string",
                                            "example": "91310114MA1GTG89XA",
                                            "description": "购买方税号"
                                        },
                                        "extaxtotalfee": {
                                            "type": "string",
                                            "example": "547.73",
                                            "description": "不含税金额"
                                        },
                                        "selleraddress": {
                                            "type": "string",
                                            "example": "浙江省杭州市西湖区三墩镇灯彩街1008号云谷园区1-2-A06室 0571-85022088",
                                            "description": "销售方地址电话"
                                        },
                                        "+commoditycode": {
                                            "type": "string",
                                            "example": "3040201990000000000",
                                            "description": "商品编码"
                                        },
                                        "creditnoteinfo": {
                                            "type": "string",
                                            "example": "[],033002300211,48345072",
                                            "description": "红冲信息"
                                        },
                                        "sellercreditno": {
                                            "type": "string",
                                            "example": "91330106673959654P",
                                            "description": "销售方税号"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "code": "033002300211",
                                        "date": "2023-12-29",
                                        "type": "10",
                                        "buyer": "上海觉克信息科技有限公司",
                                        "state": "1",
                                        "title": "浙江,增值税电子普通发票",
                                        "number": "48345072",
                                        "remark": "",
                                        "seller": "阿里云计算有限公司",
                                        "district": "浙江",
                                        "itemlist": [
                                            {
                                                "num": "1.00000000",
                                                "name": "*信息技术服务*软件服务费",
                                                "type": "",
                                                "unit": "套",
                                                "price": "9128.85000000",
                                                "taxfee": "547.73",
                                                "taxrate": "0.060",
                                                "totalfee": "9128.85",
                                                "commoditycode": "3040201990000000000"
                                            }
                                        ],
                                        "totalfee": "9676.58",
                                        "totaltax": "547.73",
                                        "buyerbank": "",
                                        "checkcode": "72780415894017288296",
                                        "goodsinfo": "*信息技术服务*软件服务费██套█0.060█9128.85000000█9128.85█1.00000000█547.73██3040201990000000000█",
                                        "verifynum": "1",
                                        "sellerbank": "招商银行杭州高新支行 571905493610702",
                                        "equipmentno": "661814586395",
                                        "buyeraddress": "",
                                        "buyercreditno": "91310114MA1GTG89XA",
                                        "extaxtotalfee": "547.73",
                                        "selleraddress": "浙江省杭州市西湖区三墩镇灯彩街1008号云谷园区1-2-A06室 0571-85022088",
                                        "creditnoteinfo": "[],033002300211,48345072",
                                        "sellercreditno": "91330106673959654P"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}