> ## Documentation Index
> Fetch the complete documentation index at: https://mcp.klark.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Factures, BC & BL

> 27 outils — Factures, devis, bons de commande, bons de livraison et paiements

## list\_invoices

`Lecture seule`

List invoices and quotes with pagination and filters

<ParamField body="page" type="number" default="1">
  Page number
</ParamField>

<ParamField body="limit" type="number" default="10">
  Items per page (max 50)
</ParamField>

<ParamField body="status" type="string">
  Filter by status — Valeurs : draft | sent | partially\_paid | paid | overdue | cancelled
</ParamField>

<ParamField body="type" type="string">
  Filter by type — Valeurs : invoice | quote
</ParamField>

## get\_invoice

`Lecture seule`

Get full details of an invoice or quote by ID

<ParamField body="invoiceId" type="string" required>
  The invoice ID
</ParamField>

## create\_invoice

`Écriture`

Create a new invoice or quote and generate its PDF. Use get\_client first to retrieve the client's address IDs (client.addresses\[].\_id).

<ParamField body="clientId" type="string" required>
  Client ID
</ParamField>

<ParamField body="billingAddressId" type="string" required>
  Billing address ID — one of client.addresses\[].\_id. Use get\_client to retrieve the address list first.
</ParamField>

<ParamField body="type" type="string" default="invoice">
  Document type — Valeurs : invoice | quote
</ParamField>

<ParamField body="items" type="array" required>
  Line items
</ParamField>

<ParamField body="adjustments" type="array">
  Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)
</ParamField>

<ParamField body="deliveryAddressId" type="string">
  Delivery address ID (optional)
</ParamField>

<ParamField body="dueDate" type="string">
  Due date (ISO format)
</ParamField>

<ParamField body="notes" type="string">
  Public notes on the document
</ParamField>

<ParamField body="terms" type="string">
  Payment terms text
</ParamField>

## get\_invoice\_payments

`Lecture seule`

Get all recorded payments for a specific invoice

<ParamField body="invoiceId" type="string" required>
  The invoice ID
</ParamField>

## record\_payment

`Écriture`

Record a payment (partial or full) on an invoice. Automatically updates amountPaid, balanceDue and invoice status.

<ParamField body="invoiceId" type="string" required>
  The invoice ID
</ParamField>

<ParamField body="amount" type="number" required>
  Payment amount (in the invoice currency)
</ParamField>

<ParamField body="method" type="string" default="other">
  Payment method (must match the invoice model enum) — Valeurs : bank\_transfer | card | cash | check | other
</ParamField>

<ParamField body="date" type="string">
  Payment date (ISO format, defaults to today)
</ParamField>

<ParamField body="note" type="string">
  Optional note about this payment
</ParamField>

## delete\_payment

`Écriture — destructif`

Delete a recorded payment from an invoice and recalculate the balance

<ParamField body="invoiceId" type="string" required>
  The invoice ID
</ParamField>

<ParamField body="paymentId" type="string" required>
  The payment ID to delete (from invoice.payments\[].\_id)
</ParamField>

## schedule\_invoice\_reminder

`Écriture`

Schedule an email reminder for an invoice (e.g. before or after due date)

<ParamField body="invoiceId" type="string" required>
  The invoice ID
</ParamField>

<ParamField body="date" type="string" required>
  Date to send the reminder (ISO format, e.g. "2025-12-01T09:00:00Z")
</ParamField>

<ParamField body="type" type="string" default="before_due">
  Reminder type — Valeurs : before\_due | after\_due
</ParamField>

<ParamField body="channel" type="string" default="email">
  Notification channel — Valeurs : email | sms
</ParamField>

## update\_invoice\_status

`Écriture`

Update the status of an invoice or quote

<ParamField body="invoiceId" type="string" required>
  The invoice ID
</ParamField>

<ParamField body="status" type="string" required>
  New status. L'envoi (« sent ») et l'annulation (« cancelled ») se font manuellement dans Klark après vérification — non disponibles via l'assistant. — Valeurs : draft | partially\_paid | paid | overdue
</ParamField>

## delete\_invoice

`Écriture — destructif`

Delete a draft invoice and its PDF

<ParamField body="invoiceId" type="string" required>
  The invoice ID to delete
</ParamField>

## send\_e\_invoice

`Écriture — service externe`

Send an invoice electronically via SuperPDP (e-invoicing)

<ParamField body="invoiceId" type="string" required>
  The invoice ID to send electronically
</ParamField>

## get\_e\_invoice\_status

`Lecture seule`

Get the e-invoicing status of an invoice from SuperPDP

<ParamField body="invoiceId" type="string" required>
  The invoice ID
</ParamField>

## download\_invoice\_pdf

`Lecture seule`

Get the PDF download URL for an invoice

<ParamField body="invoiceId" type="string" required>
  The invoice ID
</ParamField>

## list\_purchase\_orders

`Lecture seule`

List purchase orders (BC) received from clients. A purchase order is a document the user RECEIVES from one of their clients (not sent). Use this to count pending POs, find a specific one, or summarize unprocessed orders. Filter by status: received (default), in\_progress, invoiced (converted to invoice), cancelled.

<ParamField body="status" type="string">
  Filter by status. Omit to get all. — Valeurs : draft | received | in\_progress | invoiced | cancelled
</ParamField>

<ParamField body="clientId" type="string">
  Filter by client
</ParamField>

<ParamField body="limit" type="number" default="25">
   
</ParamField>

<ParamField body="page" type="number" default="1">
   
</ParamField>

## get\_purchase\_order

`Lecture seule`

Get full details of a purchase order by ID (including items, totals, client snapshot, and optional OCR source info).

<ParamField body="purchaseOrderId" type="string" required>
  Purchase order ID
</ParamField>

## create\_purchase\_order

`Écriture`

Create a purchase order received from a client (manual data entry, no OCR). For OCR-extracted data from a scanned PO, use create\_purchase\_order\_from\_ocr instead. Use get\_client first to retrieve client.addresses\[].\_id, and get products via list\_products.

<ParamField body="clientId" type="string" required>
  Client ID
</ParamField>

<ParamField body="billingAddressId" type="string" required>
  Billing address ID (one of client.addresses\[].\_id)
</ParamField>

<ParamField body="deliveryAddressId" type="string">
  Delivery address ID (optional)
</ParamField>

<ParamField body="items" type="array" required>
  Line items
</ParamField>

<ParamField body="receivedDate" type="string">
  Date the PO was issued by the client (ISO)
</ParamField>

<ParamField body="clientReference" type="string">
  Client's internal reference (e.g. "PO-2026-042")
</ParamField>

<ParamField body="notes" type="string">
   
</ParamField>

<ParamField body="terms" type="string">
   
</ParamField>

<ParamField body="customFields" type="array">
  Custom fields (numéro client, code avantage, remise, coloris, taille, etc.)
</ParamField>

<ParamField body="adjustments" type="array">
  Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)
</ParamField>

## create\_purchase\_order\_from\_ocr

`Écriture`

Create a purchase order from OCR-extracted data. Use this tool when YOU (the LLM) have scanned a PO document via your own vision capabilities (Claude vision, Gemini multimodal, etc.) and extracted the structured data. Pass `extractedBy` to track which tool was used (e.g. "claude", "gemini", "openai"). The `ocrSource.fileUrl` should point to the original scanned file if available (e.g. Wasabi or any public URL).

<ParamField body="clientId" type="string" required>
  Client ID — use search\_clients if not sure
</ParamField>

<ParamField body="billingAddressId" type="string" required>
  Billing address ID — from client.addresses
</ParamField>

<ParamField body="deliveryAddressId" type="string">
   
</ParamField>

<ParamField body="items" type="array" required>
   
</ParamField>

<ParamField body="receivedDate" type="string">
  Extracted date the client emitted the PO
</ParamField>

<ParamField body="clientReference" type="string">
  Extracted reference from the scanned document
</ParamField>

<ParamField body="notes" type="string">
   
</ParamField>

<ParamField body="customFields" type="array">
  Custom fields (numéro client, code avantage, remise, coloris, taille, etc.)
</ParamField>

<ParamField body="adjustments" type="array">
  Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)
</ParamField>

<ParamField body="ocrSource" type="object" required>
  OCR metadata for traceability
</ParamField>

## update\_purchase\_order

`Écriture`

Update an existing purchase order (status, notes, items, etc.). Cannot update if the PO has already been converted to an invoice — in that case modify the invoice instead.

<ParamField body="purchaseOrderId" type="string" required>
   
</ParamField>

<ParamField body="status" type="string">
  Valeurs : draft | received | in\_progress | invoiced | cancelled
</ParamField>

<ParamField body="notes" type="string">
   
</ParamField>

<ParamField body="terms" type="string">
   
</ParamField>

<ParamField body="items" type="array">
   
</ParamField>

<ParamField body="customFields" type="array">
  Custom fields (numéro client, code avantage, remise, coloris, taille, etc.)
</ParamField>

## delete\_purchase\_order

`Écriture — destructif`

Permanently delete a purchase order. Refused if the PO has been converted to an invoice (the invoice must be deleted first, or mark the PO as cancelled via update\_purchase\_order).

<ParamField body="purchaseOrderId" type="string" required>
   
</ParamField>

## convert\_purchase\_order\_to\_invoice

`Écriture`

Transform a purchase order into an official invoice. Creates a new Invoice with the PO's items, generates the PDF, and marks the PO as `invoiced` with a link to the new invoice. Idempotent: if the PO was already converted, returns the existing invoice. Returns the invoice with its PDF URL for download.

<ParamField body="purchaseOrderId" type="string" required>
   
</ParamField>

<ParamField body="billingAddressId" type="string">
  Override billing address (default: same as PO)
</ParamField>

<ParamField body="deliveryAddressId" type="string">
   
</ParamField>

<ParamField body="dueDate" type="string">
  Invoice due date (ISO). Default: 30 days from now.
</ParamField>

<ParamField body="notes" type="string">
   
</ParamField>

<ParamField body="terms" type="string">
   
</ParamField>

## list\_delivery\_notes

`Lecture seule`

List delivery notes (bons de livraison) with pagination and filters. Filter by sourcePurchaseOrderId to get all delivery notes of a given purchase order.

<ParamField body="status" type="string">
  Valeurs : draft | delivered | cancelled
</ParamField>

<ParamField body="clientId" type="string">
   
</ParamField>

<ParamField body="sourcePurchaseOrderId" type="string">
  Filter by source purchase order
</ParamField>

<ParamField body="limit" type="number" default="25">
   
</ParamField>

<ParamField body="page" type="number" default="1">
   
</ParamField>

## get\_delivery\_note

`Lecture seule`

Get full details of a delivery note by ID (items with delivered quantities, addresses, carrier, link to source purchase order).

<ParamField body="deliveryNoteId" type="string" required>
  Delivery note ID
</ParamField>

## create\_delivery\_note

`Écriture`

Create a delivery note (bon de livraison) — quantities only, no prices. Pass sourcePurchaseOrderId to attach it to a purchase order: this enables partial delivery tracking (delivered quantity must be \<= remaining; over-delivery is blocked). Without it, the delivery note is standalone. Use get\_purchase\_order to read remaining quantities (orderedQuantity - deliveredQuantity) per line.

<ParamField body="clientId" type="string" required>
  Client ID
</ParamField>

<ParamField body="billingAddressId" type="string" required>
  Billing address ID (one of client.addresses\[].\_id)
</ParamField>

<ParamField body="deliveryAddressId" type="string">
  Delivery address ID (optional)
</ParamField>

<ParamField body="items" type="array" required>
  Delivered line items
</ParamField>

<ParamField body="sourcePurchaseOrderId" type="string">
  Source purchase order ID (enables partial delivery tracking)
</ParamField>

<ParamField body="deliveryDate" type="string">
  Delivery date (ISO)
</ParamField>

<ParamField body="carrier" type="string">
   
</ParamField>

<ParamField body="trackingNumber" type="string">
   
</ParamField>

<ParamField body="notes" type="string">
   
</ParamField>

<ParamField body="status" type="string">
  Initial status (default 'delivered') — Valeurs : draft | delivered
</ParamField>

## update\_delivery\_note

`Écriture`

Update a delivery note metadata (status draft|delivered, notes, delivery date, carrier, tracking number). To cancel, use cancel\_delivery\_note instead.

<ParamField body="deliveryNoteId" type="string" required>
   
</ParamField>

<ParamField body="status" type="string">
  Valeurs : draft | delivered
</ParamField>

<ParamField body="notes" type="string">
   
</ParamField>

<ParamField body="deliveryDate" type="string">
   
</ParamField>

<ParamField body="carrier" type="string">
   
</ParamField>

<ParamField body="trackingNumber" type="string">
   
</ParamField>

## cancel\_delivery\_note

`Écriture`

Cancel a delivery note. Restores the delivered quantities back to the remaining-to-deliver of the source purchase order (if any).

<ParamField body="deliveryNoteId" type="string" required>
   
</ParamField>

## get\_delivery\_note\_pdf

`Écriture`

Generate (or return) the stored PDF of a delivery note and return its URL. Pass regenerate=true to force regeneration.

<ParamField body="deliveryNoteId" type="string" required>
   
</ParamField>

<ParamField body="regenerate" type="boolean" default="false">
   
</ParamField>

## convert\_delivery\_note\_to\_invoice

`Écriture`

Invoice a delivery note (facturation au bon de livraison): generates an invoice with the DELIVERED quantities and the unit prices taken from the source purchase order. Idempotent (a delivery note can only be invoiced once). Not available for standalone delivery notes (no source prices).

<ParamField body="deliveryNoteId" type="string" required>
   
</ParamField>

<ParamField body="billingAddressId" type="string">
  Override billing address (defaults to the delivery note one)
</ParamField>

<ParamField body="deliveryAddressId" type="string">
   
</ParamField>

<ParamField body="dueDate" type="string">
  Invoice due date (ISO)
</ParamField>

<ParamField body="notes" type="string">
   
</ParamField>

<ParamField body="terms" type="string">
   
</ParamField>

## send\_delivery\_note

`Écriture`

Send a delivery note by email with the PDF attached (e.g. to a warehouse or subcontractor).

<ParamField body="deliveryNoteId" type="string" required>
   
</ParamField>

<ParamField body="to" type="string" required>
  Recipient email
</ParamField>

<ParamField body="message" type="string">
  Optional custom message
</ParamField>
