Đơn Đặt Hàng KiotViet icon

Đơn Đặt Hàng KiotViet

Quản lý đơn đặt hàng từ KiotViet

Overview

This node manages purchase orders from the KiotViet platform. It supports creating new orders, retrieving orders by ID, updating existing orders, canceling orders, and fetching lists of orders with optional filters.

A common use case is automating order management workflows, such as syncing purchase orders from KiotViet into other systems, bulk processing orders, or monitoring order statuses. For example, a user might fetch all purchase orders created within a date range that are still processing to trigger follow-up actions.

The "Lấy Danh Sách" (Get All) operation specifically retrieves multiple purchase orders, optionally filtered by status and creation date, and can return either all matching results or a limited subset.

Properties

Name Meaning
Lấy Toàn Bộ Whether to return all results or only up to a given limit
Giới Hạn Max number of results to return (used if not returning all)
Bộ Lọc Collection of filters to narrow down the list of purchase orders:
- Trạng Thái Filter by order status; options: ĐAng Xử Lý (Processing), Hoàn Thành (Completed), ĐÃ Hủy (Canceled)
- Từ Ngày Filter orders created from this date (format YYYY-MM-DD)
- ĐếN Ngày Filter orders created up to this date (format YYYY-MM-DD)

Output

The output is an array of JSON objects representing purchase orders retrieved from KiotViet. Each object contains details about a purchase order according to the API response structure.

If the operation is "Lấy Danh Sách", the output includes multiple purchase orders matching the filter criteria. The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the KiotViet API.
  • Uses an internal KiotViet API helper class to perform HTTP requests.
  • No additional external dependencies beyond the configured API credential.

Troubleshooting

  • Common issues:
    • Invalid or missing API credentials will cause authentication failures.
    • Providing invalid date formats in filters may result in API errors.
    • Requesting too many records without enabling "Lấy Toàn Bộ" (returnAll) may truncate results unexpectedly.
  • Error messages:
    • Errors returned from the KiotViet API are surfaced with their message property.
    • If the node is set to continue on failure, errors for individual items are returned as JSON objects with an error field.
  • Resolutions:
    • Verify API credentials are correctly configured.
    • Ensure date filters use the YYYY-MM-DD format.
    • Use "Lấy Toàn Bộ" option to retrieve all matching records when needed.

Links and References

Discussion