Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

The "Activate Line" operation under the "Contracts" resource in this Dolibarr node activates a specific contract line within a given contract. This is useful when you want to enable or start a particular service or product line that is part of an existing contract, specifying the activation period and optionally adding comments.

Typical use cases include:

  • Activating a new service line for a customer contract starting from a certain date.
  • Managing contract lifecycle by enabling/disabling individual lines without affecting the entire contract.
  • Automating contract updates in bulk workflows where multiple contract lines need activation with precise timing.

For example, if a company sells software licenses as contract lines, this operation can activate a license line starting immediately or on a future date, optionally noting remarks about the activation.

Properties

Name Meaning
Contract ID The unique identifier (number) of the contract containing the line to activate.
Line ID The unique identifier (number) of the specific contract line to activate.
Start Date The date and time when the contract line activation should begin. Required.
End Date The optional date and time when the contract line activation should end.
Comment An optional string comment or note related to the activation of the contract line.

Output

The node outputs the full HTTP response from the Dolibarr API after attempting to activate the contract line. The main output is JSON data representing the result of the activation request, which typically includes status information and details about the activated line.

No binary data output is involved in this operation.

Dependencies

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

Troubleshooting

  • Common Issues:

    • Invalid or missing Contract ID or Line ID will cause the API call to fail.
    • Incorrect date formats or missing required Start Date may lead to errors.
    • Authentication failures due to invalid or expired API credentials.
    • Network connectivity issues to the Dolibarr server.
  • Error Messages:

    • HTTP 404 Not Found: Likely caused by non-existent contract or line IDs; verify IDs are correct.
    • HTTP 401 Unauthorized: Check API credentials and permissions.
    • Validation errors from the API if required fields like Start Date are missing or malformed.
  • Resolutions:

    • Double-check input property values before execution.
    • Ensure API credentials are valid and have sufficient permissions.
    • Confirm the Dolibarr API base URL is reachable and correct.
    • Use proper ISO date-time format for Start Date and End Date inputs.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion