Skip to main content

Dolibarr Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow data flow that sends data to a Dolibarr location.
dolibarr_api.png

Dolibarr

Create a Dolibarr Destination

  1. Click the + icon on the Nexset that will be sent to the Dolibarr destination, and select the Send to Destination option from the menu.

  2. Select the Dolibarr connector from the list of available destination connectors. Then, select the credential that will be used to connect to the Dolibarr instance, and click Next; or, create a new Dolibarr credential for use in this flow.

  3. In Nexla, Dolibarr destinations can be created using pre-built endpoint templates, which expedite destination setup for common Dolibarr endpoints. Each template is designed specifically for the corresponding Dolibarr API endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    Dolibarr destinations can also be configured manually, allowing you to send data to Dolibarr endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Dolibarr endpoints. Each template is designed specifically for the corresponding Dolibarr API endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    Create Invoice

    Creates a new customer invoice in Dolibarr. Use this endpoint to push invoice data from an external system into Dolibarr — for example, to create invoices generated by an e-commerce platform, billing system, or order management tool. Each record in the Nexset is sent as a separate POST request to the Dolibarr invoices API.

    • No additional endpoint parameters are required. Nexla sends each Nexset record as a JSON body matching the Dolibarr Invoice object schema to the /api/index.php/invoices endpoint.
    • Ensure that each record in your Nexset includes the fields required by the Dolibarr Invoice schema. At minimum, the following fields are typically required:

      • socid: The numeric ID of the third party (customer) to associate with this invoice.
      • type: The invoice type (for example, 0 for a standard customer invoice).
      • lines: An array of line item objects, each specifying the product, quantity, and unit price.

    For the complete Dolibarr Invoice object schema and all available fields, refer to the Dolibarr REST API documentation or the interactive API explorer at /api/index.php/explorer on your instance.

    Update Invoice

    Updates an existing customer invoice identified by its numeric ID. Use this endpoint to modify invoice details — for example, to update invoice status, dates, or custom attributes from an external system.

    • Enter the numeric Dolibarr invoice ID in the Invoice ID field. This is a required field. The invoice ID identifies which invoice will be updated. Nexla appends this ID to the API URL and sends each Nexset record as a PUT request to /api/index.php/invoices/{id}.

    Only the fields included in the Nexset record will be updated. Fields not present in the request body will retain their current values in Dolibarr. Note that some invoice fields may be locked once an invoice has been validated — refer to Dolibarr's invoice workflow documentation for details.

    Add Invoice Line

    Adds a new line item to an existing customer invoice. Use this endpoint to append product or service lines to invoices already created in Dolibarr — for example, when additional charges or items need to be added after invoice creation.

    • Enter the numeric Dolibarr invoice ID in the Invoice ID field. This is a required field. Nexla appends this ID to the API URL and sends each Nexset record as a POST request to /api/index.php/invoices/{id}/lines.
    • Each Nexset record should include the fields required for a Dolibarr invoice line, including:

      • fk_product: The numeric ID of the product or service to add (optional if using a free-text description).
      • qty: The quantity of the line item.
      • subprice: The unit price of the line item.
      • tva_tx: The VAT rate to apply to this line.
      • desc: A text description for the line item.

    Invoice lines can only be added to invoices that are in draft status. Validated invoices may not accept new lines depending on your Dolibarr configuration.

    Add Invoice Payment

    Records a payment against an existing customer invoice. Use this endpoint to synchronize payment data from a payment processor, bank feed, or accounting system into Dolibarr — keeping invoice payment status up to date.

    • Enter the numeric Dolibarr invoice ID in the Invoice ID field. This is a required field. Nexla appends this ID to the API URL and sends each Nexset record as a POST request to /api/index.php/invoices/{id}/payments.
    • Each Nexset record should include the fields required to record a payment in Dolibarr, including:

      • datepaye: The payment date in YYYY-MM-DD format.
      • paiementid: The numeric ID of the payment method (e.g., bank transfer, credit card — find these in your Dolibarr Setup).
      • closepaidinvoices: Set to yes to automatically mark the invoice as paid when the payment fully covers the outstanding amount.
      • accountid: The numeric ID of the bank account to record the payment against.
      • num_paiement: An optional payment reference number.

    Dolibarr validates that the invoice is in a state that accepts payments before recording the transaction. Invoices must be validated before payments can be applied.

    Create Order

    Creates a new customer sales order in Dolibarr. Use this endpoint to push order data from an external system — for example, from an e-commerce platform, EDI feed, or order management system — into Dolibarr for fulfillment processing.

    • No additional endpoint parameters are required. Nexla sends each Nexset record as a JSON body matching the Dolibarr Order object schema to the /api/index.php/orders endpoint.
    • Ensure that each record in your Nexset includes the fields required by the Dolibarr Order schema. At minimum, the following fields are typically required:

      • socid: The numeric ID of the third party (customer) to associate with this order.
      • lines: An array of order line objects, each specifying the product, quantity, and unit price.

    For the complete Dolibarr Order object schema, refer to the Dolibarr REST API documentation or the interactive API explorer on your instance.

    Create Product

    Creates a new product or service in the Dolibarr product catalog. Use this endpoint to synchronize product data from a PIM system, ERP, or spreadsheet into Dolibarr — maintaining a consistent product catalog across systems.

    • No additional endpoint parameters are required. Nexla sends each Nexset record as a JSON body matching the Dolibarr Product object schema to the /api/index.php/products endpoint.
    • Ensure that each record in your Nexset includes the fields required by the Dolibarr Product schema. At minimum, the following fields are typically required:

      • ref: A unique product reference code.
      • label: The product name or description.
      • type: The product type — 0 for a physical product or 1 for a service.
      • price: The unit price of the product.
      • tva_tx: The applicable VAT rate.

    Product references (ref) must be unique within your Dolibarr instance. Attempting to create a product with a duplicate reference will result in an API error.

    Update Product

    Updates an existing product or service in the Dolibarr catalog by its numeric ID. Use this endpoint to keep product details — such as pricing, descriptions, or custom attributes — synchronized with an external system.

    • Enter the numeric Dolibarr product ID in the Product ID field. This is a required field. Nexla appends this ID to the API URL and sends each Nexset record as a PUT request to /api/index.php/products/{id}.

    Only the fields included in the Nexset record will be updated. Fields not present in the request body will retain their current values in Dolibarr.

    Create Third Party

    Creates a new third party (customer, supplier, or prospect) in Dolibarr. Use this endpoint to import contact and company data from a CRM, marketing platform, or data enrichment tool into Dolibarr.

    • No additional endpoint parameters are required. Nexla sends each Nexset record as a JSON body matching the Dolibarr Third Party object schema to the /api/index.php/thirdparties endpoint.
    • Ensure that each record in your Nexset includes the fields required by the Dolibarr Third Party schema. At minimum, the following fields are typically required:

      • name: The name of the company or individual.
      • client: Set to 1 if this is a customer, 0 otherwise.
      • fournisseur: Set to 1 if this is a supplier, 0 otherwise.
      • prospect: Set to 1 if this is a prospect, 0 otherwise.

    Third-party records can serve as customers, suppliers, and prospects simultaneously in Dolibarr by setting the relevant flags. Set all applicable flags for each record.

    Update Third Party

    Updates an existing third party in Dolibarr by its numeric ID. Use this endpoint to keep customer, supplier, or prospect records synchronized with an external CRM or contact management system.

    • Enter the numeric Dolibarr third-party ID in the Third Party ID field. This is a required field. Nexla appends this ID to the API URL and sends each Nexset record as a PUT request to /api/index.php/thirdparties/{id}.

    Only the fields included in the Nexset record will be updated. Fields not present in the request body will retain their current values in Dolibarr.

Configure Manually

Dolibarr destinations can be manually configured to send data to any valid Dolibarr REST API endpoint.

Using manual configuration, you can also configure Nexla to automatically send the response received from the Dolibarr API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Dolibarr API from the Method pulldown menu. Common methods for Dolibarr destinations are:

    • POST: For creating new records (invoices, orders, products, third parties, contacts)
    • PUT: For replacing an existing record entirely by its ID
    • PATCH: For partial updates to an existing record
    • DELETE: For removing a record from Dolibarr

Data Format

  1. Select the format in which the Nexset data will be sent to the Dolibarr API from the Content Format pulldown menu. Dolibarr's REST API accepts and returns data in JSON format. Nexla will automatically convert the data to the selected format for each API call.

API Endpoint URL

  1. Enter the URL of the Dolibarr API endpoint to which you want to send the Nexset data in the URL field. Dolibarr REST API endpoints follow the pattern https://your-dolibarr-domain.com/api/index.php/{resource}. For update operations, include the numeric ID of the record to be updated at the end of the URL — for example, https://your-dolibarr-domain.com/api/index.php/invoices/123.

The full list of available Dolibarr REST API endpoints and their required request body schemas is available in the interactive API explorer at /api/index.php/explorer on your Dolibarr instance, and in the Dolibarr REST API Wiki.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2).

    You do not need to include the DOLAPIKEY authentication header — it is handled automatically by Nexla based on your Dolibarr credential configuration.

Exclude Attributes from the Call

Optional
  • If any record attributes in the Nexset should be omitted when sending data to this Dolibarr destination, select the attributes from the Exclude Attributes pulldown menu. This is useful for removing internal Nexla metadata fields or fields that are not accepted by the Dolibarr API.

  • Any number of attributes can be selected for exclusion, and all excluded attributes will be shown in the field. To remove an attribute from the list, click the X icon next to the attribute name.

Record Batching

Optional
  1. If records should be sent to this destination in batched API calls, check the box next to Would you like to batch your records together? to enable record batching.

  2. Enter the maximum number of records that should be batched together in a single API call in the Batch Size field. By default, this value is set to 100.

  3. Select the algorithm that will be used to group records into batches from the Grouping Algorithm pulldown menu. The sample request shown in the panel on the right will be updated to reflect the current batching settings. Some algorithms require additional settings—click on an algorithm listed below to view instructions for configuring these settings.

Response Webhook

Optional

Nexla can automatically send the response received from the Dolibarr API after each call to a new Nexla webhook data source. This option allows you to keep track of the status of each API call and any additional information returned — for example, the ID assigned to a newly created invoice or order.

  • To enable this option, check the box next to Would you like to process the API response as a Nexla Webhook source?.

Sample Request Payload

Sample request payloads containing a portion of the Nexset data that will be sent to the Dolibarr API endpoint based on the current settings are shown in the Sample Payload panel on the right. These samples can be referenced to ensure that the destination and request settings are correctly configured.

  • Click on a sample request payload to expand it and view the complete payload content.
  • Sample payloads are automatically updated with each setting change, making it easy to verify that changes achieve the desired effect.

Endpoint Testing (Manual Configuration)

After all endpoint settings have been configured, Nexla can send a test payload to the Dolibarr API to ensure that the destination is configured correctly.

  1. To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  2. If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  3. Click the Send Test Data button at the top of a sample payload to send the test payload to the Dolibarr API using the current settings.

Save & Activate the Destination

  • Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To begin sending data to Dolibarr, open the destination resource menu, and select Activate.

    The Nexset data will not be sent to Dolibarr until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.