Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

This node operation updates a specific line item within a contract in Dolibarr via its API. It allows users to modify details such as description, product or service ID, tax rates, pricing, quantity, discounts, planned dates, and custom extra fields for a given contract line.

Typical use cases include:

  • Adjusting contract line items after initial creation, e.g., changing quantities or prices.
  • Updating tax information or discounts on contract lines.
  • Adding or modifying planned start/end dates for contract deliverables.
  • Managing additional custom attributes related to contract lines.

For example, a user might update the quantity and unit price of a product line in an existing contract to reflect a change in order size.

Properties

Name Meaning
Contract ID The unique identifier of the contract containing the line to update.
Line ID The unique identifier of the specific line within the contract to update.
Values Collection of fields to update on the contract line:
- Description Text description of the line item.
- Product or Service ID Identifier of the product or service associated with the line.
- Sales Tax (%) Tax rate percentage applied to the line item (0-100).
- Tax Whether the price is tax excluded ("Excl Tax") or tax included ("Incl Tax").
- Unit Price The unit price value entered by the user.
- Quantity Number of units for this line item (required).
- Discount (%) Percentage discount applied to the line (not applied on unit price).
- Planned Start Date Scheduled start date/time for the line item.
- Planned End Date Scheduled end date/time for the line item.
Extra Fields Multiple custom attribute fields with name-value pairs for additional data on the line.
Fields Other contract fields (not detailed here, but available for assignment).

Output

The node outputs the full response from the Dolibarr API after updating the contract line. The main output is JSON data representing the updated contract line resource, including all fields sent and any additional metadata returned by the API.

No binary data output is involved.

Dependencies

  • Requires an active connection to a Dolibarr instance with API access.
  • Needs an API key credential configured in n8n for authentication.
  • The base URL of the Dolibarr API must be set in the credentials.
  • The node uses Dolibarr's REST API endpoints for contracts and lines.

Troubleshooting

  • Invalid Contract or Line ID: If the specified contract or line ID does not exist, the API will return an error. Verify IDs are correct and exist in Dolibarr.
  • Authentication Errors: Ensure the API key credential is valid and has sufficient permissions to update contracts.
  • Validation Errors: Incorrect field values (e.g., negative quantity, invalid tax rates) may cause the API to reject the request. Check input constraints.
  • Network Issues: Connectivity problems to the Dolibarr server will prevent updates; verify network access and API endpoint availability.
  • Missing Required Fields: Contract ID, Line ID, and Quantity are required; omitting them will cause errors.

Links and References

Discussion