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 retrieve loyalty points information related to customers. Specifically, for the Fidelidade resource and the GET /v1/fidelidade operation, it fetches loyalty data such as points earned, points used, points to be consumed, or points transferred for a given customer within optional date ranges and pagination settings.
Typical use cases include:
- Retrieving a customer's loyalty points balance or history.
- Filtering loyalty transactions by type (earned, used, etc.) and date range.
- Paginating through large sets of loyalty records.
For example, a business could use this node to display a customer's current loyalty points or generate reports on points usage over time.
Properties
| Name | Meaning |
|---|---|
| Pessoa Fisica Cliente Id | When provided, filters results by the customer's unique ID (id_pessoa). |
| Tipo | Type of points to retrieve: 1 = Points earned, 2 = Points used, 3 = Points to consume, 4 = Points transferred. |
| Data Inicio | Start date filter for the query (string format). |
| Data Fim | End date filter for the query (string format). |
| Page | Page number for paginated results (number). |
| Page Size | Number of items per page in paginated results (number). |
Output
The node outputs JSON data representing the response from the Trinks API for the requested loyalty points query. The structure depends on the API but typically includes details about loyalty points transactions matching the query parameters.
No binary data output is produced by this node.
Example output JSON might include fields like:
{
"points": [
{
"transactionId": "12345",
"type": 1,
"points": 100,
"date": "2024-01-01T12:00:00Z"
}
],
"page": 1,
"pageSize": 10,
"totalItems": 50
}
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 sends requests with headers including
Accept: application/json,Content-Type: application/json, and authentication headers.
Troubleshooting
Common issues:
- Missing or invalid API key or establishment ID will cause authentication failures.
- Providing invalid dates or unsupported
tipovalues may result in API errors. - Pagination parameters (
pageandpageSize) should be valid numbers; otherwise, the API may return errors or unexpected results.
Error messages:
"Operation ... not found": This indicates an invalid operation name was specified. Ensure the operation matches exactlyGET /v1/fidelidade.- HTTP errors from the API (e.g., 401 Unauthorized) usually indicate credential problems.
- Network errors or timeouts may occur if the API endpoint is unreachable.
To resolve these:
- Verify credentials are correctly configured.
- Double-check input parameters for correctness.
- Use the node's "Continue On Fail" option to handle errors gracefully during execution.
Links and References
- Trinks API Documentation (assumed official docs)
- n8n documentation on HTTP Request Node for understanding request handling
- General info on loyalty program APIs and best practices