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 Mercadoria
AI-generatedOverview
This node integrates with the Nuvem Solution API to retrieve various types of data related to customers, products, orders, and more. Specifically, for the Cliente resource and the Get Compras Mercadoria operation, it fetches the recent merchandise purchases (parts and machines) made by a specified customer. This is useful in scenarios where you want to analyze or report on a customer's purchasing history, track buying patterns, or integrate purchase data into workflows such as CRM updates, sales analysis, or inventory management.
Practical example:
You can use this node to automatically pull the last purchases of parts and machines for a customer after a service call, enabling your system to check if the customer recently bought certain items or to trigger follow-up actions based on their purchase behavior.
Properties
| Name | Meaning |
|---|---|
| Cliente ID | The unique identifier (number) of the customer whose merchandise purchases you want to retrieve. This is required. |
| Page | The page number for paginated results. Defaults to 1. |
| Page Size | The number of items to return per page. Defaults to 20. |
Output
The output is a JSON array containing the list of merchandise purchases (parts and machines) associated with the specified customer. Each item in the array represents a purchase record with details as provided by the Nuvem Solution API.
The exact structure of each purchase record depends on the API response but typically includes information such as purchase date, product details, quantities, prices, and other relevant metadata.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Nuvem Solution API.
- The node expects the following credentials to be configured in n8n:
- Base URL of the Nuvem Solution API
- Software Key
- Secret
- User ID
- User Key
These credentials are used to obtain an access token which authorizes subsequent API requests.
Troubleshooting
Authentication failures:
If the node throws errors related to authentication, verify that all credential fields (software key, secret, user ID, user key) are correctly set and valid. Also, ensure the API base URL is correct and accessible.Invalid Cliente ID:
Providing a non-existent or incorrect customer ID will result in errors or empty responses. Confirm the customer ID exists in the system.Pagination issues:
If you request a page number beyond the available pages, the API may return an empty list. Adjust thePageandPage Sizeparameters accordingly.Network or API errors:
Errors like timeouts or server errors indicate connectivity or server-side problems. Retry later or check the API status.Malformed input:
Ensure numeric inputs like Cliente ID, Page, and Page Size are valid numbers.
Links and References
- Nuvem Solution API Documentation (Assumed official docs URL)
- n8n Documentation - Creating Custom Nodes
- REST API Pagination Best Practices
Summary of execute() logic for Cliente - Get Compras Mercadoria
- Retrieves credentials and authenticates with the Nuvem Solution API to get an access token.
- Reads input parameters:
clienteId,page, andpageSize. - Constructs a GET request to the endpoint:
/erp/crm/clientes/{clienteId}/comprasMercadoria?page={page}&pageSize={pageSize} - Sends the request with authorization header using the bearer token.
- Returns the JSON response from the API as the node's output.
This operation supports pagination to handle large datasets efficiently.