Printcart icon

Printcart

Consume Prinrcart API

Actions80

Overview

This node integrates with the Printcart API to manage products and related resources in a print-on-demand or custom product design platform. Specifically, the Create Product operation allows users to create new products by specifying various attributes such as name, dimensions, file types allowed, and status.

Common scenarios where this node is beneficial include:

  • Automating product creation workflows in e-commerce platforms.
  • Integrating product setup into larger automation pipelines for print-on-demand services.
  • Managing product catalogs programmatically without manual intervention.

For example, a user can automate adding new customizable products with specific design constraints and upload permissions directly from their internal systems into Printcart.

Properties

Name Meaning
Authentication Method of authentication; currently supports "API Token".
Product Name The name/title of the new product to be created.
Dynamic Side Boolean flag indicating if the product has dynamic sides (e.g., customizable areas).
Viewport Width Numeric width of the product's viewport area (precision 1 decimal place).
Viewport Height Numeric height of the product's viewport area (precision 1 decimal place).
Scale Numeric scale factor for the product (precision 1 decimal place).
Dpi Dots per inch setting for the product, affecting resolution.
Demension Unit Unit of measurement for dimensions; options are "Cm", "Pixel", or "Inch".
Status Product status; options are "Publish" or "Draft".
Allow File Types Allowed file types for uploads/designs; multiple selections possible among "Jpg", "Png", "Ai", "Pdf".
Enable Design Boolean flag to enable design features on the product.
Enable Upload Boolean flag to allow file uploads for the product.
Enable Pod Boolean flag to enable print-on-demand features.
Type ID Product type identifier; currently only "Simple" is supported.
Description Text description of the new product.

Output

The node outputs JSON data representing the response from the Printcart API after creating the product. This typically includes details about the newly created product such as its ID, name, status, dimensions, and other metadata returned 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 requests to https://api.printcart.com/v1/products endpoint using the provided credentials.
  • Proper network access to the Printcart API is necessary.
  • No additional environment variables or n8n configurations beyond the API token credential are required.

Troubleshooting

  • Authentication errors: Ensure the API token credential is valid and has sufficient permissions.
  • Invalid parameter values: Check that numeric fields like viewport dimensions, scale, and dpi are within acceptable ranges and that required fields like product name and description are not empty.
  • API request failures: Network issues or incorrect API endpoint URLs may cause failures. Verify connectivity and correct base URL usage.
  • Status field handling: The code attempts to convert the status collection to string via .toString but does not call it as a function (status:m.toString). This might cause unexpected behavior; ensure the status value is correctly formatted as a string before sending.
  • Dimension unit usage: The dimension unit is taken from the viewport height parameter converted to lowercase, which seems incorrect. It should use the dedicated dimension unit property instead. This mismatch could lead to API errors or incorrect product setup.

Links and References

Discussion