Met à jour une ligne existante d'une facture.
Restrictions:
- La facture ne doit pas être numérotée (en brouillon uniquement)
- Une facture validée ne peut pas être modifiée
Comportement:
- Les totaux de la facture sont automatiquement recalculés après modification
- Seuls les champs fournis sont modifiés (mise à jour partielle)
Types de lignes:
- product : Ligne produit standard avec prix et quantité
- header : Ligne de titre/séparation
- subtotal : Sous-total automatique
- globalDiscount : Remise globale
Événement déclenché: UPDATE_INVOICE
PATCH
/invoice/{uid}/line/{lineUuid}
curl \
--request PATCH 'https://wuro.pro/api/v3.2/invoice/{uid}/line/{lineUuid}' \
--header "X-APP-ID: $API_KEY" \
--header "X-APP-SECRET: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"title":"string","description":"string","reference":"string","price_ht":42.0,"quantity":42.0,"tva_rate":42.0,"unit":"string","discount":42.0}'
Request examples
{
"title": "string",
"description": "string",
"reference": "string",
"price_ht": 42.0,
"quantity": 42.0,
"tva_rate": 42.0,
"unit": "string",
"discount": 42.0
}
Response examples (200)
{
"invoice": {
"_id": "string",
"VATRates": [
{
"amount": 42.0,
"rate": "string",
"total": 42.0
}
],
"acomptes": [
{
"_id": "string",
"amount": 42.0,
"amount_ht": 42.0,
"credit": false,
"date": "2025-05-04T09:42:00Z"
}
],
"base_currency": "EUR",
"client": "string",
"client_name": "string",
"client_address": "string",
"client_city": "string",
"client_zip_code": "string",
"client_country": "France",
"client_email": "string",
"client_phone": "string",
"company": "string",
"company_name": "string",
"date": "2025-05-04T09:42:00Z",
"payment_expiry_date": "2025-05-04T09:42:00Z",
"invoice_lines": [
{
"_id": "string",
"description": "string",
"price_ht": 0,
"quantity": 1,
"reference": "string",
"title": "string",
"total_ht": 0,
"total_ttc": 0,
"tva_rate": 42.0,
"type": "product",
"unit": "string"
}
],
"number": "string",
"state": "draft",
"title": "string",
"total_ht": 42.0,
"total_ttc": 42.0,
"total_tva": 42.0,
"type": "invoice",
"payments": [
{
"_id": "string",
"mode": "string",
"method_name": "string",
"amount": 42.0,
"date": "2025-05-04T09:42:00Z",
"check_number": "string"
}
]
},
"line": {
"_id": "string",
"description": "string",
"price_ht": 0,
"quantity": 1,
"reference": "string",
"title": "string",
"total_ht": 0,
"total_ttc": 0,
"tva_rate": 42.0,
"type": "product",
"unit": "string"
}
}