Printcart icon

Printcart

Consume Prinrcart API

Actions83

Overview

This node integrates with the Printcart API, providing a wide range of operations to manage resources such as accounts, stores, products, sides, images, cliparts, designs, projects, templates, storages, fonts, webhooks, and project folders. Specifically, for the Image resource, it supports operations including adding an image, listing images, retrieving image details, deleting an image, and counting images.

The Delete Image operation allows users to delete an image from their Printcart account by specifying the image's unique ID. This is useful in scenarios where you want to programmatically remove unused or outdated images from your Printcart storage to keep your asset library clean and organized.

Practical Example

  • Automatically delete images that are no longer associated with active products or designs.
  • Clean up temporary images created during batch processing workflows.
  • Manage image lifecycle within automated product design pipelines.

Properties

Name Meaning
Authentication Method of authentication; currently only "API Token" is supported.
Image ID The unique identifier of the image to be deleted. This is a required string input.

Output

The node outputs a JSON array containing the response from the Printcart API after attempting to delete the specified image. The structure typically includes confirmation of deletion or error information if the operation failed.

Example output JSON (simplified):

{
  "success": true,
  "message": "Image deleted successfully",
  "imageId": "the-deleted-image-id"
}

If the deletion fails, the output will contain error details explaining the failure.

The node does not output binary data for 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/images/{imageId} endpoint using DELETE method.
  • Proper configuration of the API token credential in n8n is necessary.

Troubleshooting

  • Common Issues:

    • Invalid or missing Image ID: Ensure the Image ID provided exists and is correct.
    • Authentication errors: Verify that the API token credential is valid and has sufficient permissions.
    • Network issues: Confirm connectivity to the Printcart API endpoint.
  • Error Messages:

    • 401 Unauthorized: Indicates invalid or expired API token. Re-authenticate or update the token.
    • 404 Not Found: The specified Image ID does not exist. Double-check the ID.
    • 400 Bad Request: Possibly malformed request parameters; verify inputs.
    • 500 Internal Server Error: Temporary server issue; retry later or contact Printcart support.

Handling errors gracefully can be done by enabling "Continue On Fail" in the node settings to prevent workflow interruption.

Links and References

Discussion