Loyverse icon

Loyverse

Consume Loyverse API

Overview

This node integrates with the Loyverse API to retrieve information about items, categories, or stores. Specifically, for the Item - Get operation, it fetches details of a single item by its unique identifier. This is useful in scenarios where you want to obtain detailed data about a specific product from your Loyverse inventory, such as price, description, or stock levels.

Practical examples include:

  • Fetching an item's details to display in a custom dashboard.
  • Using item data to synchronize with another system or database.
  • Triggering workflows based on specific item attributes.

Properties

Name Meaning
Item ID The unique identifier of the item to retrieve.

Output

The node outputs a JSON object representing the requested item. The structure corresponds directly to the Loyverse API response for a single item, typically including fields like item name, SKU, price, description, and other metadata.

If multiple items were returned (not applicable for this operation), they would be output as an array of JSON objects. No binary data output is produced by this node.

Example output snippet (simplified):

{
  "id": "12345",
  "name": "Sample Item",
  "sku": "SKU123",
  "price": 9.99,
  "description": "A sample product"
}

Dependencies

  • Requires an active Loyverse API key credential configured in n8n.
  • Makes HTTP GET requests to the Loyverse API endpoint https://api.loyverse.com/api/v1.0/items/{itemId}.
  • The node depends on internet connectivity and valid API credentials to function properly.

Troubleshooting

  • Common issues:

    • Invalid or missing Item ID: The API will return an error if the provided item ID does not exist or is empty.
    • Authentication errors: If the API key is invalid or expired, the request will fail with an authorization error.
    • Network issues: Connectivity problems can cause request failures.
  • Error messages:

    • "error": "Unauthorized" — Check that the API key credential is correctly set and has necessary permissions.
    • "error": "Not Found" — Verify that the Item ID is correct and exists in your Loyverse account.
    • Timeout or network errors — Ensure stable internet connection and that the Loyverse API service is reachable.
  • To handle errors gracefully, the node supports continuing on failure, which returns an error message in the output JSON instead of stopping execution.

Links and References

Discussion