# Volume update of expense invoice status
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 Name | type | Required to fill in | Introductions |
---|---|---|---|
access_token | string | yes | Interface invocation credentials, using access_token , authorizer_access_token |
# Request BodyRequest Payload
Parameter Name | type | Required to fill in | Introductions |
---|---|---|---|
openid | string | yes | User openid |
reimburse_status | string | yes | Status of invoice reimbursement |
invoice_list | objarray | yes | List of invoices |
# Body.invoice_list(Array)Object Payload
List of invoices
Parameter Name | type | Required to fill in | Introductions |
---|---|---|---|
card_id | string | yes | Card_id of invoice card voucher |
encrypt_code | string | yes | The 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 Name | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error 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 code | Error Description | Solutions |
---|---|---|
40001 | invalid credential access_token isinvalid or not latest | access_token Invalid or not recently acquired access_token, please confirm the validity of the access_token |
# 7. Scope of application
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;