Printcart icon

Printcart

Consume Prinrcart API

Actions80

Overview

This node integrates with the Printcart API to manage various resources related to print-on-demand products and services. Specifically, for the Webhook resource and the Get List of Webhook operation, it retrieves a list of webhooks configured in the Printcart system.

Use cases include:

  • Monitoring webhook configurations to automate workflows based on events triggered by Printcart.
  • Auditing or managing existing webhooks programmatically.
  • Integrating webhook data into broader automation pipelines within n8n.

For example, you might use this node to fetch all webhooks and then filter or process them further downstream in your workflow.

Properties

Name Meaning
Authentication Method of authentication; currently supports only "API Token".
Limit Maximum number of webhook results to return (minimum 10).
Sort Collection specifying sorting order:
- Type: "Desc" (descending) or "Asc" (ascending)
Sort By Field by which to sort the webhook list; defaults to "id".

Output

The node outputs an array of JSON objects representing webhooks retrieved from the Printcart API. Each object corresponds to a webhook and includes details such as event type, callback URL, topic, and other webhook metadata as provided by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API token credential for authenticating requests to the Printcart API.
  • The node makes HTTP GET requests to the endpoint:
    https://{sid}:{secret}@api.printcart.com/v1/webhooks?limit={limit}&sort={sortType}&sortBy={sortBy}
    where {sid} and {secret} are obtained from the API token credential.
  • Proper configuration of the API token credential in n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing API token credential will cause authentication failures.
    • Providing a limit less than 10 may result in errors or unexpected behavior since the minimum enforced is 10.
    • Incorrect or unsupported sort parameters may be ignored or cause the API to return errors.
  • Error messages:

    • Authentication errors typically indicate invalid credentials; verify the API token is correct and has required permissions.
    • HTTP request failures may indicate network issues or incorrect API endpoint usage.
    • If the node throws errors about missing parameters, ensure all required properties (like Limit) are set correctly.
  • Resolution tips:

    • Double-check API token validity and permissions.
    • Ensure the node parameters conform to expected types and constraints.
    • Review API documentation for any changes in endpoint requirements.

Links and References

Discussion