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 discount reasons ("motivos descontos") from the financial module. Specifically, the GET /v1/motivosdescontos operation fetches a paginated list of discount reasons used in financial transactions or billing processes.
Common scenarios for this node include:
- Automating retrieval of discount reason data for reporting or analytics.
- Synchronizing discount reasons between Trinks and other systems.
- Using discount reasons dynamically in workflows that handle billing or customer refunds.
For example, a user might use this node to get all discount reasons page by page, then process or store them elsewhere.
Properties
| Name | Meaning |
|---|---|
| Page | The page number of results to retrieve (pagination). |
| Page Size | The number of items per page to retrieve (pagination size). |
These properties are sent as query parameters in the API request to control pagination of the returned discount reasons.
Output
The node outputs an array of JSON objects representing the discount reasons retrieved from the API. Each item corresponds to one discount reason record as returned by the Trinks API.
The output structure is:
[
{
"json": {
/* Discount reason object fields as returned by the API */
},
"pairedItem": {
"item": <index_of_input_item>
}
}
]
No binary data is output by this node.
Dependencies
- Requires an API key credential and an establishment ID credential for authenticating with the Trinks API.
- The base URL for requests is
https://api.trinks.com. - The node sets headers including
Accept: application/json,Content-Type: application/json, and custom headers for API key and establishment ID.
Troubleshooting
- Operation not found error: If the specified operation is incorrect or missing, the node will throw an error listing available operations. Ensure the operation name matches exactly
"GET /v1/motivosdescontos". - Authentication errors: Missing or invalid API key or establishment ID credentials will cause authentication failures. Verify credentials are correctly configured.
- Pagination issues: Providing invalid values for
PageorPage Size(e.g., negative numbers) may result in API errors or empty responses. Use valid non-negative integers. - Network or API errors: Standard HTTP errors from the Trinks API will be propagated. Check network connectivity and API status.
If Continue On Fail is enabled, errors for individual input items will be returned as JSON error messages instead of stopping execution.
Links and References
- Trinks API Documentation (assumed official docs for reference)
- n8n documentation on HTTP Request Node for understanding API calls
- Pagination best practices in APIs: https://swagger.io/docs/specification/2-0/describing-parameters/#query-parameters