# Ví dụ E-Invoice Normalizer: đọc 1 hoá đơn mẫu

**Use case:** 

Chạy thử sẵn Vietnam E-Invoice XML Normalizer với 1 hoá đơn mẫu (dữ liệu giả định) — xem ngay kết quả JSON đã chuẩn hoá (số hoá đơn, người bán, người mua, hàng hoá, tổng tiền) mà không cần tự có sẵn file XML, sau đó thay bằng hoá đơn thật của bạn. 
Pre-configured example run using a sample invoice — try instantly, then swap in your own XML.

## Input

```json
{
  "invoices": [
    {
      "xmlContent": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<HDon>\n  <DLHDon Id=\"vidu-001\">\n    <TTChung>\n      <PBan>2.0.1</PBan>\n      <THDon>Hóa đơn giá trị gia tăng</THDon>\n      <KHMSHDon>1</KHMSHDon>\n      <KHHDon>C25VDU</KHHDon>\n      <SHDon>0000001</SHDon>\n      <NLap>2026-09-23</NLap>\n      <DVTTe>VND</DVTTe>\n      <TGia>1</TGia>\n    </TTChung>\n    <NDHDon>\n      <NBan>\n        <Ten>Công ty TNHH Ví Dụ ABC</Ten>\n        <MST>0101234567</MST>\n        <DChi>123 Đường Ví Dụ, Phường 1, Quận 1, TP.HCM</DChi>\n      </NBan>\n      <NMua>\n        <Ten>Nguyễn Văn An</Ten>\n        <DChi>456 Đường Mẫu, Phường 2, Quận 2, TP.HCM</DChi>\n      </NMua>\n      <DSHHDVu>\n        <HHDVu>\n          <STT>1</STT>\n          <THHDVu>Dịch vụ tư vấn phần mềm</THHDVu>\n          <DVTinh>Gói</DVTinh>\n          <SLuong>1</SLuong>\n          <DGia>2000000</DGia>\n          <ThTien>2000000</ThTien>\n          <TSuat>10%</TSuat>\n        </HHDVu>\n      </DSHHDVu>\n      <TToan>\n        <TgTCThue>2000000</TgTCThue>\n        <TgTThue>200000</TgTThue>\n        <TgTTTBSo>2200000</TgTTTBSo>\n        <TgTTTBChu>Hai triệu hai trăm nghìn đồng</TgTTTBChu>\n      </TToan>\n    </NDHDon>\n  </DLHDon>\n</HDon>\n",
      "sourceLabel": "Hóa đơn mẫu (dữ liệu giả định)"
    }
  ],
  "hideBuyerPersonalInfo": true,
  "includeRawData": true
}
```

## Output

```json
{
  "trang_thai_phan_tich": {
    "label": "Trạng thái phân tích",
    "format": "text"
  },
  "thong_tin_chung.so_hoa_don": {
    "label": "Số hoá đơn",
    "format": "text"
  },
  "thong_tin_chung.ky_hieu_hoa_don": {
    "label": "Ký hiệu",
    "format": "text"
  },
  "thong_tin_chung.ngay_lap": {
    "label": "Ngày lập",
    "format": "date"
  },
  "nguoi_ban.ten": {
    "label": "Người bán",
    "format": "text"
  },
  "nguoi_ban.mst": {
    "label": "MST người bán",
    "format": "text"
  },
  "nguoi_mua.ten": {
    "label": "Người mua",
    "format": "text"
  },
  "nguoi_mua.da_an_thong_tin_ca_nhan": {
    "label": "Đã ẩn info cá nhân?",
    "format": "boolean"
  },
  "tong_thanh_toan.tong_tien_thanh_toan_so": {
    "label": "Tổng thanh toán",
    "format": "number"
  },
  "canh_bao": {
    "label": "Cảnh báo",
    "format": "array"
  }
}
```

## About this Actor

This example demonstrates how to use [Vietnam E-Invoice XML Normalizer](https://apify.com/donerightlabs/vn-einvoice-xml-normalizer.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/donerightlabs/vn-einvoice-xml-normalizer.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/donerightlabs/vn-einvoice-xml-normalizer.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
