Lấy danh sách ký hiệu hóa đơn
GET /<provider>/get-invoice-serials
API dùng để lấy danh sách các ký hiệu hóa đơn đã đăng ký.
Headers
| Name | Required | Description |
|---|---|---|
Authorization | ✅ | Bearer token |
Content-Type | ✅ | application/json |
X-Tax-Code | ✅ | Mã số thuế doanh nghiệp. |
Query Parameters
| Name | Required | Description |
|---|---|---|
inv_type | Không truyền: lấy tất cả. Loại hóa đơn 1: Hóa đơn GTGT, 2: Hóa đơn bán hàng, 3: Hóa đơn bán tài sản công, 4: Hóa đơn bán hàng dự trữ quốc gia, 5: Tem vé thẻ, 6: Phiếu xuất kho (Kiêm vận chuyển nội bộ, gửi bán đại lý). | |
stax | Mã số thuế người bán (Viettel bắt buộc). |
Response
| Name | Description |
|---|---|
data[].year | Năm hiện tại (lấy 2 số cuối) |
data[].inv_type | Loại hóa đơn |
data[].value | Giá trị ký hiệu hóa đơn |
data[].inv_type_name | Mô tả ký hiệu hóa đơn |
data[].template_code | Ký hiệu mẫu hóa đơn (Viettel) |
- 1Invoice
- one-invoice
- fpt
- viettel
- misa
- Response
curl --location 'https://stag-invoice-hub.1invoice.vn/1Invoice/get-invoice-serials?inv_type=1' \
--header 'authorization: Bearer <token>' \
--header 'x-tax-code: 0106026495-998'
curl --location 'https://stag-invoice-hub.1invoice.vn/one-invoice/get-invoice-serials?stax=0106026495-998' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: Bearer <token>' \
--header 'x-tax-code: 0106026495-998' \
--data ''
curl --location 'https://stag-invoice-hub.1invoice.vn/fpt/get-invoice-serials?stax=0104128565-999' \
--header 'authorization: Bearer <token>' \
--header 'x-tax-code: 0104128565-999'
curl --location 'https://stag-invoice-hub.1invoice.vn/viettel/get-invoice-serials?stax=0100109106-509' \
--header 'authorization: Bearer <token>' \
--header 'x-tax-code: 0100109106-509'
curl --location 'https://stag-invoice-hub.1invoice.vn/misa/get-invoice-serials?stax=2222222222-788' \
--header 'authorization: Bearer <token>' \
--header 'x-tax-code: 2222222222-788'
{
"data": [
{
"year": 25,
"inv_type": "1",
"value": "1C25MTS",
"inv_type_name": "Hóa đơn giá trị gia tăng - Máy tính tiền"
},
{
"year": 25,
"inv_type": "1",
"value": "1C25MSH",
"inv_type_name": "Hóa đơn giá trị gia tăng - Máy tính tiền"
},
{
"year": 25,
"inv_type": "1",
"value": "1C25MMP",
"inv_type_name": "Hóa đơn giá trị gia tăng - Máy tính tiền"
}
],
"success": true,
"message": "Thành công"
}