Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Purchase Orders → Create A Purchase Order Item

AI-generated

Overview

This node operation allows users to create a new item within an existing purchase order. It is useful in scenarios where you need to add detailed line items to a purchase order, such as specifying quantities, unit prices, and expense categories for accounting or procurement workflows. For example, a finance team can automate adding purchased goods or services to a purchase order directly from their workflow automation, ensuring accurate record-keeping and streamlined purchasing processes.

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 related to this purchase order item.
Expense Custom Fields JSON array defining custom fields for additional metadata on the purchase order item.
Amortization JSON object containing amortization details for the purchase order item.
Description User-friendly description of the purchase order item (required).
Purchased Quantity Number representing how many units are 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 properties sent in the request along with any additional metadata or identifiers assigned by the backend system upon creation. The output does not include binary data.

Dependencies

  • Requires an API key credential or similar authentication token configured in n8n to authorize requests.
  • Depends on the external Purchase Orders API endpoint to create purchase order items.
  • The base URL for the API must be set in the node credentials or environment configuration.

Troubleshooting

  • Missing Required Fields: Errors may occur if required fields like Account Id, Purchase Order Id, Description, Purchased Quantity, or Unit Price are missing or empty. Ensure these are provided.
  • Invalid JSON Format: The properties Expense Category, Expense Custom Fields, and Amortization expect valid JSON strings. Malformed JSON will cause parsing errors.
  • Authentication Errors: If the API key or authentication token is invalid or missing, the node will fail to connect to the service.
  • API Endpoint Issues: Network issues or incorrect base URL configuration can prevent successful API calls.
  • To resolve errors, verify all required inputs, ensure JSON fields are correctly formatted, and confirm that authentication credentials and API URLs are properly configured.

Links and References

  • Refer to your Purchase Orders API documentation for detailed schema and examples of purchase order item creation.
  • JSON formatting tools can help validate complex JSON input fields before use in the node.

Discussion