Printcart icon

Printcart

Consume Prinrcart API

Actions80

Overview

This node integrates with the Printcart API to manage templates within a print-on-demand or custom product design workflow. Specifically, the Update Template operation allows users to modify an existing template's details such as project association, side, images, notes, layers, and viewport dimensions.

Typical use cases include:

  • Updating a product template's visual or metadata attributes after initial creation.
  • Adjusting template layout parameters like viewport size or image references.
  • Managing design assets programmatically in automated workflows for e-commerce or printing services.

For example, you might update a template to change its preview image or adjust the viewport dimensions to better fit a new product side.

Properties

Name Meaning
Authentication Method of authentication; currently supports only "API Token".
Project ID Identifier of the project to which the template belongs.
Side ID Identifier of the product side associated with the template.
Preview Image ID Identifier of the image used as the preview for the template.
Template Image ID Identifier of the main image representing the template.
Note A textual note or description related to the template.
Layer The layer information or configuration for the template.
Viewport Width Numeric width of the viewport area for the template (supports one decimal precision).
Viewport Height Numeric height of the viewport area for the template (supports one decimal precision).
Template ID Unique identifier of the template to update.

Output

The node outputs JSON data representing the response from the Printcart API after updating the template. This typically includes the updated template object with all its properties reflecting the changes made.

The output JSON structure corresponds directly to the API's response schema for a template resource, including fields such as IDs, image references, notes, layers, and viewport dimensions.

No binary data output is involved in this operation.

Dependencies

  • Requires an active API token credential for authenticating requests to the Printcart API.
  • The node makes HTTP PUT requests to the endpoint:
    https://{sid}:{secret}@api.printcart.com/v1/templates/{templateId}
    where {sid} and {secret} are credentials retrieved internally.
  • Proper network access to api.printcart.com is necessary.
  • No additional environment variables or configurations beyond the API token credential are required.

Troubleshooting

  • Authentication Errors:
    If the API token is invalid or missing, the request will fail with authentication errors. Ensure the API token credential is correctly configured and has sufficient permissions.

  • Invalid Template ID:
    Providing a non-existent or malformed template ID will result in a "not found" or similar error. Verify the template ID before updating.

  • Missing Required Fields:
    All required properties (Project ID, Side ID, Preview Image ID, Template Image ID, Note, Layer, Viewport Width, Viewport Height, Template ID) must be provided. Omitting any will cause validation errors.

  • Network Issues:
    Connectivity problems to the Printcart API endpoint can cause timeouts or request failures. Check network settings and firewall rules.

  • API Rate Limits or Server Errors:
    The API may return rate limit or server error responses. Implement retry logic or check API status if such errors occur.

Links and References

Discussion