Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Overview

This node allows users to create a new purchase order in an external system via an API. It is useful for automating procurement workflows, integrating purchase order creation into larger automation processes, or syncing purchase orders from other systems.

Typical use cases include:

  • Automatically generating purchase orders when certain conditions are met (e.g., inventory low).
  • Creating purchase orders programmatically based on incoming data.
  • Integrating with accounting or ERP systems to streamline purchase order management.

Properties

Name Meaning
Account Id Identifier of the account under which the purchase order will be created.
Note A note or comment from the creator of the purchase order.
Created By JSON object representing the creator details of the purchase order (e.g., user info).
Supplier JSON object describing the supplier associated with the purchase order.
Purchase Order Number Optional string specifying the purchase order number. If omitted, it is autogenerated.
Items JSON array listing the items included in the purchase order. Each item can contain expense category, custom fields, and amortization details.

Output

The node outputs JSON data representing the newly created purchase order as returned by the API. This typically includes all relevant purchase order details such as ID, status, line items, supplier info, and metadata.

If the API supports binary data related to purchase orders (e.g., attached documents), the node would handle that accordingly, but no explicit binary output handling is indicated here.

Dependencies

  • Requires an API key credential or similar authentication token configured in n8n to authorize requests to the external purchase order service.
  • The base URL for the API must be set in the credentials configuration.
  • Depends on the external purchase order API being available and accessible.

Troubleshooting

  • Missing required properties: Ensure all mandatory fields like Account Id, Note, and Created By are provided; otherwise, the API may reject the request.
  • Invalid JSON in complex fields: Fields like Created By, Supplier, and Items expect valid JSON strings. Malformed JSON will cause parsing errors.
  • Authentication errors: Verify that the API key or authentication token is correctly configured and has sufficient permissions.
  • API connectivity issues: Check network access and base URL correctness if requests fail to reach the API.
  • Autogenerated purchase order number: If you rely on auto-generation, ensure the account settings in the external system support this feature.

Links and References

  • Refer to the external purchase order API documentation for detailed schema and field descriptions.
  • Consult n8n documentation on how to configure API credentials and JSON input fields.

Discussion