Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Overview

This node operation retrieves a list of items associated with a specific purchase order within an account. It is useful for scenarios where you need to fetch detailed line items or components that make up a particular purchase order, such as for auditing, reporting, or integration with other systems like inventory or accounting software.

Practical examples include:

  • Extracting all products or services ordered in a purchase order to update stock levels.
  • Generating detailed invoices or shipment documents based on the purchase order contents.
  • Synchronizing purchase order item data with external ERP or financial systems.

Properties

Name Meaning
Account Id Identifier of the account to which the purchase order belongs. This is required to scope the request correctly.
Purchase Order Id Identifier of the specific purchase order whose items you want to retrieve. This is required to specify the target purchase order.

Output

The output JSON contains an array of purchase order items related to the specified purchase order. Each item typically includes details such as product identifiers, quantities, descriptions, prices, and any other metadata defined by the API.

If the node supports binary data output (not indicated here), it would represent attachments or files related to the purchase order items, but this is not evident from the provided code.

Dependencies

  • Requires an API key credential for authentication to the external service managing purchase orders.
  • The node uses a base URL configured in the credentials to connect to the API endpoint.
  • The underlying implementation depends on an OpenAPI specification (payhawk.api.json) and a helper library for building operations from that spec.
  • No additional environment variables are explicitly required beyond the API credentials.

Troubleshooting

  • Missing or invalid Account Id or Purchase Order Id: Ensure both IDs are provided and valid; otherwise, the API will likely return errors or empty results.
  • Authentication errors: Verify that the API key or token is correctly configured and has sufficient permissions.
  • Network or connectivity issues: Check the base URL and network access to the API endpoint.
  • Unexpected response structure: If the API changes, the node might fail to parse the response correctly; updating the OpenAPI spec or node version may be necessary.

Links and References

  • Refer to the external API documentation for purchase orders and their items for detailed schema and usage.
  • n8n documentation on creating custom nodes and using OpenAPI specifications can provide further insights into extending or debugging this node.

Discussion