Show / Hide Table of Contents

    Kiểm tra trạng thái hóa đơn

    Phương thức này cho phép lấy trạng thái về cơ quan thuế của hóa đơn đã phát hành.

    1 Request

    Kiểu doanh nghiệp Method <BaseURL&gt
    Không mã POST <BaseURL>/itg/invoicepublished/invoicestatus
    Có mã POST <BaseURL>/code/itg/invoicepublished/invoicestatus

    2 Header

    Content-Type: application-json
    Authorization: Bearer <token>
    CompanyTaxCode: "Mã số thuế đăng nhập"
    

    3 Body parameter

    Body parameter là một chuỗi Json chứa các tham số: List Mã tra cứu

    ["7KI9T6VNZ55"]
    

    4 Response

    Kết quả trả về Json dạng:

    {
        "Success": <false/true>,
        "Data": "<Dữ liệu trả về>",
        "ErrorCode": "<Trống hoặc Mã lỗi>",
        "Errors": ""
    }
    

    5 Ví dụ:

    https://testapi.meinvoice.vn/api/v3/itg/invoicepublished/invoicestatus
    
    body:["1VUQHQ48_","KDU0HQWAB"]
    
    {
        "Success": true,
        "ErrorCode": null,
        "Errors": [],
        "Data": "{\"TransactionID\":\"1VUQHQ48_\",\"PublishStatus\":1,\"ReferenceType\":0,\"InvoiceCode\":null,\"SendTaxStatus\":2,\"IsSentEmail\":false,\"IsDelete\":false,\"DeletedDate\":null,\"DeletedReason\":null,\"ReceivedStatus\":0},{\"TransactionID\":\"KDU0HQWAB\",\"PublishStatus\":1,\"ReferenceType\":0,\"InvoiceCode\":null,\"SendTaxStatus\":1,\"IsSentEmail\":false,\"IsDelete\":false,\"DeletedDate\":null,\"DeletedReason\":null,\"ReceivedStatus\":0}",
        "CustomData": null
    }
    

    Mô tả đối tượng tải về:

    /// /// Kết quả trả về: Trạng thái phát hành hóa đơn /// public class InvoiceStatusResult : OperationResult { /// /// Trạng thái phát hành hóa đơn /// public InvoiceStatus InvoiceStatus { get; set; } }

    /// <summary>
    /// Trạng thái phát hành hóa đơn
    /// </summary>
    public class InvoiceStatus
    {
        /// <summary>
        /// Mã tra cứu hóa đơn
        /// </summary>
        public string TransactionID { get; set; }
    
        /// <summary>
        /// Trạng thái phát hành
        /// Mô tả theo <see cref="Enum.SaveInvoiceSatus"/>
        /// </summary>
        public Enum.SaveInvoiceSatus PublishStatus { get; set; }
    
        /// <summary>
        /// Loại hóa đơn
        /// Mô tả theo <see cref="Enum.InvoiceReferenceType"/>
        /// </summary>
        public Enum.InvoiceReferenceType ReferenceType { get; set; }
    
        /// <summary>
        /// Mã cơ quan thuế cấp - đối với hóa đơn có mã
        /// </summary>
        public string InvoiceCode { get; set; }
    
        /// <summary>
        /// Trạng thái gửi hóa đơn sang Cơ quan thuế
        ///     - Không có mã: (0: chưa gửi CQT; 1: Đã gửi CQT; 2: CQT tiếp nhận; 3: CQT không tiếp nhận; 4: gửi lỗi)
        ///     - Có mã: (0: chờ cấp mã; 1: gửi lỗi; 2: đã cấp mã; 3: từ chối cấp mã; 4: gửi lỗi)
        /// Mô tả theo <see cref="Enum.SendToTaxStatus"/>
        /// </summary>
        public Enum.SendToTaxStatus SendTaxStatus { get; set; }
    
        /// <summary>
        /// Trạng thái gửi hóa đơn cho khách hàng (0: Chưa gửi; 1: Đã gửi)
        /// </summary>
        public bool IsSentEmail { get; set; }
    
        /// <summary>
        /// Là hóa đơn bị hủy chưa
        /// </summary>
        public bool IsDelete { get; set; }
    
        /// <summary>
        /// Ngày hủy hóa đơn
        /// </summary>
        public System.DateTime? DeletedDate { get; set; }
    
        /// <summary>
        /// Lý do hủy hóa đơn
        /// </summary>
        public string DeletedReason { get; set; }
    
        /// <summary>
        /// Người mua đã nhận hóa đơn: 0: Chưa nhận được; 1: Đã nhận được
        /// </summary>
        public int ReceivedStatus { get; set; }
    }
    
    Back to top Copyright © 2015-2016 Microsoft
    Generated by DocFX