Xem hóa đơn dạng file PDF
GET /<provider>/view-print-invoice
API dùng để xem hóa đơn đã xuất dạng file PDF.
Headers
| Name | Required | Description |
|---|---|---|
Authorization | ✅ | Bearer token_truy_cap |
Content-Type | ✅ | application/json |
X-Tax-Code | ✅ | Mã số thuế người bán. |
Query Parameters
| Name | Kiểu dữ liệu | Description |
|---|---|---|
id | string | Trường vpid hoặc sid, ưu tiên vpid nếu có (trả về trong từng phần tử của danh sách hóa đơn). Đối với Misa dùng trường search_code (mã tra cứu). |
stax | string | Mã số thuế người bán (cửa hàng…). |
template_code | string | Mã mẫu hóa đơn (được lấy từ danh sách ký hiệu hóa đơn ở NCC Viettel). |
from_pos | boolean | Có phải là hóa đơn phát hành từ máy tính tiền (Misa). |
- 1Invoice
- one-invoice
- misa
- fpt
- viettel
curl --location 'https://stag-invoice-hub.1invoice.vn/1Invoice/view-print-invoice?id=3a1bafb9-4889-9c3c-802b-d3af714d2dc6' \
--header 'authorization: Bearer O87316arj5+Od3Fqyy5hzdBfIuPk73eKqpAzBSvv8sY=' \
--header 'x-tax-code: 0106026495-998'
curl --location 'https://stag-invoice-hub.1invoice.vn/one-invoice/view-print-invoice?id=3a20a2e0-826d-f10f-805c-6820e9550220&stax=0106026495-998&template_code=1&from_pos=true' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: Bearer O87316arj5+Od3Fqyy5hzdBfIuPk73eKqpAzBSvv8sY=' \
--header 'x-tax-code: 0106026495-998' \
--data ''
curl --location 'https://stag-invoice-hub.1invoice.vn/misa/view-print-invoice?id=B1HNTAR8V__&stax=2222222222-788&template_code=1C25MAT&from_pos=true' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: Bearer <token>' \
--header 'x-tax-code: 2222222222-788'
curl --location 'https://stag-invoice-hub.1invoice.vn/fpt/view-print-invoice?id=8296-SO000227&stax=0104128565-999&from_pos=false' \
--header 'authorization: Bearer <token>' \
--header 'x-tax-code: 0104128565-999'
curl --location 'https://stag-invoice-hub.1invoice.vn/viettel/view-print-invoice?stax=0100109106-509&id=K25MVV11&template_code=2%2F00138&from_pos=true' \
--header 'authorization: Bearer <token>' \
--header 'x-tax-code: 0100109106-509' \
--header 'Cookie: d4150655895b8526de84b2ab49c2b9e4=25b23b9c55e22b9e0de3559674a733dd'