Xóa hóa đơn nháp
Xóa hóa đơn điện tử nháp theo reference_code.
API Endpoint
POST
https://einvoice-api-sandbox.sepay.vn/v1/invoices/delete/{reference_code}API Request
reference_codestringrequired
Mã tham chiếu hóa đơn nháp
API Response
Response thành công (200)
{
"success": true,
"data": {
"reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"message": "Hóa đơn nháp đã được xóa thành công"
}
}successboolean
dataobject
Xử lý lỗi
400Bad Requestreference_code sai hoặc hóa đơn không ở trạng thái nháp.
401UnauthorizedThiếu hoặc sai Bearer token.
404Not FoundKhông tìm thấy hóa đơn.
500Server ErrorKhông xóa được từ nhà cung cấp.
Lưu ý
Cảnh báo
Chỉ xóa được hóa đơn trạng thái draft. Hóa đơn đã phát hành không xóa được. Thao tác không thể hoàn tác.
Code mẫu
>
>
>
curl --request POST \--url https://einvoice-api-sandbox.sepay.vn/v1/invoices/delete/084e179d-d95a-11f0-aef4-52c7e9b4f41b \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'