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

Supplier list — API Pancake POS

get /shops/{SHOP_ID}/supplier · 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}/supplier

GET/shops/{SHOP_ID}/supplierGọi qua 360: GET https://partner.quantri360.com/v1/pancake_pos/shops/{SHOP_ID}/supplier
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 nhà cung cấp (NCC): mã, tên, SĐT, địa chỉ, công nợ phải trả, tổng tiền đã nhập, thông tin tài khoản thanh toán. Dùng để ghép supplier_products_id ở phiếu nhập / xuất / thu chi ra tên NCC và theo dõi nợ NCC.

  • Gọi thật: 121 NCC trong một phản hồi, các trường phân trang = null.
  • debt_must_pay / total_purchase có thể là số hoặc chuỗi số; total_debt là chuỗi — ép kiểu trước khi cộng.

Request

Địa chỉ

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

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.

Ví dụ request

curl -s "https://partner.quantri360.com/v1/pancake_pos/shops/1234567/supplier" \
  -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/supplier",
    params={},
    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/supplier');
for (const [k, v] of Object.entries({})) 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/supplier' . '?' . http_build_query([]);
$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[]NCC — trả HẾT trong một lần.
idint1842007882Mã NCC — khớp supplier_products_id ở API khác.
custom_idint|string121Mã NCC tự đặt.
namestringNCC Vải Hà NộiTên.
phone_numberstringSĐT.
full_addressstringĐịa chỉ.
typeint0Loại NCC.
debt_must_paynumber0Công nợ còn phải trả NCC (VND).
total_purchasenumber0Tổng giá trị đã nhập từ NCC (VND).
payment_infoobjectaccount_name, account_number, partner_code (ngân hàng).
is_activatedbool
tagsint[][]
descriptionstring
total_debtstring0Tổng công nợ mọi NCC — kiểu CHUỖI số.
page_number / page_size / total_pages / total_entriesintnullLuôn null (không phân trang).

Mẫu phản hồi

{
  "success": true,
  "data": [
    {
      "id": 1842007882,
      "name": "NCC Vải Hà Nội",
      "type": 0,
      "custom_id": 121,
      "phone_number": null,
      "full_address": "",
      "description": "Tạo từ excel",
      "tags": [],
      "is_activated": null,
      "debt_must_pay": 0,
      "total_purchase": 0,
      "payment_info": null
    }
  ],
  "total_debt": "0",
  "page_size": null,
  "total_pages": null,
  "page_number": null,
  "total_entries": 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 Kho ở trang nền tảng
  3. Tạo API key (tick kênh Pancake POS)
  4. Gọi theo ví dụ ở trên