Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

This node interacts with the Dolibarr API to perform various operations on different resources. Specifically, for the Contracts resource and the Validate operation, it validates a contract by its ID. This is useful in scenarios where you need to programmatically confirm that a contract exists and meets certain validation criteria defined in Dolibarr.

Practical examples include:

  • Automating contract verification workflows before proceeding with further processing.
  • Integrating contract validation into larger business automation pipelines to ensure data integrity.
  • Triggering alerts or follow-up actions if a contract fails validation.

Properties

Name Meaning
Contract ID The unique identifier (number) of the contract to validate. Must be an integer ≥ 1.

Output

The node outputs the full HTTP response from the Dolibarr API when validating the contract. The main output is a JSON object containing the validation result details as returned by the /contracts/{contractID}/validate endpoint.

If the API returns binary data (not typical for this endpoint), it would represent related contract files or attachments, but based on the static code, only JSON responses are expected here.

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 credentials configuration.

Troubleshooting

  • Common issues:

    • Invalid or missing Contract ID will cause the request to fail.
    • Network connectivity problems or incorrect base URL can prevent successful API calls.
    • Insufficient permissions or invalid API credentials will result in authorization errors.
  • Error messages:

    • HTTP 404 Not Found: The specified contract ID does not exist.
    • HTTP 401 Unauthorized: API credentials are missing or invalid.
    • HTTP 400 Bad Request: The contract ID parameter is malformed or out of range.

To resolve these:

  • Verify the contract ID is correct and exists in Dolibarr.
  • Check and update API credentials in n8n.
  • Confirm the Dolibarr API base URL is accurate and accessible.

Links and References

Discussion