PosApp Open APIs
  1. Webhook
PosApp Open APIs
  • Tổng quan
  • Thẻ PosApp
    • Mã lỗi (error code)
    • API Idempotency
    • Nạp tiền vào thẻ
      POST
    • Kiểm tra trạng thái giao dịch
      POST
  • Thông tin khác
    • Digital Signature
  • Webhook
    • Tổng quan
    • Order Schema
    • Warehouse import Schema
  • Sản phẩm
    • Tạo mới sản phẩm
      POST
    • Sửa một sản phẩm
      PATCH
    • Tồn kho sản phẩm
      POST
  • Khuyến mãi
    • Đồng giá
      • Tạo khuyến mãi
      • Sửa khuyến mãi
    • Xóa khuyến mãi
      POST
  • Đăng ký tài khoản PosApp
    • Danh sách mô hình kinh doanh
      GET
    • Đăng ký tài khoản
      POST
  1. Webhook

Order Schema

Mô tả dữ liệu
Order Create Schema
Dữ liệu này chứa trong trường `data` của payload
id
string 
required
ID đơn hàng
shop_id
integer 
required
ID cửa hàng
shop_name
string 
required
Tên cửa hàng
version_code
number 
required
Version hiện tại của đơn hàng, sẽ tăng sau mỗi lần cập nhật
code
string 
required
Mã đơn hàng
channel_id
integer 
required
ID kênh bán hàng
channel_name
string 
required
Tên kênh bán hàng
customer_id
integer 
optional
ID khách hàng
customer_name
string 
optional
Tên khách hàng
area_id
number 
optional
ID khu vực
area_name
string 
optional
Tên khu vực
table_id
number 
optional
ID bàn
table_name
string 
optional
Tên bàn
cancel_reason
string 
optional
Lý do hủy đơn
discount_price
number 
optional
Tiền giảm giá
discount_percent
number 
optional
% giảm giá
discount_reason
string 
optional
Lý do giảm giá
surcharge_price
number 
optional
Tiền phụ thu
surcharge_percent
number 
optional
% phụ thu
surcharge_reason
string 
optional
Lý do phụ thu
shipping_price
number 
optional
Phí vận chuyển
tax_price
number 
optional
Tiền thuế đơn
tax_percent
number 
optional
% thuế đơn
total_discount_price_items
number 
optional
Tổng tiền giảm giá sản phẩm
total_surcharge_price_items
number 
optional
Tổng tiền phụ thu sản phẩm
total_tax_price_items
number 
optional
Tổng thuế sản phẩm
paid_total
number 
optional
Tiền thanh toán
total
number 
optional
Tổng tiền đơn chưa trừ giảm giá hóa đơn
grand_total
number 
optional
Tổng tiền cuối cùng phải thanh toán
payment_status
enum<integer> 
required
Trạng thái thanh toán (0: chưa thanh toán; 1: thanh toán 1 phần. 2: thanh toán 100%. 3: xác nhận thanh toán đủ)
Allowed values:
0123
payment_completion_time
string 
optional
Thời gian hoàn thành thanh toán
order_date
string 
optional
Thòi gian khách hàng chọn lập báo cáo hóa đơn
checkout_time
string 
optional
Thời gian thanh toán lần đầu
order_items
array [object {15}] 
required
Danh sách sản phẩm trong đơn hàng
product_id
integer 
required
ID sản phẩm
product_master_id
integer 
required
ID master sản phẩm
product_name
string 
required
Tên sản phẩm
unit_id
integer 
required
Đơn vị tính
unit_name
string 
required
Tên đơn vị tính
price
number 
optional
Giá bán sản phẩm
product_price
number 
optional
Giá gốc sản phẩm trước khi thay đổi
original_price
number 
optional
Giá vốn nhập hàng
discount_price
number 
optional
Giảm giá sản phẩm
discount_percent
number 
optional
% giảm giá sản phẩm
surcharge_price
number 
optional
Phụ thu sản phẩm
surcharge_percent
number 
optional
% phụ thu sản phẩm
product_tax_price
number 
optional
Thuế món
product_tax_percent
number 
optional
% thuế món
product_type
integer 
optional
1: hàng hóa; 2: dịch vụ; 3: combo; 100: web teamplate; 101: pos service
transaction_items
array [object {8}] 
optional
Thông tin giao dịch
type
integer 
required
1: thu; 2: chi
asset_id
integer 
required
ID quỹ tiền
asset_name
string 
required
Tên quỹ tiền
status
integer 
required
1: Đã hoành thành; 2: Đã xác nhận; 5: Hủy
total
string 
required
Tiền thanh toán
receive_date
string 
optional
Ngày giao dịch
confirm_date
string 
optional
Ngày xác nhận
accounting_date
string 
optional
Ngày hạch toán
Dữ liệu mẫu
{
  "id": "174218742105515706853682707383",
  "shop_id": 1570685368,
  "shop_name": "DE Shop",
  "code": "HĐ00001",
  "channel_id": 10,
  "channel_name": "Bán trực tiếp",
  "customer_id": 0,
  "customer_name": null,
  "area_id": 1199,
  "area_name": "VIP",
  "table_id": 72721,
  "table_name": "VIP 11",
  "cancel_reason": null,
  "discount_price": 0.0,
  "discount_percent": 0.0,
  "surcharge_price": 0.0,
  "surcharge_percent": 0.0,
  "shipping_price": 0.0,
  "tax_price": 0.0,
  "tax_percent": 0.0,
  "total_discount_price_items": 0.0,
  "total_surcharge_price_items": 0.0,
  "total_tax_price_items": 1600.0,
  "paid_total": 41600.0,
  "total": 41600.0,
  "grand_total": 41600.0,
  "payment_status": 3,
  "payment_completion_time": "2025-03-17 00:00:00",
  "order_date": "2025-03-17 11:57:02",
  "paid_date": "2025-03-17 11:57:09",
  "order_detail": [
    {
      "product_id": 1120500,
      "product_master_id": 1119190,
      "product_name": "Nước ép thơm",
      "unit_id": 115671,
      "unit_name": "ly",
      "price": 20000.0,
      "product_price": 20000.0,
      "original_price": 0.0,
      "discount_price": 0.0,
      "discount_percent": 0.0,
      "surcharge_price": 0.0,
      "surcharge_percent": 0.0,
      "product_tax_percent": 8.0,
      "product_tax_price": 1600.0,
      "product_type": 1
    }
  ],
  "transactions": [
    "type": 1,
    "asset_id": 6770,
    "asset_name": "Tiền mặt",
    "status": 2,
    "total": 37950.0,
    "receive_date": "2025-03-26 17:19:07",
    "confirm_date": "2025-03-26 17:19:07",
    "accounting_date": "2025-03-26 17:19:07",
  ]
}
Modified at 2025-04-24 08:15:55
Previous
Tổng quan
Next
Warehouse import Schema
Built with