Actions46
- Agendamentos Actions
- GET /v1/agendamentos
- POST /v1/agendamentos
- GET /v1/agendamentos/{id}
- PUT /v1/agendamentos/{agendamentoId}
- PATCH /v1/agendamentos/{agendamentoId}/status/confirmado
- PATCH /v1/agendamentos/{agendamentoId}/status/cancelado
- PATCH /v1/agendamentos/{agendamentoId}/status/finalizado
- PATCH /v1/agendamentos/{agendamentoId}/status/clientefaltou
- PATCH /v1/agendamentos/{agendamentoId}/status/ematendimento
- GET /v1/agendamentos/profissionais/{data}
- Clientes Actions
- Clientes Creditos Actions
- Clientes Etiquetas Actions
- Clientes Telefones Actions
- Clientes Vales Presentes Actions
- Clube De Assinaturas Actions
- Estabelecimentos Actions
- Etiquetas Actions
- Fidelidade Actions
- Financeiro Formas Pagamento Actions
- Financeiro Motivos Descontos Actions
- Financeiro Transacoes Actions
- Financeiro Vendas De Produto Actions
- Produtos Actions
- Profissionais Actions
- Servicos Actions
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-Keyheader. - An establishment ID sent via the
estabelecimentoIdheader.
- An API key for authorization via the
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 Idmay 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.