Trinks icon

Trinks

Nó N8N para interagir com a API do Trinks

Actions46

Overview

This node integrates with the Trinks API to create a new credit entry for a specific client. It is designed to send a POST request to the endpoint /v1/clientes/{clienteId}/creditos, allowing users to add credit amounts associated with a client in the Trinks system.

Common scenarios where this node is beneficial include:

  • Adding prepaid credit balances to client accounts.
  • Recording payments or credit top-ups made by clients.
  • Automating credit management workflows within customer relationship or billing systems.

For example, a salon using Trinks could automate adding credits to a client's account after receiving payment, enabling seamless tracking of prepaid services.

Properties

Name Meaning
Cliente Id The unique identifier of the client for whom the credit is being added (number).
Valor The amount of credit to add to the client's account (number).
Forma Pagamento Id The identifier of the payment method used for the credit transaction (number).

Output

The node outputs the JSON response returned by the Trinks API after creating the credit entry. This typically includes details about the newly created credit record such as its ID, value, associated client, and payment method.

If the API returns binary data (not indicated here), it would be included accordingly, but this operation primarily deals with JSON responses.

Dependencies

  • Requires an API key credential and an establishment ID credential configured in n8n to authenticate requests to the Trinks API.
  • The node sends HTTP requests to https://api.trinks.com.
  • The credentials must provide:
    • An API key for authorization via the X-Api-Key header.
    • An establishment ID sent via the estabelecimentoId header.

Troubleshooting

  • Operation Not Found Error: If the specified operation string does not match available operations, the node will throw an error listing valid operations. Ensure the operation name is exactly "POST /v1/clientes/{clienteId}/creditos".
  • Authentication Errors: Missing or invalid API key or establishment ID will cause authentication failures. Verify that credentials are correctly set up in n8n.
  • Invalid Input Data: Providing non-numeric or missing required fields like Cliente Id may result in API errors. Validate inputs before execution.
  • API Request Failures: Network issues or incorrect endpoint URLs can cause request failures. Check connectivity and endpoint correctness.

Links and References

  • Trinks API Documentation (Assumed official docs for further details on endpoints and parameters)
  • n8n HTTP Request Node documentation for understanding request construction and error handling.

Discussion