# Dolibarr

> Run sales and billing in Dolibarr from workflows: add customers, prospects and suppliers from forms and sales, add contacts, make and validate invoices, record payments, save invoice and quote PDFs to send, and find unpaid or overdue invoices and products. Start a workflow when a third party is added or an invoice is issued or paid.

App · 15 actions. Web page: https://docs.lodol.com/docs/integrations/dolibarr

## Actions

### Add payment to invoice

Record money received against a validated invoice. Once it's paid in full, Dolibarr marks it paid.

**Inputs**

- Invoice (`invoice`, text, required): The invoice's ID, its number (such as FA2611-0001) or its link.
- Payment mode (`payment_mode`, text, required): How the customer paid, such as Credit Transfer or Cheque.
- Amount (`amount`, number): How much was paid. Leave blank for everything left to pay. At least 0.01.
- Bank account (`bank_account`, text): The account the money went into. Leave blank for the invoice's own account, or your only one.
- Payment date (`date`, date): When it was paid. Leave blank for today.
- Reference (`reference`, text): The payment's reference, such as a transaction ID or cheque number.
- Note (`note`, text): A note on the payment.
- Cheque issuer (`cheque_issuer`, text): For a cheque, who wrote it. Leave blank for the customer's name.

**Outputs**

- `amount` (number): How much was recorded
- `bank_account` (text): The bank account it went into
- `date` (text): The payment date (YYYY-MM-DD)
- `invoice_id` (number): The invoice's ID
- `invoice_ref` (text): The invoice's number
- `invoice_status` (text): The invoice's status now: unpaid, or paid once settled
- `invoice_total` (number): The invoice's total with tax
- `link` (text): A link to the invoice in Dolibarr
- `paid` (number): How much of the invoice is paid now
- `payment_id` (number): The payment's ID
- `payment_mode` (text): How it was paid, such as Credit Transfer
- `reference` (text): Its reference, such as a transaction ID
- `remaining` (number): How much is left to pay now

**Example output**

```json
{
  "amount": 216,
  "bank_account": "Main business account",
  "date": "2026-11-06",
  "invoice_id": 41,
  "invoice_ref": "FA2611-0001",
  "invoice_status": "paid",
  "invoice_total": 216,
  "link": "https://erp.example.com/compta/facture/card.php?facid=41",
  "paid": 216,
  "payment_id": 7,
  "payment_mode": "Credit Transfer",
  "reference": "TX-88213",
  "remaining": 0
}
```

### Close proposal

Mark a proposal signed or not signed, such as when the customer accepts or turns it down. A draft is validated first.

**Inputs**

- Proposal (`proposal`, text, required): The proposal's ID, its number (such as PR2611-0001) or its link.
- Outcome (`outcome`, text, required): What the customer decided. One of: `signed`, `not_signed` (Not signed).
- Note (`note`, text): Why, kept as a private note.

**Outputs**

- `currency` (text): The currency, such as EUR
- `customer` (text): The customer's name
- `customer_email` (text): The customer's email address
- `customer_id` (number): The customer's ID
- `customer_ref` (text): The customer's own reference
- `date` (text): The proposal date (YYYY-MM-DD)
- `id` (number): The proposal's ID, for other Dolibarr steps
- `lines` (list): Its lines, in order
- `link` (text): A link to it in Dolibarr
- `note_public` (text): The note printed on the proposal
- `ref` (text): Its number, such as PR2611-0001; (PROV12) while a draft
- `status` (text): draft, open, signed, not_signed or billed
- `total` (number): The total with tax
- `total_excl_tax` (number): The total before tax
- `total_tax` (number): The VAT
- `valid_until` (text): The last day it's valid (YYYY-MM-DD)

**Example output**

```json
{
  "currency": "EUR",
  "customer": "Acme Corp",
  "customer_email": "billing@acme.example.com",
  "customer_id": 12,
  "customer_ref": "RFQ-77",
  "date": "2026-11-05",
  "id": 9,
  "lines": [
    {
      "description": "Consulting hour",
      "discount_percent": 0,
      "product_id": 1,
      "product_ref": "CONSULT-HOUR",
      "quantity": 2,
      "total": 216,
      "total_excl_tax": 180,
      "unit_price": 90,
      "vat_rate": 20
    }
  ],
  "link": "https://erp.example.com/comm/propal/card.php?id=9",
  "note_public": "",
  "ref": "PR2611-0003",
  "status": "signed",
  "total": 216,
  "total_excl_tax": 180,
  "total_tax": 36,
  "valid_until": "2026-12-05"
}
```

### Create contact

Add a contact person, at a third party or on their own. If one at that third party already has the email address, it's returned instead, unchanged.

**Inputs**

- Last name (`last_name`, text, required): Their last name.
- First name (`first_name`, text): Their first name.
- Third party (`third_party`, text): The company they work at: picked, or its ID, email address or exact name. Leave blank for a contact on their own.
- Email (`email`, text): Their email address.
- Phone (`phone`, text): Their work phone.
- Mobile (`mobile`, text): Their mobile phone.
- Job title (`job_title`, text): Their job title, such as Buyer.

**Outputs**

- `created` (true/false): False when one with that email address was already there
- `created_at` (text): When they were added (ISO 8601)
- `email` (text): Their email address
- `first_name` (text): Their first name
- `id` (number): The contact's ID
- `job_title` (text): Their job title
- `last_name` (text): Their last name
- `link` (text): A link to them in Dolibarr
- `mobile` (text): Their mobile phone
- `name` (text): Their full name
- `phone` (text): Their work phone
- `third_party` (text): The third party's name
- `third_party_id` (number): The ID of the third party they're at; 0 if none

**Example output**

```json
{
  "created": true,
  "created_at": "2026-11-05T09:15:02Z",
  "email": "jane@acme.example.com",
  "first_name": "Jane",
  "id": 31,
  "job_title": "Buyer",
  "last_name": "Doe",
  "link": "https://erp.example.com/contact/card.php?id=31",
  "mobile": "+33 6 00 00 00 02",
  "name": "Jane Doe",
  "phone": "+33 1 00 00 00 01",
  "third_party": "Acme Corp",
  "third_party_id": 12
}
```

### Create invoice

Make a customer invoice with its lines, as a draft or validated with its number.

**Inputs**

- Customer (`customer`, text, required): Who it's for: picked, or their ID, email address or exact name.
- Lines (`lines`, list, required): One row per line: a product's ref, or a description and a unit price. A product's line takes its price and VAT rate unless the row gives them.
- Validate (`validate`, true/false): Validate it straight away, which gives it its number. Otherwise it stays a draft you can change in Dolibarr. Default: `false`.
- Date (`date`, date): The date it's dated. Leave blank for today.
- Customer reference (`customer_ref`, text): The customer's own reference, such as their order number.
- Payment terms (`payment_terms`, text): When payment is due, such as 30 days. Leave blank for the customer's own terms.
- Payment mode (`payment_mode`, text): How the customer is asked to pay, such as Credit Transfer.
- Bank account (`bank_account`, text): The account the customer pays into, printed on the invoice.
- Public note (`note_public`, text): A note printed on the document for the customer.
- Private note (`note_private`, text): A note only your team sees.

**Outputs**

- `currency` (text): The currency, such as EUR
- `customer` (text): The customer's name
- `customer_email` (text): The customer's email address
- `customer_id` (number): The customer's ID
- `customer_ref` (text): The customer's own reference, such as their order number
- `date` (text): The invoice date (YYYY-MM-DD)
- `due_date` (text): When payment is due (YYYY-MM-DD)
- `id` (number): The invoice's ID, for other Dolibarr steps
- `lines` (list): Its lines, in order
- `link` (text): A link to it in Dolibarr
- `note_private` (text): The private note
- `note_public` (text): The note printed on the invoice
- `paid` (number): How much has been paid
- `ref` (text): Its number, such as FA2611-0001; (PROV12) while a draft
- `remaining` (number): How much is left to pay
- `status` (text): draft, unpaid, paid or abandoned
- `total` (number): The total with tax
- `total_excl_tax` (number): The total before tax
- `total_tax` (number): The VAT
- `type` (text): standard, replacement, credit_note or deposit

**Example output**

```json
{
  "currency": "EUR",
  "customer": "Acme Corp",
  "customer_email": "billing@acme.example.com",
  "customer_id": 12,
  "customer_ref": "PO-1234",
  "date": "2026-11-05",
  "due_date": "2026-12-05",
  "id": 41,
  "lines": [
    {
      "description": "Consulting hour",
      "discount_percent": 0,
      "product_id": 1,
      "product_ref": "CONSULT-HOUR",
      "quantity": 2,
      "total": 216,
      "total_excl_tax": 180,
      "unit_price": 90,
      "vat_rate": 20
    }
  ],
  "link": "https://erp.example.com/compta/facture/card.php?facid=41",
  "note_private": "",
  "note_public": "Thank you for your business.",
  "paid": 0,
  "ref": "FA2611-0001",
  "remaining": 216,
  "status": "unpaid",
  "total": 216,
  "total_excl_tax": 180,
  "total_tax": 36,
  "type": "standard"
}
```

### Create proposal

Make a proposal (a quote) for a customer with its lines, as a draft or validated with its number.

**Inputs**

- Customer (`customer`, text, required): Who it's for: picked, or their ID, email address or exact name.
- Lines (`lines`, list, required): One row per line: a product's ref, or a description and a unit price. A product's line takes its price and VAT rate unless the row gives them.
- Validate (`validate`, true/false): Validate it straight away, which gives it its number, ready to send. Otherwise it stays a draft. Default: `false`.
- Date (`date`, date): The date it's dated. Leave blank for today.
- Valid for (days) (`valid_days`, number): How many days the offer stands. Defaults to 30. From 1 to 3650.
- Customer reference (`customer_ref`, text): The customer's own reference, such as their order number.
- Payment terms (`payment_terms`, text): When payment is due, such as 30 days. Leave blank for the customer's own terms.
- Payment mode (`payment_mode`, text): How the customer is asked to pay, such as Credit Transfer.
- Public note (`note_public`, text): A note printed on the document for the customer.
- Private note (`note_private`, text): A note only your team sees.

**Outputs**

- `currency` (text): The currency, such as EUR
- `customer` (text): The customer's name
- `customer_email` (text): The customer's email address
- `customer_id` (number): The customer's ID
- `customer_ref` (text): The customer's own reference
- `date` (text): The proposal date (YYYY-MM-DD)
- `id` (number): The proposal's ID, for other Dolibarr steps
- `lines` (list): Its lines, in order
- `link` (text): A link to it in Dolibarr
- `note_public` (text): The note printed on the proposal
- `ref` (text): Its number, such as PR2611-0001; (PROV12) while a draft
- `status` (text): draft, open, signed, not_signed or billed
- `total` (number): The total with tax
- `total_excl_tax` (number): The total before tax
- `total_tax` (number): The VAT
- `valid_until` (text): The last day it's valid (YYYY-MM-DD)

**Example output**

```json
{
  "currency": "EUR",
  "customer": "Acme Corp",
  "customer_email": "billing@acme.example.com",
  "customer_id": 12,
  "customer_ref": "RFQ-77",
  "date": "2026-11-05",
  "id": 9,
  "lines": [
    {
      "description": "Consulting hour",
      "discount_percent": 0,
      "product_id": 1,
      "product_ref": "CONSULT-HOUR",
      "quantity": 2,
      "total": 216,
      "total_excl_tax": 180,
      "unit_price": 90,
      "vat_rate": 20
    }
  ],
  "link": "https://erp.example.com/comm/propal/card.php?id=9",
  "note_public": "",
  "ref": "PR2611-0003",
  "status": "open",
  "total": 216,
  "total_excl_tax": 180,
  "total_tax": 36,
  "valid_until": "2026-12-05"
}
```

### Create third party

Add a customer, prospect or supplier. If one already has the email address, it's returned instead, unchanged.

**Inputs**

- Name (`name`, text, required): The company's or person's name.
- Type (`type`, text): What they are to you. One of: `customer`, `prospect`, `customer_and_prospect` (Customer and prospect), `supplier`, `customer_and_supplier` (Customer and supplier), `other` (Neither customer nor supplier). Default: `customer`.
- Email (`email`, text): Its email address.
- Phone (`phone`, text): Its phone number.
- Address (`address`, text): The street address.
- Postcode (`zip_code`, text): The postcode or ZIP code.
- Town (`town`, text): The town or city.
- Country (`country`, text): The country's two-letter code, such as FR or US, or its name.
- Alias (`alias`, text): Another name it goes by, such as a trading name.
- VAT number (`vat_number`, text): Its VAT number.
- Website (`website`, text): Its website.
- Private note (`note`, text): A note only your team sees.

**Outputs**

- `address` (text): Its street address
- `alias` (text): Its other name, such as a trading name
- `country_code` (text): Its country's two-letter code, such as FR
- `created` (true/false): False when one with that email address was already there
- `created_at` (text): When it was added (ISO 8601)
- `customer` (true/false): Whether it's a customer
- `customer_code` (text): Its customer code, such as CU2611-00001
- `email` (text): Its email address
- `id` (number): The third party's ID, for other Dolibarr steps
- `link` (text): A link to it in Dolibarr
- `name` (text): Its name
- `note` (text): Its private note
- `open` (true/false): Whether it's open (not closed)
- `phone` (text): Its phone number
- `prospect` (true/false): Whether it's a prospect
- `supplier` (true/false): Whether it's a supplier
- `supplier_code` (text): Its supplier code
- `town` (text): Its town
- `vat_number` (text): Its VAT number
- `website` (text): Its website
- `zip` (text): Its postcode

**Example output**

```json
{
  "address": "1 rue de la Paix",
  "alias": "Acme",
  "country_code": "FR",
  "created": true,
  "created_at": "2026-11-05T09:12:44Z",
  "customer": true,
  "customer_code": "CU2611-00012",
  "email": "billing@acme.example.com",
  "id": 12,
  "link": "https://erp.example.com/societe/card.php?socid=12",
  "name": "Acme Corp",
  "note": "",
  "open": true,
  "phone": "+33123456789",
  "prospect": false,
  "supplier": false,
  "supplier_code": "",
  "town": "Paris",
  "vat_number": "FR40303265045",
  "website": "https://acme.example.com",
  "zip": "75002"
}
```

### Download invoice PDF

Save an invoice's PDF as a file in Lodol, to attach to an email or store elsewhere. It's made afresh, with the payments so far.

**Inputs**

- Invoice (`invoice`, text, required): The invoice's ID, its number (such as FA2611-0001) or its link.

**Outputs**

- `content_type` (text): Its type, application/pdf
- `document_ref` (text): The file in Lodol, to pass to a later step
- `filename` (text): The file's name, such as FA2611-0001.pdf
- `invoice_id` (number): The invoice's ID
- `ref` (text): The invoice's number
- `size_bytes` (number): Its size in bytes
- `status` (text): The invoice's status
- `url` (text): A link to the file in Lodol

**Example output**

```json
{
  "content_type": "application/pdf",
  "document_ref": "doc_6f1d3c1e58a14c879a4b2f5e",
  "filename": "FA2611-0001.pdf",
  "invoice_id": 41,
  "ref": "FA2611-0001",
  "size_bytes": 9038,
  "status": "unpaid",
  "url": "/actions/core/serve-document/doc_6f1d3c1e58a14c879a4b2f5e?teamId=65f0c0ffee0000000000abcd"
}
```

### Download proposal PDF

Save a proposal's PDF as a file in Lodol, to email to the customer.

**Inputs**

- Proposal (`proposal`, text, required): The proposal's ID, its number (such as PR2611-0001) or its link.

**Outputs**

- `content_type` (text): Its type, application/pdf
- `document_ref` (text): The file in Lodol, to pass to a later step
- `filename` (text): The file's name, such as FA2611-0001.pdf
- `proposal_id` (number): The proposal's ID
- `ref` (text): The proposal's number
- `size_bytes` (number): Its size in bytes
- `status` (text): The proposal's status
- `url` (text): A link to the file in Lodol

**Example output**

```json
{
  "content_type": "application/pdf",
  "document_ref": "doc_6f1d3c1e58a14c879a4b2f5e",
  "filename": "PR2611-0003.pdf",
  "proposal_id": 9,
  "ref": "PR2611-0003",
  "size_bytes": 9038,
  "status": "open",
  "url": "/actions/core/serve-document/doc_6f1d3c1e58a14c879a4b2f5e?teamId=65f0c0ffee0000000000abcd"
}
```

### Find invoices

Find customer invoices by status, customer, number or date, such as every unpaid or overdue one, newest first.

**Inputs**

- Status (`status`, text): Which invoices. One of: `any`, `draft`, `unpaid`, `paid`, `abandoned`. Default: `any`.
- Customer (`customer`, text): Only this customer's invoices.
- Only overdue (`overdue_only`, true/false): Only unpaid invoices past their due date. Default: `false`.
- Number or reference (`search`, text): Words in the invoice's number or the customer's reference.
- Dated from (`date_from`, date): Only invoices dated on or after this day.
- Dated to (`date_to`, date): Only invoices dated on or before this day.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `amount_remaining` (number): What is left to pay on the invoices listed, added up
- `count` (number): How many are listed
- `invoices` (list): The invoices found, newest first
- `total` (number): How many match in all

**Example output**

```json
{
  "amount_remaining": 216,
  "count": 1,
  "invoices": [
    {
      "currency": "EUR",
      "customer": "Acme Corp",
      "customer_email": "billing@acme.example.com",
      "customer_id": 12,
      "customer_ref": "PO-1234",
      "date": "2026-11-05",
      "due_date": "2026-12-05",
      "id": 41,
      "link": "https://erp.example.com/compta/facture/card.php?facid=41",
      "note_private": "",
      "note_public": "Thank you for your business.",
      "paid": 0,
      "ref": "FA2611-0001",
      "remaining": 216,
      "status": "unpaid",
      "total": 216,
      "total_excl_tax": 180,
      "total_tax": 36,
      "type": "standard"
    }
  ],
  "total": 1
}
```

### Find products

Find products and services by words in their ref, label or barcode, with their price and VAT rate.

**Inputs**

- Search (`search`, text): Words in the ref, label or barcode.
- Type (`type`, text): Products, services or both. One of: `any` (Products and services), `product` (Products), `service` (Services). Default: `any`.
- Only for sale (`on_sale_only`, true/false): Leave out those not for sale. Default: `false`.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `products` (list): The products and services found, by ref
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "products": [
    {
      "barcode": "",
      "description": "A blue widget",
      "id": 2,
      "label": "Blue widget",
      "link": "https://erp.example.com/product/card.php?id=2",
      "on_purchase": true,
      "on_sale": true,
      "price": 12.5,
      "price_incl_tax": 15,
      "ref": "WIDGET-01",
      "stock": 40,
      "type": "product",
      "vat_rate": 20
    }
  ],
  "total": 1
}
```

### Find third parties

Find customers, prospects and suppliers by words in their name, alias, email or customer code, newest first.

**Inputs**

- Search (`search`, text): Words in the name, alias, email address or customer code.
- Email (`email`, text): Only those with this email address.
- Type (`type`, text): Which kind of third party. One of: `any`, `customers`, `prospects`, `suppliers`. Default: `any`.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `third_parties` (list): The third parties found, newest first
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "third_parties": [
    {
      "address": "1 rue de la Paix",
      "alias": "Acme",
      "country_code": "FR",
      "created_at": "2026-11-05T09:12:44Z",
      "customer": true,
      "customer_code": "CU2611-00012",
      "email": "billing@acme.example.com",
      "id": 12,
      "link": "https://erp.example.com/societe/card.php?socid=12",
      "name": "Acme Corp",
      "note": "",
      "open": true,
      "phone": "+33123456789",
      "prospect": false,
      "supplier": false,
      "supplier_code": "",
      "town": "Paris",
      "vat_number": "FR40303265045",
      "website": "https://acme.example.com",
      "zip": "75002"
    }
  ],
  "total": 1
}
```

### Get invoice

Get an invoice's details, its lines and the payments made on it.

**Inputs**

- Invoice (`invoice`, text, required): The invoice's ID, its number (such as FA2611-0001) or its link.

**Outputs**

- `currency` (text): The currency, such as EUR
- `customer` (text): The customer's name
- `customer_email` (text): The customer's email address
- `customer_id` (number): The customer's ID
- `customer_ref` (text): The customer's own reference, such as their order number
- `date` (text): The invoice date (YYYY-MM-DD)
- `due_date` (text): When payment is due (YYYY-MM-DD)
- `id` (number): The invoice's ID, for other Dolibarr steps
- `lines` (list): Its lines, in order
- `link` (text): A link to it in Dolibarr
- `note_private` (text): The private note
- `note_public` (text): The note printed on the invoice
- `paid` (number): How much has been paid
- `payments` (list): The payments made on it
- `ref` (text): Its number, such as FA2611-0001; (PROV12) while a draft
- `remaining` (number): How much is left to pay
- `status` (text): draft, unpaid, paid or abandoned
- `total` (number): The total with tax
- `total_excl_tax` (number): The total before tax
- `total_tax` (number): The VAT
- `type` (text): standard, replacement, credit_note or deposit

**Example output**

```json
{
  "currency": "EUR",
  "customer": "Acme Corp",
  "customer_email": "billing@acme.example.com",
  "customer_id": 12,
  "customer_ref": "PO-1234",
  "date": "2026-11-05",
  "due_date": "2026-12-05",
  "id": 41,
  "lines": [
    {
      "description": "Consulting hour",
      "discount_percent": 0,
      "product_id": 1,
      "product_ref": "CONSULT-HOUR",
      "quantity": 2,
      "total": 216,
      "total_excl_tax": 180,
      "unit_price": 90,
      "vat_rate": 20
    }
  ],
  "link": "https://erp.example.com/compta/facture/card.php?facid=41",
  "note_private": "",
  "note_public": "Thank you for your business.",
  "paid": 100,
  "payments": [
    {
      "amount": 100,
      "date": "2026-11-06",
      "payment_mode": "VIR",
      "ref": "PAY2611-0001",
      "reference": "TX-88213"
    }
  ],
  "ref": "FA2611-0001",
  "remaining": 116,
  "status": "unpaid",
  "total": 216,
  "total_excl_tax": 180,
  "total_tax": 36,
  "type": "standard"
}
```

### Get third party

Get a customer's, prospect's or supplier's details, by ID, email address or name.

**Inputs**

- Third party (`third_party`, text, required): The third party: picked, or its ID, email address or exact name.

**Outputs**

- `address` (text): Its street address
- `alias` (text): Its other name, such as a trading name
- `country_code` (text): Its country's two-letter code, such as FR
- `created_at` (text): When it was added (ISO 8601)
- `customer` (true/false): Whether it's a customer
- `customer_code` (text): Its customer code, such as CU2611-00001
- `email` (text): Its email address
- `id` (number): The third party's ID, for other Dolibarr steps
- `link` (text): A link to it in Dolibarr
- `name` (text): Its name
- `note` (text): Its private note
- `open` (true/false): Whether it's open (not closed)
- `phone` (text): Its phone number
- `prospect` (true/false): Whether it's a prospect
- `supplier` (true/false): Whether it's a supplier
- `supplier_code` (text): Its supplier code
- `town` (text): Its town
- `vat_number` (text): Its VAT number
- `website` (text): Its website
- `zip` (text): Its postcode

**Example output**

```json
{
  "address": "1 rue de la Paix",
  "alias": "Acme",
  "country_code": "FR",
  "created_at": "2026-11-05T09:12:44Z",
  "customer": true,
  "customer_code": "CU2611-00012",
  "email": "billing@acme.example.com",
  "id": 12,
  "link": "https://erp.example.com/societe/card.php?socid=12",
  "name": "Acme Corp",
  "note": "",
  "open": true,
  "phone": "+33123456789",
  "prospect": false,
  "supplier": false,
  "supplier_code": "",
  "town": "Paris",
  "vat_number": "FR40303265045",
  "website": "https://acme.example.com",
  "zip": "75002"
}
```

### Update third party

Change a third party's details or type. Blank fields stay as they are.

**Inputs**

- Third party (`third_party`, text, required): The third party: picked, or its ID, email address or exact name.
- Name (`name`, text): A new name. Leave blank to keep it.
- Type (`type`, text): What they are to you now. Leave blank to keep it. One of: `customer`, `prospect`, `customer_and_prospect` (Customer and prospect), `supplier`, `customer_and_supplier` (Customer and supplier), `other` (Neither customer nor supplier).
- Email (`email`, text): Its email address. Leave blank to keep it.
- Phone (`phone`, text): Its phone number. Leave blank to keep it.
- Address (`address`, text): The street address. Leave blank to keep it.
- Postcode (`zip_code`, text): The postcode or ZIP code. Leave blank to keep it.
- Town (`town`, text): The town or city. Leave blank to keep it.
- Country (`country`, text): The country's two-letter code, such as FR or US, or its name. Leave blank to keep it.
- Alias (`alias`, text): Another name it goes by, such as a trading name. Leave blank to keep it.
- VAT number (`vat_number`, text): Its VAT number. Leave blank to keep it.
- Website (`website`, text): Its website. Leave blank to keep it.
- Private note (`note`, text): A note only your team sees. Replaces the note there. Leave blank to keep it.

**Outputs**

- `address` (text): Its street address
- `alias` (text): Its other name, such as a trading name
- `country_code` (text): Its country's two-letter code, such as FR
- `created_at` (text): When it was added (ISO 8601)
- `customer` (true/false): Whether it's a customer
- `customer_code` (text): Its customer code, such as CU2611-00001
- `email` (text): Its email address
- `id` (number): The third party's ID, for other Dolibarr steps
- `link` (text): A link to it in Dolibarr
- `name` (text): Its name
- `note` (text): Its private note
- `open` (true/false): Whether it's open (not closed)
- `phone` (text): Its phone number
- `prospect` (true/false): Whether it's a prospect
- `supplier` (true/false): Whether it's a supplier
- `supplier_code` (text): Its supplier code
- `town` (text): Its town
- `vat_number` (text): Its VAT number
- `website` (text): Its website
- `zip` (text): Its postcode

**Example output**

```json
{
  "address": "1 rue de la Paix",
  "alias": "Acme",
  "country_code": "FR",
  "created_at": "2026-11-05T09:12:44Z",
  "customer": true,
  "customer_code": "CU2611-00012",
  "email": "billing@acme.example.com",
  "id": 12,
  "link": "https://erp.example.com/societe/card.php?socid=12",
  "name": "Acme Corp",
  "note": "",
  "open": true,
  "phone": "+33123456789",
  "prospect": false,
  "supplier": false,
  "supplier_code": "",
  "town": "Paris",
  "vat_number": "FR40303265045",
  "website": "https://acme.example.com",
  "zip": "75002"
}
```

### Validate invoice

Validate a draft invoice, which gives it its number. It can't be changed after. An invoice already validated is returned as it is.

**Inputs**

- Invoice (`invoice`, text, required): The invoice's ID, its number (such as FA2611-0001) or its link.

**Outputs**

- `currency` (text): The currency, such as EUR
- `customer` (text): The customer's name
- `customer_email` (text): The customer's email address
- `customer_id` (number): The customer's ID
- `customer_ref` (text): The customer's own reference, such as their order number
- `date` (text): The invoice date (YYYY-MM-DD)
- `due_date` (text): When payment is due (YYYY-MM-DD)
- `id` (number): The invoice's ID, for other Dolibarr steps
- `lines` (list): Its lines, in order
- `link` (text): A link to it in Dolibarr
- `note_private` (text): The private note
- `note_public` (text): The note printed on the invoice
- `paid` (number): How much has been paid
- `ref` (text): Its number, such as FA2611-0001; (PROV12) while a draft
- `remaining` (number): How much is left to pay
- `status` (text): draft, unpaid, paid or abandoned
- `total` (number): The total with tax
- `total_excl_tax` (number): The total before tax
- `total_tax` (number): The VAT
- `type` (text): standard, replacement, credit_note or deposit

**Example output**

```json
{
  "currency": "EUR",
  "customer": "Acme Corp",
  "customer_email": "billing@acme.example.com",
  "customer_id": 12,
  "customer_ref": "PO-1234",
  "date": "2026-11-05",
  "due_date": "2026-12-05",
  "id": 41,
  "lines": [
    {
      "description": "Consulting hour",
      "discount_percent": 0,
      "product_id": 1,
      "product_ref": "CONSULT-HOUR",
      "quantity": 2,
      "total": 216,
      "total_excl_tax": 180,
      "unit_price": 90,
      "vat_rate": 20
    }
  ],
  "link": "https://erp.example.com/compta/facture/card.php?facid=41",
  "note_private": "",
  "note_public": "Thank you for your business.",
  "paid": 0,
  "ref": "FA2611-0001",
  "remaining": 216,
  "status": "unpaid",
  "total": 216,
  "total_excl_tax": 180,
  "total_tax": 36,
  "type": "standard"
}
```
