# Bulk acquisition of reimbursement invoices information

Debugging Tools

Interface should be called on the server side, not in the front end (Weixin Mini Program, web pages, APP, etc.) directly called, specific reference interface call guide

Interface English name: invoicereimbursegetinvoicebatch

Through this interface, the structured information of electronic invoice is queried in batch, and the invoice PDF file is obtained.

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/card/invoice/reimburse/getinvoicebatch?access_token=ACCESS_TOKEN

# Cloud Calls

  • This interface does not support cloud calls

# Third party invocation

  • This interface supports Third Party Platform generation business call.

  • The permission set to which this interface belongs is: 26

  • When a service provider is authorized by one of the permissions set, it can call on behalf of the merchant by using authorizer_access_token , which can be viewed in the third-party call documentation.

# 2. Request parameters

# Query parametersQuery String parameters

Parameter NametypeRequired to fill inIntroductions
access_tokenstringyesInterface invocation credentials, using access_token , authorizer_access_token

# Request BodyRequest Payload

Parameter NametypeRequired to fill inIntroductions
item_listobjarrayyesList of invoices

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberError code
errmsgstringError Description
item_listobjarrayInvoice information

# Res.item_list(Array)Object Payload

Invoice information

Parameter NametypeIntroductions
card_idstringInvoice id
begin_timenumberThe starting time of the validity period of the invoice
end_timenumberDeadline of the invoice
openidstringUser ID
typestringType of invoice, such as Guangdong VAT General Invoice
payeestringThe recipient of the invoice
detailstringInvoice details
user_infoobjectMain information that users can see on the face of the invoice

# Res.item_list(Array).user_infoObject Payload

Main information that users can see on the face of the invoice

Parameter NametypeIntroductions
feenumberThe amount of the invoice divided into units
titlestringThe rise of invoices
billing_timenumberInvoice time, 10-digit time stamp (UTC + 8)
billing_nostringThe invoice number of the invoice; Numerical invoice transmits 20 digit invoice number
billing_codestringThe invoice code of the invoice; Electrical invoice The invoice code is empty
infoobjarrayDetails of product structure
fee_without_taxnumberExcluding the amount of tax, divided into units
taxnumberThe amount of tax, divided into units
pdf_urlstringPDF for this invoice_URL
trip_pdf_urstringURL corresponding to the attachments of other consumer vouchers, such as taxi tickets, water bills, etc.
check_codestringCheck code, invoice pdf upper right corner, invoice date under the check code; Electrical invoice verification code is empty
buyer_numberstringBuyer's Taxpayer Identification Number
buyer_address_and_phonestringBuyer's address, phone number
buyer_bank_accountstringBuyer's bank account and account number
seller_numberstringSeller Taxpayer Identification Number
seller_address_and_phonestringThe seller's address and phone number
seller_bank_accountstringThe seller's account and account number
remarksstringNote, the beginning of the bottom right corner of the invoice
cashierstringRecipient, bottom left corner of the invoice
makerstringThe invoicer, at the bottom of the invoice
reimburse_statusstringStatus of invoice reimbursement

# Res.item_list(Array).user_info.infoObject Payload

Details of product structure

Parameter NametypeIntroductions
namestringName of the project
numnumberNumber of projects
unitstringUnit of the project, such as a
pricenumberUnit price of the project

# 4. Note

The invoice status code and the meaning of the status are as follows:

state meaning
INVOICE_REIMBURSE_INIT Initial status of invoice, not locked, may be submitted for reimbursement
INVOICE_REIMBURSE_LOCK The invoice is locked and cannot be repeated to submit reimbursement
INVOICE_REIMBURSE_CLOSURE The invoice has been written off and removed from the user card package

# 5. Code examples

Example Requests

{
    "item_list": [
        {
            "card_id": "pjZ8Yt7KKEXWMpETmwG2ZZxX2m6E",
            "encrypt_code": "O/mPnGTpBu22a1szmK2 "
        },
        {
            "card_id": "pjZ8YtxSguaLUaaDqzeAf385soJM",
            "encrypt_code": "O/mPnGTpBu22a1szmK2ogz "
        }
    ]
}

Return an example

{
    "errcode": 0,
    "errmsg": "ok",
    "item_list": [
        {
            "user_info": {
                "fee": 123,
                "title": "灌哥发票",
                "billing_time": 1504085973,
                "billing_no": "1504085973",
                "billing_code": "aabbccdd",
                "info": [
                    {
                        "name": "牙膏",
                        "num": 3,
                        "unit": "个",
                        "price": 10000
                    }
                ],
                "fee_without_tax": 2345, 
                "tax": 123, 
                "detail": "项目", 
                "pdf_url": "http://pdfurl", 
                "reimburse_status": "INVOICE_REIMBURSE_INIT", 
                "order_id": "1504085935", 
                "check_code": "check_code", 
                "buyer_number": "buyer_number"
            }, 
            "card_id": "pjZ8Yt7KKEXWMpETmwG2ZZxX2m6E", 
            "openid": "oZI8Fj8L63WugQsljlzzfCcw3AkQ", 
            "type": "广东省增值税普通发票", 
            "payee": "测试-收款方", 
            "detail": "detail"
        }, 
        {
            "user_info": {
                "fee": 123, 
                "title": "灌哥发票", 
                "billing_time": 1504083578, 
                "billing_no": "1504083578", 
                "billing_code": "aabbccdd", 
                "info": [
                    {
                        "name": "牙膏", 
                        "num": 3, 
                        "unit": "个", 
                        "price": 10000
                    }
                ], 
                "fee_without_tax": 2345, 
                "tax": 123, 
                "detail": "项目", 
                "pdf_url": " http://pdfurl", 
                "reimburse_status": "INVOICE_REIMBURSE_INIT", 
                "order_id": "1504083522", 
                "check_code": "check_code", 
                "buyer_number": "buyer_number"
            }, 
            "card_id": "pjZ8YtxSguaLUaaDqzeAf385soJM", 
            "openid": "oZI8Fj8L63WugQsljlzzfCcw3AkQ", 
            "type": "广东省增值税普通发票", 
            "payee": "测试-收款方", 
            "detail": "detail"
        }
    ]
}

# 6. Error code

The following is a list of error codes for this interface, other error codes can refer to General error codes

Error codeError DescriptionSolutions
0Ok or in a normal stateOK means to go from abnormal to normal in a normal state
72015unauthorized create invoiceNo authority to operate an invoice
72017invalid invoice titleInvoices are rising inconsistently
72023invoice has been lock by others Invoice has been locked by other Official Account
72024invoice status error Invoices are incorrectly registered

# 7. Scope of application

How this interface can be invoked under different account types:
Weixin Mini Program Official Account Service Account Mobile App
Certification only
  • Authentication only: means that only authenticated accounts are allowed to be invoked by the enterprise entity, and accounts that are not authenticated or do not support authentication cannot be invoked.
  • ✔: The account can call this interface
  • Other account types that are not expressly stated may not be called on this interface without special instructions;