Cập Nhật
AI-generatedOverview
This node manages invoices in the KiotViet system, specifically supporting the 'Cập Nhật' (Update) operation for invoices. It allows users to update existing invoices by specifying the invoice ID and modifying details such as products in the invoice, total payment, customer ID, purchase date, discounts, payment method, and other related fields. This is useful for scenarios where invoice information needs to be corrected or adjusted after creation, such as updating product quantities, prices, or applying discounts.
Use Case Examples
- Updating an invoice to change the quantity and price of products purchased.
- Modifying the total payment and discount applied to an existing invoice.
- Changing the payment method or adding notes to products in the invoice.
Properties
| Name | Meaning |
|---|---|
| ID Hóa Đơn | The unique identifier of the invoice to update. |
| Sản Phẩm Trong Hóa Đơn | List of products in the invoice, including product ID, code, name, quantity, price, discount, discount ratio, notes, and serial numbers. |
| Trường Bổ Sung | Additional fields for the invoice such as total payment, customer ID, purchase date, overall discount, payment method, account ID, COD usage, salesperson ID, order ID, sales channel ID, and voucher application status. |
Output
JSON
id- The unique identifier of the updated invoice.branchId- The branch ID where the invoice was created.totalPayment- The total payment amount for the invoice.invoiceDetails- Array of product details in the invoice, including product ID, code, name, quantity, price, discounts, notes, and serial numbers.customerId- The customer ID associated with the invoice.purchaseDate- The purchase date of the invoice.discount- The total discount applied to the invoice.method- The payment method used for the invoice.accountId- The bank account ID used for payment if applicable.usingCod- Boolean indicating if COD payment is used.soldById- The ID of the salesperson who made the sale.orderId- The related order ID.saleChannelId- The sales channel ID.isApplyVoucher- Boolean indicating if a voucher was applied.
Dependencies
- KiotViet API with authentication credentials
Troubleshooting
- Ensure the invoice ID provided exists and is valid; otherwise, the update will fail.
- Verify that required fields such as total payment are provided when updating.
- Check that the API credentials are correctly configured and have permissions to update invoices.
- If the update operation is not supported by the API version, an error will be thrown.
Links
- KiotViet API Documentation - Official API documentation for KiotViet, useful for understanding invoice operations and required parameters.