Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Overview

This node operation allows users to create a new purchase order item within an existing purchase order. It is useful in scenarios where you need to programmatically add detailed line items to purchase orders, such as when automating procurement workflows or integrating with accounting systems.

For example, if your company uses purchase orders to track expenses and you want to automatically add items like office supplies or consulting hours to a specific purchase order, this node operation facilitates that by sending the necessary data to the backend system.

Properties

Name Meaning
Account Id Identifier of the account associated with the purchase order item.
Purchase Order Id Identifier of the purchase order to which the item will be added.
Units Unit of measurement for the purchase order item. Options: Pieces, Hours
Expense Category JSON object describing the expense category of the purchase order item.
Expense Custom Fields JSON array defining custom fields related to the expense for the purchase order item.
Amortization JSON object containing amortization information for the purchase order item.
Description User-friendly description of the purchase order item (required).
Purchased Quantity Quantity of the purchase order item being purchased (required).
Unit Price Price per unit of the purchase order item (required).

Output

The node outputs a JSON object representing the newly created purchase order item. This typically includes all the details sent in the request along with any additional metadata or identifiers assigned by the backend system upon creation.

If the node supports binary data output, it would represent attachments or files related to the purchase order item, but based on the provided code and properties, 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 backend service managing purchase orders.
  • The node relies on a REST API endpoint to create purchase order items; thus, network connectivity and correct API base URL configuration are necessary.
  • The bundled source code references an OpenAPI-based client library for interacting with the API, so this dependency must be available in the n8n environment.

Troubleshooting

  • Missing Required Fields: Errors may occur if required properties like Account Id, Purchase Order Id, Description, Purchased Quantity, or Unit Price are not provided. Ensure these fields are filled before execution.
  • Invalid JSON Format: Properties such as Expense Category, Expense Custom Fields, and Amortization expect valid JSON strings. Malformed JSON will cause parsing errors.
  • Authentication Failures: If the API key or authentication token is missing or invalid, the node will fail to connect to the backend service. Verify credentials and permissions.
  • Network Issues: Connectivity problems or incorrect API base URLs can lead to request failures. Confirm network access and endpoint correctness.
  • Unsupported Units: Only "Pieces" and "Hours" are supported units. Using other values may result in validation errors.

Links and References

  • OpenAPI Specification - Understanding the API schema used by the node.
  • n8n Documentation - General guidance on creating and using custom nodes.
  • Relevant backend API documentation (not provided here) should be consulted for detailed field definitions and error codes.

Discussion