Negocie icon

Negocie

Consume Negocie API

Overview

This node integrates with the Negocie API to perform operations related to debt management. Specifically, for the "Autenticar devedor" operation under the "Autenticação" resource, it authenticates a debtor using their CPF or CNPJ (Brazilian individual or company taxpayer registry numbers). This authentication step is essential in workflows where verifying the identity of a debtor is required before proceeding with further debt-related actions such as querying debts, payments, or agreements.

Practical examples include:

  • Validating a debtor's identity before fetching their outstanding debts.
  • Authenticating a debtor prior to initiating payment or negotiation processes.
  • Integrating debtor authentication into automated credit or collection systems.

Properties

Name Meaning
ClientId The client identifier used for API authentication.
ClientSecret The client secret key paired with the ClientId for secure access.
CPF ou CNPJ The debtor's CPF (individual) or CNPJ (company) number to authenticate.

Output

The node outputs JSON data representing the result of the debtor authentication request. This typically includes information returned by the Negocie API about the authenticated debtor, such as status, tokens, or debtor details necessary for subsequent operations.

No binary data output is indicated in the source code.

Dependencies

  • Requires access to the Negocie API.
  • Needs valid API credentials: a Client ID and Client Secret.
  • The node expects these credentials to be provided as input properties.
  • No explicit mention of environment variables or additional n8n configurations beyond supplying these credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing ClientId or ClientSecret will cause authentication failures.
    • Incorrect CPF or CNPJ format may lead to errors or unsuccessful authentication.
    • Network or API endpoint issues can prevent successful requests.
  • Error messages:

    • Errors thrown by the API are caught; if "Continue On Fail" is enabled, the node returns an error message per item without stopping the workflow.
    • Typical error messages might relate to invalid credentials, unauthorized access, or malformed document identifiers.
  • Resolutions:

    • Verify that ClientId and ClientSecret are correct and active.
    • Ensure CPF or CNPJ values are properly formatted and valid.
    • Check network connectivity and API availability.
    • Use the "Continue On Fail" option to handle partial failures gracefully.

Links and References

  • Negocie API Documentation (example placeholder link)
  • Brazilian CPF and CNPJ validation rules for proper formatting guidance.

Discussion