VI | EN
Nhắn Messenger
Dành cho developer

List of e-invoices — API Pancake POS

get /shops/{SHOP_ID}/list_einvoices/ · gọi qua Quantri360 bằng một API key cho chính tài khoản / tài sản bạn đã kết nối và ủy quyền — 360 lo việc ký request và làm mới phiên đăng nhập bạn đã cấp.

get /shops/{SHOP_ID}/list_einvoices/

GET/shops/{SHOP_ID}/list_einvoices/Gọi qua 360: GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/list_einvoices/
Sắp mở. API này đã chạy thật qua 360 và đang được chốt giá — bạn có thể đọc tài liệu và chuẩn bị tích hợp trước.
Mô tả API

Danh sách hóa đơn điện tử đã tạo trên Pancake POS: số / ký hiệu hóa đơn, trạng thái phát hành, người mua, MST, tổng tiền, thuế, dòng hàng, đơn liên quan. Dùng để đối chiếu đơn đã xuất hóa đơn.

  • Cần cửa hàng bật tính năng hóa đơn điện tử trên Pancake. Gọi thật trên cửa hàng thử (chưa bật): HTTP 200, data rỗng, total_entries 0 — không báo lỗi quyền.
  • Đường dẫn có dấu / ở cuối — giữ nguyên.
  • Có thông tin người mua (tên, MST, email, SĐT).

Request

Địa chỉ

GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/list_einvoices/

Xác thực & gian hàng

TênVị tríKiểuMẫuMô tả
AuthorizationheaderheaderBearer q360_live_ab12cd34_…Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand.
platform_shop_idquerystring1234567SHOP_ID đã nối — có thể bỏ khi đường dẫn có /shops/{SHOP_ID}.

Tham số request

TênVị tríKiểuBắt buộcMẫuMô tả
SHOP_IDpathintegerCó1234567Mã cửa hàng đã nối với 360.
startDatequeryintKhông1790787600Tạo từ (Unix giây).
endDatequeryintKhông1793466000Tạo đến.
startDateReleasequeryintKhôngPhát hành từ (Unix giây).
endDateReleasequeryintKhôngPhát hành đến.
marketplace_idquerystringKhôngLọc theo sàn.
account_idquerystringKhôngLọc theo tài khoản.
namequerystringKhôngTên tài khoản.

Phân trang

Phản hồi có page_number, page_size (30) và scroll_id — gửi lại scroll_id để lấy tiếp khi có.

Ví dụ request

curl -s "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/list_einvoices/?startDate=1790787600&endDate=1793466000" \
  -H "Authorization: Bearer $KEY"
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.get(
    "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/list_einvoices/",
    params={
        "startDate": 1790787600,
        "endDate": 1793466000
    },
    headers={"Authorization": f"Bearer {KEY}"},
    timeout=60,
)
print(r.status_code)
print(r.json())
Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/pancake_pos/shops/1234567/list_einvoices/');
for (const [k, v] of Object.entries({"startDate":1790787600,"endDate":1793466000})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
  method: 'GET',
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/pancake_pos/shops/1234567/list_einvoices/' . '?' . http_build_query(['startDate' => 1790787600, 'endDate' => 1793466000]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]);
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;

Response

Tham số phản hồi (nguyên của Pancake POS)

TênKiểuMẫuMô tả
successbooltrue
dataobject[]Hóa đơn.
idint
display_idint754
invoice_nostringSố hóa đơn.
invoice_seriesstringKý hiệu.
template_codestringMẫu số.
statusint2`0` chưa phát hành · `1` chờ phát hành · `2` đã phát hành · `3` đã hủy · `4` thay thế · `5` bị thay thế · `6` điều chỉnh · `7` bị điều chỉnh.
release_datestringNgày phát hành.
verification_codestringMã cơ quan thuế.
order_idintĐơn liên quan.
full_name / purchaser_unit / purchaser_tax_code / email / phone_numberstringNgười mua.
total_amountintTổng tiền (VND).
tax / included_taxintThuế.
discount / shipping_feeint
itemsobject[]Dòng hàng.
einvoice_account_idintTài khoản HĐĐT.
…adjustment_*, original_einvoice, creator…
page_number / page_size / total_pages / total_entries / scroll_id

Mẫu phản hồi

{
  "success": true,
  "data": [],
  "page_size": 30,
  "total_pages": null,
  "page_number": 1,
  "total_entries": 0,
  "scroll_id": null
}

Bắt đầu dùng

  1. Đăng ký tài khoản Partner
  2. Mở loại dữ liệu thuộc nhóm Tài chính ở trang nền tảng
  3. Tạo API key (tick kênh Pancake POS)
  4. Gọi theo ví dụ ở trên