Tài chính

Đối soát

1 endpoint · https://pos.pages.fm/api/v1

Xem Markdown

Danh sách phiếu đối soát

GET/shops/{SHOP_ID}/reconciliations

Lấy danh sách phiếu đối soát. Mỗi phiếu kèm các đơn thuộc phiếu trong mảng orders

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Tham số truy vấn

pageinteger

Số trang

Mặc định: 1 · Ví dụ: 1
page_sizeinteger

Kích thước trang. Mặc định 10, tối đa 50 (gửi lớn hơn sẽ bị hạ về 50)

Mặc định: 10 · Ví dụ: 10
sort_bystring

Sắp xếp tăng dần theo updated_at (rồi system_id) để đồng bộ tăng dần. Không gửi thì sắp theo thời điểm tạo giảm dần

Giá trị"updated_at"
Ví dụ: "updated_at"
startDateUpdatedAtinteger · int64

Chỉ lấy phiếu có updated_at >= thời điểm này (unix timestamp, giây). Có thể gửi một mình, không cần endDateUpdatedAt

Ví dụ: 1758182400
endDateUpdatedAtinteger · int64

Chỉ lấy phiếu có updated_at <= thời điểm này (unix timestamp, giây)

Ví dụ: 1758268800
include_removedboolean

Bao gồm phiếu đã gỡ (is_removed: true). Gửi true để bật

Mặc định: false · Ví dụ: true
system_id[]array<integer>

Lọc theo mã nội bộ của phiếu. Cũng nhận một giá trị dạng system_id=123

display_idinteger

Lọc theo mã phiếu hiển thị trên shop

Ví dụ: 92
searchstring

Tìm theo display_id hoặc custom_id của phiếu. Nhiều mã cách nhau bằng khoảng trắng hoặc dấu phẩy; khớp bất kỳ mã nào

Ví dụ: "92 94"
partner_id[]array<string>

ID đơn vị vận chuyển trên hệ thống Pancake (xem Danh sách đơn vị vận chuyển). Cũng nhận một giá trị dạng partner_id=1

creator_idstring · uuid

Lọc theo mã người tạo phiếu

Ví dụ: "d6e6a545-f102-439e-9943-8ac8369f9735"
order_idinteger

Chỉ lấy phiếu chứa đơn này (mã nội bộ của đơn, system_id của đơn hàng)

Ví dụ: 1418
startDateinteger · int64

Đầu khoảng thời điểm tạo phiếu (unix timestamp, giây). Chỉ áp dụng khi gửi cả startDate và endDate

Ví dụ: 1756684800
endDateinteger · int64

Cuối khoảng thời điểm tạo phiếu (unix timestamp, giây)

Ví dụ: 1759276800
startDatePaidAtinteger · int64

Đầu khoảng thời điểm thanh toán (unix timestamp, giây). Chỉ áp dụng khi gửi cả startDatePaidAt và endDatePaidAt; phiếu chưa có paid_at bị loại

Ví dụ: 1756684800
endDatePaidAtinteger · int64

Cuối khoảng thời điểm thanh toán (unix timestamp, giây)

Ví dụ: 1759276800

Phản hồi

object
successboolean

Trạng thái thành công

dataarray<Reconciliation>

Danh sách phiếu đối soát

page_numberinteger

Số trang

page_sizeinteger

Kích thước trang

total_entriesinteger

Tổng số bản ghi

total_pagesinteger

Tổng số trang

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/reconciliations?api_key=API_KEY"
Phản hồi 200
{
  "success": true,
  "page_number": 1,
  "page_size": 10,
  "total_entries": 1,
  "total_pages": 1,
  "data": [
    {
      "system_id": 123,
      "display_id": 92,
      "custom_id": "7358901234567890123",
      "partner_id": "1",
      "control_type": "control_cod",
      "note": "Đối soát COD tuần 38",
      "excel_cod": 1250000,
      "excel_fee": 65000,
      "pos_cod": 1250000,
      "paid_at": "2026-09-18T08:06:55",
      "payment_status": "paid",
      "creator": {
        "id": "d6e6a545-f102-439e-9943-8ac8369f9735",
        "name": "vudzung12"
      },
      "updater": {
        "id": "d6e6a545-f102-439e-9943-8ac8369f9735",
        "name": "vudzung12"
      },
      "inserted_at": "2026-09-17T03:12:40.512345",
      "updated_at": "2026-09-18T08:06:55.000000",
      "is_removed": false,
      "orders": [
        {
          "order_id": 1418,
          "display_id": 1418,
          "custom_id": null,
          "extend_code": "S58824.MB25.C3.500020713",
          "order_number_vtp": null,
          "order_status": 4,
          "result": "succeed",
          "message": null,
          "cod_amount": 750000,
          "partner_fee": 35000,
          "pos_cod": 750000,
          "currency": "VND",
          "reconciliation_at": "2026-09-17T03:12:40"
        },
        {
          "order_id": 1419,
          "display_id": 1419,
          "custom_id": null,
          "extend_code": "S58824.MB25.C3.500020714",
          "order_number_vtp": null,
          "order_status": 4,
          "result": "mismatch",
          "message": null,
          "cod_amount": 500000,
          "partner_fee": 30000,
          "pos_cod": 520000,
          "currency": "VND",
          "reconciliation_at": "2026-09-17T03:12:40"
        }
      ]
    }
  ]
}