Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

This node interacts with the Dolibarr API to manage contracts, specifically allowing deletion of a contract line item. The "Delete Line" operation under the "Contracts" resource removes a specific line from a given contract by its IDs.

This is useful in scenarios where you need to programmatically update contracts by removing obsolete or incorrect line items without manually editing them in Dolibarr's UI. For example, if an invoice line was added by mistake or a service/product is no longer part of the contract, this operation can automate cleaning up those entries.

Properties

Name Meaning
Contract ID The unique identifier (number) of the contract from which a line will be deleted.
Line ID The unique identifier (number) of the specific line within the contract to delete.

Output

The output contains the full HTTP response from the Dolibarr API after attempting to delete the specified contract line. The json field typically includes confirmation of deletion or error details if the operation failed.

No binary data is output by this node.

Dependencies

  • Requires an active connection to a Dolibarr instance via its REST API.
  • Needs an API authentication credential configured in n8n for accessing Dolibarr.
  • The base URL of the Dolibarr API must be set in the credentials.
  • The node uses standard HTTP DELETE requests to the endpoint /contracts/{contractID}/lines/{lineID}.

Troubleshooting

  • Common issues:

    • Invalid or missing Contract ID or Line ID will cause the API call to fail.
    • Insufficient permissions or invalid API credentials may result in authorization errors.
    • If the specified contract or line does not exist, the API might return a 404 error.
    • Network connectivity problems between n8n and the Dolibarr server can cause request failures.
  • Error messages:

    • 404 Not Found: The contract or line ID does not exist. Verify the IDs are correct.
    • 401 Unauthorized: Check that the API key or authentication token is valid and has sufficient rights.
    • 400 Bad Request: Usually indicates malformed input; ensure IDs are positive integers.

Resolving these usually involves verifying input parameters, checking API credentials, and ensuring the Dolibarr instance is reachable.

Links and References

Discussion