Printcart icon

Printcart

Consume Prinrcart API

Actions80

Overview

This node interacts with the Printcart API to manage "Side" resources, specifically supporting the operation to retrieve a list of sides. It allows users to fetch multiple side entries with control over pagination, sorting, and filtering by status.

Common scenarios where this node is beneficial include:

  • Retrieving a paginated list of product sides for display or further processing.
  • Filtering sides based on their publication status (e.g., published, draft, trashed).
  • Sorting the list of sides by specific fields in ascending or descending order.

Practical example:

  • A user wants to get the first 10 published sides sorted by their ID in descending order to synchronize them with another system or display them in a dashboard.

Properties

Name Meaning
Authentication Method of authentication; currently supports only "API Token".
Limit Maximum number of side results to return (minimum 10).
Sort Collection specifying how to sort the results:
- Type: "Desc" (descending) or "Asc" (ascending).
Sort By The field by which to sort the sides, e.g., "id".
Get By Status Filter sides by their status:
- Type: "Publish", "Draft", or "Trashed".

Output

The node outputs an array of JSON objects representing the sides retrieved from the Printcart API. Each object corresponds to a side resource with its associated properties as returned by the API.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API token credential for authenticating requests to the Printcart API.
  • The node makes HTTP GET requests to the endpoint https://<sid>:<secret>@api.printcart.com/v1/sides with query parameters for limit, sort, sortBy, and status.
  • The API credentials (sid and secret) must be configured in n8n under the appropriate credential type (referred generically here as an API key credential).

Troubleshooting

  • Common issues:

    • Incorrect or missing API token credential will cause authentication failures.
    • Providing a limit less than 10 may not be accepted due to minimum value constraints.
    • Using invalid values for status or sort type may result in unexpected API responses or errors.
  • Error messages:

    • Authentication errors typically indicate invalid or expired API tokens; reconfigure the credential.
    • HTTP 4xx or 5xx errors from the API suggest issues with request parameters or server-side problems; verify parameter correctness and API availability.
    • If no sides are returned, check that the status filter matches existing data or try removing it.

Links and References

Discussion