Hủy hóa đơn đã phát hành
Phương thức này dùng để hủy hóa đơn đã phát hành.
1. Request
Kiểu doanh nghiệp | Method | <BaseURL> |
---|---|---|
Không mã | POST | <BaseURL>/itg/invoicepublished/cancel |
Có mã | POST | <BaseURL>/code/itg/invoicepublished/cancel |
Header
Content-Type: application-json
Authorization: Bearer <token>
CompanyTaxCode: "Mã số thuế đăng nhập"
Body parameter
{
"TransactionID":"mã tra cứu",
"InvNo":"số hóa đơn",
"RefDate":"ngày hủy hóa đơn",
"CancelReason":"lý do hủy hóa đơn",
}
Lưu ý: đối với HD máy tính tiền thì truyền thêm "InvoiceType": 10
2. Response
Kết quả trả về Json dạng:
{
"Success": <false/true>,
"Data": "<list id hóa đơn xóa>",
"ErrorCode": "<Trống hoặc Mã lỗi>",
"Errors": ""
}
3. Ví dụ
https://testapi.meinvoice.vn/api/v3/itg/invoicepublished/cancel
Body:
{
"TransactionID":"BGUGH_MZM123",
"InvNo":"00000004",
"RefDate":"2021-11-29",
"CancelReason":"hủy qua API"
}
Respone:
{
"Success": true,
"ErrorCode": null,
"Errors": [],
"Data": "{\"240b374b-751f-4ce2-b7af-3a5fac7f968d\"}",
"CustomData": null
}