Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Overview

This node operation updates a specific item within a purchase order in an external system. It allows users to modify details such as the description, quantity, unit price, units, expense category, custom fields, and amortization information of a purchase order item. This is useful for keeping purchase orders accurate and up-to-date after initial creation, for example when correcting quantities or prices, adding more detailed descriptions, or adjusting accounting categories.

Practical examples include:

  • Updating the quantity or unit price of an item after receiving updated supplier information.
  • Adding or modifying expense categories or custom fields for better financial tracking.
  • Adjusting amortization details related to the purchase order item for accounting purposes.

Properties

Name Meaning
Account Id Identifier of the account associated with the purchase order.
Purchase Order Id Identifier of the purchase order containing the item to update.
Purchase Order Item Id Identifier of the specific purchase order item to update.
Description User-friendly description of the purchase order item.
Units Unit of measurement for the purchase order item. Options: Pieces, Hours.
Purchased Quantity Quantity of the purchase order item.
Unit Price Price per unit of the purchase order item.
Expense Category JSON object representing the expense category assigned to the purchase order item.
Expense Custom Fields JSON array representing custom fields related to the purchase order item.
Amortization JSON object containing amortization information for the purchase order item.

Output

The node outputs JSON data representing the updated purchase order item. This typically includes all the fields sent in the update request along with any additional metadata returned by the external API. The output reflects the current state of the purchase order item after the update operation.

There is no indication that this node outputs binary data.

Dependencies

  • Requires connection to an external API managing purchase orders (likely via REST).
  • Needs an API key or authentication token configured in n8n credentials to authorize requests.
  • The base URL for the API must be set in the node's credential configuration.
  • Uses standard HTTP headers for JSON content type and accepts JSON responses.

Troubleshooting

  • Missing Required Identifiers: Errors may occur if Account Id, Purchase Order Id, or Purchase Order Item Id are not provided or invalid. Ensure these IDs are correct and exist in the external system.
  • Invalid JSON Fields: The properties Expense Category, Expense Custom Fields, and Amortization expect valid JSON input. Malformed JSON will cause errors. Validate JSON syntax before submitting.
  • Authentication Failures: If the API key or authentication token is missing or incorrect, the node will fail to connect. Verify credentials and permissions.
  • API Endpoint Issues: Network issues or incorrect base URL settings can cause failures. Confirm the API endpoint is reachable and correctly configured.
  • Data Validation Errors: The external API might reject updates if values are out of allowed ranges or formats (e.g., negative quantities). Check API documentation for constraints.

Links and References

  • Refer to the external purchase order API documentation for detailed field definitions and validation rules.
  • JSON validation tools can help ensure correct formatting of complex fields like expense categories and amortization.
  • n8n documentation on setting up API credentials and HTTP request nodes for further customization.

Discussion