Printcart icon

Printcart

Consume Prinrcart API

Actions83

Overview

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

Typical use cases include:

  • Automating product creation workflows in e-commerce platforms.
  • Bulk uploading or programmatically adding new customizable products.
  • Integrating product setup into larger automation pipelines for print-on-demand services.

For example, a user can create a new T-shirt product with specific design area dimensions, enable design customization, and restrict allowed file types for uploads, all via this node.

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., multiple customizable areas).
Viewport Width Numeric value representing the width of the viewport or design area on the product, with one decimal precision.
Viewport Height Numeric value representing the height of the viewport or design area on the product, with one decimal precision.
Scale Numeric scale factor for the product's design area, with one decimal precision.
Dpi Dots per inch setting for the product, affecting resolution.
Demension Unit Unit of measurement for dimensions; options are "Cm", "Pixel", or "Inch".
Status Publishing status of the product; options are "Publish" or "Draft".
Allow File Types List of allowed file types for uploads/designs on the product; options include "Jpg", "Png", "Ai", and "Pdf".
Enable Design Boolean flag to enable or disable design customization features on the product.
Enable Upload Boolean flag to allow or disallow file uploads for the product.
Enable Pod Boolean flag to enable print-on-demand functionality for the product.
Type ID Type identifier for the product; currently only "Simple" is supported.
Description Text description providing details about the product.

Output

The node outputs JSON data representing the response from the Printcart API after creating the product. This typically includes:

  • The newly created product's unique identifier.
  • All submitted properties along with any additional metadata assigned by the API.
  • Status information confirming successful creation or error details if applicable.

No binary data output is produced by this operation.

Dependencies

  • Requires an API token credential for authenticating requests to the Printcart API.
  • The node uses HTTP requests to https://api.printcart.com/v1/products endpoint.
  • Proper configuration of the API token credential in n8n is necessary.
  • Network access to the Printcart API must be available.

Troubleshooting

  • Authentication errors: If the API token is invalid or missing, the node will fail to authenticate. Ensure the API token credential is correctly configured and active.
  • Validation errors: Missing required fields like "Product Name" or invalid values for numeric fields may cause the API to reject the request. Double-check input parameters.
  • Dimension unit issues: The dimension unit is expected as a lowercase string ("cm", "pixel", or "inch"). Providing incorrect casing or unsupported units may cause errors.
  • Status field handling: The code attempts to convert the status collection to string using .toString without parentheses, which might cause unexpected behavior. If the API rejects the status, verify the input format.
  • Network or API downtime: Temporary network issues or Printcart API outages will result in request failures. Retry later or check API status.

Links and References

Discussion