Negocie icon

Negocie

Consume Negocie API

Overview

This node integrates with the Negocie API to perform various operations related to financial negotiations, debts, payments, agreements, and authentication. Specifically, for the Pagamento resource and the Emitir segunda via de boleto operation (though this exact operation is not explicitly shown in the provided code snippet, it falls under the "pagamento" resource category), the node facilitates actions such as retrieving payment options or issuing second copies of payment slips (boletos).

Common scenarios where this node is beneficial include:

  • Automating retrieval of payment options for customers.
  • Issuing second copies of payment slips for overdue invoices.
  • Managing debt negotiation workflows by interacting with the Negocie platform.
  • Authenticating users and managing tokens for secure API access.

Practical example: A company uses this node to automatically issue a second copy of a boleto when a customer requests it through their support system, reducing manual workload and speeding up customer service.

Properties

Name Meaning
Ambiente Selects the environment to perform operations:
- Homologação: Testing environment
- Produção: Production environment

Note: The node supports many other properties depending on the resource and operation selected, but for the Pagamento resource and the Emitir segunda via de boleto operation, only the "Ambiente" property is relevant from the provided input.

Output

The node outputs an array of JSON objects corresponding to each input item processed. Each output item contains the response data returned by the Negocie API for the requested operation.

  • The json field holds the API response data, which varies depending on the operation performed.
  • In case of errors, the output includes an object with an error flag set to true, a descriptive message, detailed error information, and context.
  • The node does not output binary data.

Dependencies

  • Requires access to the Negocie API endpoints, which differ based on the selected environment:

    • Homologação (testing):
      • Digital API base URL: https://hml-bpdigital-api.bellinatiperez.com.br
      • Negocie API base URL: https://hml-negocie-api.bellinatiperez.com.br
    • Produção (production):
      • Digital API base URL: https://prd-digital-api.bellinatiperez.com.br
      • Negocie API base URL: https://negocie-api.bellinatiperez.com.br
  • Requires appropriate API credentials and tokens for authentication (e.g., appId, appPass, usuario, token), which must be configured separately in n8n.

Troubleshooting

  • Documento não encontrado na API Negocie:
    Occurs if the document identifier provided does not exist or is incorrect. Verify the document number before retrying.

  • Falha na autenticação:
    Indicates invalid or missing credentials (appId, appPass, usuario) for the selected environment. Check and update credentials accordingly.

  • Acesso negado:
    The user does not have permission to access the requested resource. Ensure the API user has the necessary permissions.

  • Erro interno do servidor da API Negocie:
    A server-side error occurred. Retry after some time or contact Negocie support if the problem persists.

  • If the node is set to continue on fail, errors are captured in the output JSON with detailed messages; otherwise, execution stops on the first error.

Links and References

Discussion