Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

The node integrates with the Dolibarr API to manage contracts, specifically providing an operation to close a contract. This is useful in scenarios where a contract lifecycle needs to be programmatically controlled, such as marking contracts as completed or terminated within business workflows. For example, after fulfilling contractual obligations, a user can automate closing the contract record in Dolibarr to reflect its final status and prevent further modifications.

Properties

Name Meaning
Contract ID The unique numeric identifier of the contract to be closed. Must be a positive integer.

Output

The node outputs the full HTTP response from the Dolibarr API when closing a contract. The main output is a JSON object representing the API's response to the close request for the specified contract. This typically includes confirmation of the contract closure or any relevant status information returned by the API.

If the API supports it, binary data could be included, but based on the provided code and operation, the output is primarily JSON data reflecting the contract's updated state.

Dependencies

  • Requires an active connection to a Dolibarr instance via its REST API.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The base URL of the Dolibarr API must be set in the node credentials.
  • No additional external services are required beyond the Dolibarr API.

Troubleshooting

  • Common Issues:

    • Invalid or missing Contract ID: Ensure the Contract ID is provided and is a valid positive number.
    • Authentication errors: Verify that the API key or token is correctly configured and has sufficient permissions.
    • Network or connectivity problems: Confirm that the Dolibarr API endpoint is reachable from the n8n environment.
    • API endpoint changes or version mismatches may cause unexpected errors.
  • Error Messages:

    • HTTP 404 Not Found: The specified contract ID does not exist. Check the Contract ID value.
    • HTTP 401 Unauthorized or 403 Forbidden: Authentication failed or insufficient permissions. Recheck credentials.
    • Other HTTP errors: Review the error message details returned by the API for guidance.

Links and References

Discussion