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 "vale presente" (gift voucher) for a specific client. It is designed to send a POST request to the endpoint /v1/clientes/{clienteId}/valespresentes, allowing users to add gift vouchers associated with clients in the Trinks system.
Common scenarios where this node is beneficial include:
- Automating the issuance of gift vouchers to clients after purchases or promotions.
- Integrating gift voucher creation into customer management workflows.
- Managing client rewards and incentives programmatically.
For example, a business could use this node to automatically generate a gift voucher for a client when they reach a certain loyalty threshold.
Properties
| Name | Meaning |
|---|---|
| Cliente Id | The unique identifier of the client for whom the gift voucher is being created. |
| Numero | The number or code assigned to the gift voucher. |
| Valor | The monetary value of the gift voucher. |
| Validade | The expiration date of the gift voucher, typically in string format (e.g., ISO date). |
| Forma Pagamento Id | The identifier for the payment method associated with the gift voucher. |
Output
The node outputs JSON data representing the response from the Trinks API after creating the gift voucher. This JSON typically contains details about the newly created voucher, such as its ID, status, and other relevant metadata returned by the API.
If an error occurs during execution and the node is configured to continue on failure, the output JSON will contain an error field with the error message.
The node does not output binary data.
Dependencies
- Requires an API key credential and an establishment ID credential to authenticate requests to the Trinks API.
- The base URL for the API is
https://api.trinks.com. - The node sets HTTP headers including
Accept: application/json,Content-Type: application/json,X-Api-Key, andestabelecimentoIdfor authentication and content negotiation.
Troubleshooting
- Operation Not Found Error: If the specified operation is not recognized, the node logs available operations and throws an error indicating the operation was not found. Ensure the operation name matches exactly.
- Authentication Errors: Missing or invalid API key or establishment ID credentials will cause authentication failures. Verify that valid credentials are provided.
- Invalid Input Data: Providing incorrect types or missing required properties (like
Cliente Id) may result in API errors. Double-check input values. - API Request Failures: Network issues or API downtime can cause request failures. Check connectivity and API status.
- When continuing on failure, errors are returned in the output JSON under the
errorproperty for easier debugging.
Links and References
- Trinks API Documentation (official API docs, if publicly available)
- n8n Documentation on Creating Custom Nodes
- General REST API usage patterns in n8n: HTTP Request Node