# Volume update of expense invoice status

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: invoicereimburseupdatestatusbatch

The invoicing platform can use this interface to lock, unlock and reimburse an invoice. Note that the reimbursement state is irreversible, so developers should use caution.

NOTE:

The reimbursement party shall ensure that the status is synchronized to WeChat side in time after reimbursement, locking and unlocking, and ensure that the user invoice can be used normally.

2 Batch update of the invoice status interface is a transactional operation. If one invoice update fails, the other invoice state updates in the list cannot be executed and are restored to the state before the interface is called

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/card/invoice/reimburse/updatestatusbatch?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
openidstringyesUser openid
reimburse_statusstringyesStatus of invoice reimbursement
invoice_listobjarrayyesList of invoices

# Body.invoice_list(Array)Object Payload

List of invoices

Parameter NametypeRequired to fill inIntroductions
card_idstringyesCard_id of invoice card voucher
encrypt_codestringyesThe encryption code of the invoice card coupon, and card_id together constitute the unique identity of an invoice card coupon

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberError code
errmsgstringError Description

# 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

{
    "openid": "{openid}",
    "reimburse_status": "{reimburse_status}",
    "invoice_list":
    [
        {"card_id":"cardid_1","encrypt_code":"encrypt_code_1"},
        {"card_id":"cardid_2","encrypt_code":"encrypt_code_2"}
    ]
}

Return an example

{
    "errcode": 0,
    "errmsg": "ok"
}

# 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
40001invalid credential  access_token isinvalid or not latestaccess_token Invalid or not recently acquired access_token, please confirm the validity of the access_token

# 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;