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 scenarios where purchase orders need adjustments after creation, such as correcting quantities, updating pricing, or adding additional metadata.

Practical examples include:

  • Correcting the number of units ordered if there was an input error.
  • Updating the unit price due to negotiated discounts.
  • Adding or modifying expense categories or custom fields for better accounting classification.
  • Adjusting amortization details related to the purchase order item.

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 classification of the purchase order item.
Expense Custom Fields JSON array representing custom fields associated with the purchase order item.
Amortization JSON object containing amortization information related to 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 confirming the update status or reflecting the current state of the item.

If the node supports binary data output (not indicated here), it would represent attachments or documents related to the purchase order item, but this operation focuses on JSON data only.

Dependencies

  • Requires an API key credential or similar authentication token configured in n8n to authorize requests to the external purchase order management system.
  • The base URL for the API must be set in the node credentials or environment variables.
  • The node depends on the external service's REST API that manages purchase orders and their items.

Troubleshooting

  • Missing Required Fields: Errors may occur if Account Id, Purchase Order Id, or Purchase Order Item Id are not provided or invalid. Ensure these identifiers are correct and exist in the external system.
  • Invalid JSON Format: For properties like Expense Category, Expense Custom Fields, and Amortization, ensure the JSON input is well-formed. Malformed JSON will cause parsing errors.
  • Authentication Errors: If the API key or authentication token is missing or expired, the node will fail to connect. Verify credentials and permissions.
  • API Limitations: Some APIs may restrict updates based on the purchase order status (e.g., closed or finalized orders). Check the external system’s rules.
  • Network Issues: Connectivity problems can cause timeouts or failures. Confirm network access to the API endpoint.

Links and References

  • Refer to the external purchase order system’s API documentation for detailed schema and constraints on purchase order item updates.
  • JSON formatting guides for constructing valid JSON inputs for complex fields like expense categories and amortization.

Discussion