Trinks icon

Trinks

Nó N8N para interagir com a API do Trinks

Actions46

Overview

This node integrates with the Trinks API to retrieve consumption data from the "Clube De Assinaturas" (Subscription Club) resource, specifically using the GET /v1/clube/consumo operation. It allows users to query detailed information about subscription consumptions filtered by various parameters such as date range, client ID, plan ID, consumed item name, and professional ID. This is useful for businesses managing subscription services who want to analyze usage patterns, track client activity, or generate reports on consumed items.

Practical examples include:

  • Fetching all consumption records within a specific date range.
  • Retrieving consumption details for a particular client or subscription plan.
  • Sorting consumption data by most recent service or by client name.

Properties

Name Meaning
Page The page number of results to retrieve (pagination).
Page Size Number of records per page to return.
Data Inicial Start date filter for consumption records (e.g., "2023-01-01").
Data Final End date filter for consumption records (e.g., "2023-01-31").
Cliente Id Filter by specific client identifier.
Plano Id Filter by specific subscription plan identifier.
Item Consumido Nome Filter by the name of the consumed item.
Profissional Id Filter by the professional's identifier associated with the consumption.
Ordenar Por Sort order of the results. Options:
- Atendimento Mais Recente (Most Recent Service)
- Cliente Nome (Client Name)
- Assinatura Nome (Subscription Name)
- Item Consumido Nome (Consumed Item Name)
- Profissional Nome (Professional Name)

Output

The node outputs JSON data representing the response from the Trinks API for the requested consumption records. Each output item corresponds to one input item processed and contains the full JSON response under the json property.

The structure of the JSON depends on the API response but typically includes details such as:

  • Consumption record identifiers
  • Client and subscription details
  • Consumed item names
  • Dates and times of consumption
  • Associated professionals
  • Pagination metadata if applicable

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential and an establishment identifier configured in the node credentials to authenticate requests to the Trinks API.
  • The node sends HTTP requests to https://api.trinks.com.
  • Proper network access to the Trinks API endpoint is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing API key or establishment ID will cause authentication failures.
    • Incorrect date formats for Data Inicial or Data Final may result in errors or empty responses.
    • Requesting pages beyond available data may return empty results.
    • Using unsupported or misspelled operation names will throw an error listing available operations.
  • Error messages:

    • "Operation ... not found. Available: ..." indicates the specified operation does not exist; verify the operation name.
    • Network or authentication errors will be returned from the API and surfaced in the node output if "Continue On Fail" is enabled.
  • Resolution tips:

    • Ensure credentials are correctly set up.
    • Validate date strings conform to expected format (usually ISO 8601).
    • Use pagination properties (Page, Page Size) appropriately.
    • Check spelling and casing of operation and resource names.

Links and References

Discussion