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 pipelines, 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 data from other applications.
  • Streamlining the purchasing process by eliminating manual entry.

For example, a company could use this node to create purchase orders directly from their ERP system whenever a new supplier contract is signed.

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, including expense categories and custom fields.

Output

The node outputs JSON data representing the newly created purchase order as returned by the API. This typically includes all details of the purchase order such as its ID, status, line items, supplier information, 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 for authenticating requests to the external purchase order service.
  • The base URL for the API must be configured in the node credentials.
  • The node depends on the external purchase order API being available and accessible.

Troubleshooting

  • Invalid or missing required properties: Ensure all required fields like Account Id, Note, and Created By are provided and correctly formatted.
  • JSON parsing errors: The Created By, Supplier, and Items fields expect valid JSON strings. Invalid JSON will cause errors.
  • Authentication failures: Verify that the API key credential is correctly set up and has sufficient permissions.
  • API connectivity issues: Check network access and API endpoint availability.
  • Autogenerated purchase order number conflicts: If you provide a purchase order number manually, ensure it does not conflict with existing numbers.

Links and References

  • Refer to the external purchase order API documentation for detailed schema and field descriptions.
  • n8n documentation on creating custom nodes and using JSON input properties.

Discussion