Actions120
- Authentication Actions
- Bloqueios Actions
- Get Motivos
- Get Bloqueio Faturamento
- Get Bloqueio Conta
- Get Bloqueio Carteira
- Get Bloqueio Compra Pedido
- Get Bloqueio Cotacao Compra
- Get Bloqueio Data Minima Vencimento
- Get Bloqueio Estoque Negativo
- Get Bloqueio Financiamento Pedido
- Get Bloqueio Frete Pago
- Get Bloqueio Limite Credito
- Get Bloqueio Limite Individual
- Get Bloqueio Manutencao Preventiva
- Get Bloqueio Margem
- Get Bloqueio Mes Reajuste
- Get Bloqueio Parcela Minima
- Get Bloqueio Saldo Atrasado
- Desaprovar Bloqueio
- Liberar Bloqueio
- Liberar Bloqueio Limite Credito
- Liberar Bloqueio Limite Individual
- Classificacao Actions
- Cliente Actions
- Instituição Financeira Actions
- Linha de Crédito Actions
- Máquina Actions
- Mecânico Actions
- Motorista Actions
- Negócio Actions
- Nota Fiscal Actions
- Oficina Actions
- Orçamento Actions
- Orçamento Balcão Actions
- Ordem de Serviço Actions
- Criar Ordem de Serviço Completa
- Consultar por ID
- Consultar por Código Externo
- Listar Agendamentos
- Listar Agendamentos por ID
- Listar Status do Lock
- Listar Ordens de Serviço
- Incluir Ordem de Serviço
- Listar Ordens de Serviço Geral
- Incluir Apontamento
- Incluir Despesa
- Incluir Peça
- Incluir Serviço
- Editar Peça
- Editar Serviço
- Editar Veículo
- Incluir Observação
- Ordem Serviço Tipo Actions
- Pedido Actions
- Política de Prazo Actions
- Política de Preço Actions
- Produto Actions
- Prospect Actions
- Saída Actions
- Serviço Actions
- Status Financiamento Actions
- Título Actions
- Veículo Cliente Actions
- Veículo Próprio Actions
- Vendas Actions
- Vendedor Actions
Cliente → Get Compras Por Ano
AI-generatedOverview
This node integrates with the Nuvem Solution API to retrieve customer purchase data filtered by year. Specifically, the "Cliente" resource with the "Get Compras Por Ano" operation fetches paginated purchase records for a given customer ID and year. This is useful for businesses that want to analyze or report on customer purchasing behavior over specific years.
Common scenarios:
- Generating annual purchase reports for customers.
- Analyzing customer buying trends year-over-year.
- Feeding purchase data into dashboards or CRM systems for better customer insights.
Example use case:
A sales analyst wants to extract all purchases made by a particular customer in 2023, paginated 20 items per page, to identify seasonal buying patterns.
Properties
| Name | Meaning |
|---|---|
| Cliente ID | The unique identifier (number) of the customer whose purchase data is being queried. |
| Ano | The year (number) for which the customer's purchases are requested. |
| Page | The page number (number) for paginating through the results; defaults to 1. |
| Page Size | The number of items (number) to return per page; defaults to 20. |
Output
The output is a JSON array containing the purchase records for the specified customer and year. Each item in the array represents a purchase entry with details as returned by the Nuvem Solution API endpoint /erp/crm/clientes/{clienteId}/comprasPorAno/{ano}.
The structure typically includes fields such as purchase identifiers, dates, amounts, and possibly product or service details, depending on the API's response schema.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the Nuvem Solution API.
- Requires credentials including:
- Base URL of the API.
- Software key.
- Secret.
- User ID.
- User key.
- These credentials must be configured in n8n under the appropriate credential type for authentication.
- The node uses bearer token authentication obtained via an internal authentication request before making API calls.
Troubleshooting
Authentication failures:
If the node throws errors related to authentication, verify that the software key, secret, user ID, and user key are correctly set and valid. Also, ensure the API base URL is correct and accessible.Invalid customer ID or year:
Errors may occur if theCliente IDdoes not exist or theAnois out of range. Confirm these inputs are valid and correspond to existing data in the system.Pagination issues:
If no data is returned, check that thePageandPage Sizeparameters are within valid ranges and that there is data available for those pages.API connectivity problems:
Network issues or incorrect base URL can cause request failures. Ensure network access to the API endpoint and correct configuration.Error messages from API:
The node surfaces error messages from the API. Review these messages for clues, such as rate limits, missing permissions, or malformed requests.
Links and References
- Nuvem Solution API Documentation (Assumed official API docs, replace with actual link if available)
- n8n Documentation on Creating Custom Nodes
- General REST API Pagination Concepts: REST API Pagination