Printcart icon

Printcart

Consume Prinrcart API

Actions80

Overview

This node integrates with the Printcart API to manage and retrieve information about stores and related resources. Specifically, the "Get Store Info" operation under the "Store" resource fetches detailed information about a store's products with options to limit the number of results, sort them, and filter by product status.

Common scenarios where this node is beneficial include:

  • Retrieving a list of products from a Printcart store for inventory management or synchronization.
  • Filtering products by their publication status (e.g., published, draft, trashed).
  • Sorting product lists to display newest or oldest items first.
  • Limiting the number of products retrieved to optimize performance or meet UI constraints.

Practical example:

  • An e-commerce manager wants to pull the top 10 published products sorted by their ID in descending order to update their website catalog.

Properties

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

Output

The node outputs an array of JSON objects representing the store's products matching the query parameters. Each object corresponds to a product with its associated details as returned by the Printcart API.

The exact structure depends on the API response but typically includes product attributes such as id, name, status, and other metadata.

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 the Printcart API endpoints, so internet connectivity is required.
  • No additional external dependencies are needed beyond the configured API token.

Troubleshooting

  • Invalid Credentials: If the API token is incorrect or expired, the node will fail to authenticate. Ensure the API token is valid and has necessary permissions.
  • Parameter Errors: Providing invalid values for "Limit" (less than 10) or unsupported "Sort" or "Status" options may cause errors or unexpected results.
  • Network Issues: Connectivity problems can lead to request timeouts or failures. Verify network access to the Printcart API endpoint.
  • API Changes: If the Printcart API changes its endpoints or response formats, the node might not work correctly until updated.
  • Error Messages: Errors from the API are propagated; check the error message for clues (e.g., unauthorized, bad request).

To resolve issues:

  • Double-check all input parameters.
  • Confirm API token validity.
  • Review API documentation for any updates.
  • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch executions.

Links and References

Discussion