Trinks icon

Trinks

Nó N8N para interagir com a API do Trinks

Actions46

Overview

This node integrates with the Trinks API to retrieve sales data related to product financials. Specifically, the operation GET /v1/vendas fetches paginated sales records within a specified date range and allows filtering options such as including or excluding refunds (estornos).

Common scenarios for this node include:

  • Extracting sales data for reporting or analytics.
  • Automating financial reconciliation by pulling sales transactions.
  • Monitoring sales performance over specific periods.

For example, a user might configure the node to get all sales from January 1st to January 31st, including refunds, with pagination controls to handle large datasets.

Properties

Name Meaning
Page The page number of results to retrieve (pagination).
Page Size Number of sales records per page to return.
Data Inicio Start date filter for sales data (e.g., "2023-01-01").
Data Fim End date filter for sales data (e.g., "2023-01-31").
Incluir Estornos Boolean flag to include refunded/canceled sales in the results (true or false).

Output

The node outputs JSON data representing the response from the Trinks API's /v1/vendas endpoint. Each item corresponds to a sales record with details as provided by the API.

The output structure is:

{
  "json": {
    // Sales data fields returned by the API, e.g.:
    // "id": "sale_id",
    // "date": "2023-01-15",
    // "product": "Product Name",
    // "amount": 100.00,
    // "refunded": false,
    // ...
  },
  "pairedItem": {
    "item": <index_of_input_item>
  }
}

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential and an establishment ID credential to authenticate requests to the Trinks API.
  • The base URL for API requests is https://api.trinks.com.
  • The node expects these credentials to be configured in n8n prior to execution.

Troubleshooting

  • Error: Operation not found
    This error occurs if the specified operation string does not match any available operations. Verify that the operation name is exactly "GET /v1/vendas".

  • Authentication errors
    If the API key or establishment ID are missing or invalid, the API will reject requests. Ensure credentials are correctly set up in n8n.

  • Empty or incomplete data
    Check that the date filters (Data Inicio and Data Fim) are valid ISO date strings and that the page/page size parameters are set appropriately.

  • Pagination issues
    If too many results are expected, use the Page and Page Size properties to paginate through the dataset.

Links and References

Discussion