Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

This node interacts with the Dolibarr API to list the lines (items or entries) associated with a specific contract. It is useful in scenarios where you need to retrieve detailed information about all line items within a given contract, such as for reporting, auditing, or further processing in workflows.

Practical examples:

  • Fetching all product or service lines included in a contract to generate an invoice.
  • Extracting contract line details to synchronize with another system like an ERP or CRM.
  • Reviewing contract contents programmatically to trigger alerts or approvals based on line data.

Properties

Name Meaning
Contract ID The unique identifier of the contract whose lines you want to list. Must be a positive integer (minimum 1).

Output

The node outputs JSON data representing the list of lines belonging to the specified contract. Each item in the output array corresponds to a line entry from the contract, typically including details such as product/service description, quantity, price, and other relevant fields defined by Dolibarr's API.

If the API supports it, the node returns the full HTTP response but primarily the json field contains the parsed list of contract lines.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to a Dolibarr instance via its REST API.
  • Needs an API authentication token or key configured in the node credentials to authorize requests.
  • The base URL of the Dolibarr API must be set correctly in the credentials configuration.

Troubleshooting

  • Common issues:

    • Invalid or missing Contract ID: Ensure the Contract ID is provided and is a valid number greater than zero.
    • Authentication errors: Verify that the API credentials are correct and have sufficient permissions to access contract data.
    • 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 or is inaccessible.
    • HTTP 401 Unauthorized or 403 Forbidden: Authentication failed or insufficient permissions.
    • NodeApiError with other HTTP codes: Check the error message for details; it often indicates request formatting or server-side issues.

To resolve these, double-check input parameters, credentials, and network settings. Consult Dolibarr API documentation for any recent changes.

Links and References

Discussion