Trinks icon

Trinks

Nó N8N para interagir com a API do Trinks

Actions46

Overview

This node integrates with the Trinks API, specifically allowing users to retrieve information about "Estabelecimentos" (establishments). The GET /v1/estabelecimentos operation fetches a paginated list of establishments from the Trinks platform.

Common scenarios for this node include:

  • Synchronizing establishment data from Trinks into other systems.
  • Automating workflows that require up-to-date establishment listings.
  • Reporting or analytics based on establishments managed in Trinks.

For example, a user might use this node to pull all establishments page by page and then process or store them elsewhere.

Properties

Name Meaning
Page The page number of results to retrieve. Pagination starts at 0.
Page Size The number of establishments to return per page.

These properties are sent as query parameters in the API request to control pagination.

Output

The node outputs an array of JSON objects representing the establishments retrieved from the API. Each item corresponds to one establishment's data as returned by the Trinks API.

The output structure is:

{
  "json": {
    // Establishment data fields as provided by the Trinks API response
  },
  "pairedItem": {
    "item": <index_of_input_item>
  }
}

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Trinks API.
  • Requires an establishment ID credential value to be included in the request headers.
  • The base URL used is https://api.trinks.com.
  • The node sets HTTP headers including Accept: application/json, Content-Type: application/json, X-Api-Key (from credentials), and estabelecimentoId (from credentials).

Troubleshooting

  • Operation Not Found Error: If the specified operation is not recognized, the node will throw an error listing available operations. Ensure the operation name matches exactly "GET /v1/estabelecimentos".

  • Authentication Errors: Missing or invalid API key or establishment ID credentials will cause authentication failures. Verify that the correct credentials are configured in n8n.

  • Pagination Issues: Providing invalid values for Page or Page Size (e.g., negative numbers) may result in unexpected API responses or errors. Use non-negative integers.

  • API Rate Limits or Network Errors: Standard HTTP errors from the Trinks API or network issues will be surfaced. Consider enabling "Continue On Fail" to handle such cases gracefully.

Links and References

Discussion