Printcart icon

Printcart

Consume Prinrcart API

Actions83

Overview

This node integrates with the Printcart API to retrieve a list of products. It is designed to fetch product data from a Printcart store, allowing users to specify filtering and sorting options. This node is useful in scenarios where you want to automate workflows involving product management, such as syncing product lists, generating reports, or triggering actions based on product status.

For example, you can use this node to:

  • Retrieve the latest 10 published products sorted by their ID in descending order.
  • Fetch draft products for review before publishing.
  • Get a sorted list of products to update inventory or pricing in another system.

Properties

Name Meaning
Authentication Method of authentication; currently supports "API Token"
Limit Maximum number of product results to return (minimum 10)
Sort Collection specifying sort type: "Asc" (ascending) or "Desc" (descending)
Sort By Field name to sort the products by (default is "id")
Get By Status Filter products by status: "Publish", "Draft", or "Trashed"

Output

The node outputs an array of JSON objects representing products retrieved from the Printcart API. Each object corresponds to a product and contains all relevant product details as returned by the API.

The output does not include binary data; it strictly returns JSON-formatted product information.

Dependencies

  • Requires an API token credential for authenticating requests to the Printcart API.
  • The node makes HTTP GET requests to the Printcart API endpoint https://{sid}:{secret}@api.printcart.com/v1/products with query parameters for limit, sorting, and status filtering.
  • Proper configuration of the API token credential within n8n is necessary for successful execution.

Troubleshooting

  • Common Issues:

    • Incorrect or missing API token credential will cause authentication failures.
    • Providing a limit value less than 10 may result in validation errors.
    • Using invalid values for sort type or status may lead to unexpected API responses or empty results.
  • Error Messages:

    • Authentication errors typically indicate invalid or expired API tokens. Verify and update the API token credential.
    • HTTP request failures might occur due to network issues or incorrect API endpoint usage. Check connectivity and ensure the API URL is correct.
    • If the node returns empty data, confirm that the filter criteria (status, sortBy) match existing products in the Printcart store.

Links and References

Discussion