Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Purchase Orders → Get A List Of Purchase Orders

AI-generated

Overview

This node operation retrieves a list of purchase orders from an external service. It is useful for scenarios where you need to fetch multiple purchase orders with optional filtering, pagination (skip and take), and account-specific querying. For example, you might use this node to display recent purchase orders in a dashboard, synchronize purchase order data with another system, or generate reports based on filtered purchase orders.

Properties

Name Meaning
Filter A JSON-stringified and URL-encoded filter expression object that conforms to the IPurchaseOrderFilter schema. It allows complex filtering based on fields like status, purchase order number, modification date, and logical AND conditions.
Skip Number of objects to skip from the beginning of the result set. Useful for pagination to ignore a certain number of initial results. Defaults to 0.
Take Maximum number of purchase order objects to return. Defaults to 0, which typically means the default server-side limit applies (default 20, max 1000). Controls page size for pagination.
Account Id Identifier of the account for which to retrieve purchase orders. This is a required string property to specify the account context.

Output

The output contains a JSON array of purchase order objects matching the specified filters and pagination parameters. Each item in the array represents a purchase order with its associated data fields as returned by the external API.

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

Dependencies

  • Requires an API key credential or similar authentication token configured in n8n to access the external purchase order service.
  • The base URL for the API must be set in the credentials configuration.
  • The node depends on the external service's API supporting query parameters for filtering ($filter), skipping ($skip), and taking ($take) purchase orders.

Troubleshooting

  • Invalid Filter Format: If the $filter JSON string is malformed or does not conform to the expected schema, the API may return errors or no results. Ensure the filter is correctly JSON-stringified and URL-encoded.
  • Missing Account Id: Since accountId is required, omitting it will likely cause the request to fail. Always provide a valid account identifier.
  • Pagination Limits: Setting Take above the maximum allowed (e.g., >1000) may cause errors or truncation. Keep within documented limits.
  • Authentication Errors: If the API key or authentication token is missing or invalid, the node will fail to retrieve data. Verify credentials are properly configured.
  • Empty Results: If filters are too restrictive or incorrect, the node may return an empty list. Review filter criteria for correctness.

Links and References

  • Refer to the external purchase order API documentation for details on the IPurchaseOrderFilter schema and supported query parameters.
  • n8n documentation on HTTP Request Node for understanding query parameter usage.
  • General best practices for pagination and filtering in REST APIs.

Discussion