Danh sách xuất nhập kho nháp

  • API này dùng để lấy danh sách phiếu nháp: hóa đơn nháp nhà cung cấp, bán lẻ, bán sỉ, chuyển kho.

    • Các loại hóa đơn khác bạn có thể xem 2 request params là type và mode ở bên dưới để làm tương tự.

  • Chú ý:

    • Hệ thống chỉ hỗ trợ lấy hóa đơn trong khoảng 31 ngày.

    • Nếu bạn không truyền param lastUpdatedAt mặc định sẽ lấy 31 ngày gần nhất. Nếu bạn muốn lấy dữ liệu các ngày cũ hơn, xin vui lòng truyền lastUpdatedAtFrom và lastUpdatedAtTo trong khoảng 31 ngày, VD: 2025-08-01 => 2025-08-31.

    • Khi lọc theo ids thì bỏ qua khoảng ngày.

Request

curl --location 'https://pos.open.nhanh.vn/v3.0/bill/draftlist?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": {
        "modes": [2],
        "lastUpdatedAtFrom": 1753981239,
        "lastUpdatedAtTo": 1756659639,
        "depotIds": [31010]
    },
     "paginator": {
        "size": 50,
        "next": {"id": 100}
    },
}'

Filters

Key
Type
Description

ids

array

ID phiếu xuất nhập kho

depotIds

array

Mảng ID kho hàng

statuses

array

List trạng thái phiếu nháp

lastUpdatedAtFrom

int

Thời gian cập nhật cuối từ (timestamp)

lastUpdatedAtTo

int

Thời gian cập nhật cuối đến (timestamp)

Paginator

Response

Failed response

Successful response

Last updated