Cập nhật hóa đơn

 /api/EInvoiceOnline/UpdateEInvoice

Mô tả: api này dùng để cập nhật thông tin hóa đơn lên hệ thống eHoaDon Online

Method
: HTTPPOST

URL: https://[TaxNumber].ehoadon.net/api/EInvoiceOnline/UpdateEInvoice

Auth type:  Bearer Token (mã token đã tạo từ bước "Tạo token")

Content-Type: application/json

Body:

{
  "id": "string",
  "guid": "string",
  "serial": "string",
  "invoiceNumber": "string",
  "arisingDate": "2022-08-29T01:34:06.386Z",
  "vatRate": 0,
  "status": "New",
  "paymentMethod": "None",
  "currencyType": "VND",
  "exchangeRate": 0,
  "eInvoiceItems": [
    {
      "posNumber": 0,
      "productNumber": "string",
      "productId": "string",
      "productName": "string",
      "unit": "string",
      "quantity": 0,
      "price": 0,
      "vatRate": 0,
      "vatRateDisplay": 0,
      "free": true,
      "discount": true,
      "currencyType": "VND",
      "addAmount": 0,
      "amount": 0,
      "vatAmount": 0,
      "discountRate": 0,
      "discountAmount": 0,
      "totalAmount": 0,
      "displayOrder": 0
    }
  ],
  "invoiceCustomer": {
    "id": "string",
    "customerNumber": "string",
    "taxNumber": "string",
    "companyName": "string",
    "fullName": "string",
    "address": "string",
    "phoneNumber": "string",
    "email": "string",
    "bankAccountNumber": "string",
    "bankName": "string",
    "bankOwnerName": "string"
  },
  "note": "string",
  "isUseCheckDiscount": true,
  "rateCheckDiscount": 0,
  "discountType": "NotDicount"
}

Responses
:
{
  "message": null,
  "status": "success",
  "code": 200
  "data": {
    "invoiceId": "630dc4111c27b00129ecce27",
    "errors": null
  }
}

Thông tin dữ liệu:

1. Invoice - Thông tin hóa đơn

2. InvoiceCustomer - Thông tin khách hàng

3. EInvoiceItem- Thông tin sản phẩm/dịch vụ

4. DiscountType - Loại chiết khấu

5. Responses
 5.1 message: Nội dung kết quả trả về
 5.2 code:
     - 200: thành công
     - 400: không thành công
 5.3 status:
     - success: thành công
     - error: không thành công
 5.4 data
    - invoiceId: id của hóa đơn(có giá trị nếu thành công)
    - errors: danh sách field bị lỗi
       - kiểu dữ liệu: Dictionary<string, string>(key: field name, value: nội dung lỗi)
       - ví dụ:

{
  "data": {
    "InvoiceId": null,
    "Errors": {
      "Serial": "Ký hiệu hóa đơn không hợp lệ"
    }
  },
  "message": null,
  "status": "error",
  "code": 400
}

 

keyboard_arrow_up back to top tuneBộ lọc