POST /invoice/{uid}/mail

Envoie la facture par email au client.

Restrictions:

  • La facture ne doit pas être en brouillon

Personnalisation:

  • Utilise les modèles d'email configurés dans l'entreprise
  • Variables disponibles: [lien-html], [lien-pdf], [facture-numero], [facture-date], [contact-nom], etc.

Options:

  • action: 'send_invoice' (envoi standard) ou 'dunning_invoice' (relance)
  • joinPdf: true pour joindre le PDF en pièce jointe
  • Possibilité de personnaliser subject, content, to, copyto, replyTo

Path parameters

  • uid string Required

    ID de la facture

application/json

Body

  • action string

    Type d'envoi (envoi ou relance)

    Values are send_invoice or dunning_invoice. Default value is send_invoice.

  • to string(email)

    Email du destinataire (défaut = email du client)

  • subject string

    Objet personnalisé

  • content string

    Contenu personnalisé

  • copyto string(email)

    Email en copie

  • replyTo string(email)

    Email pour les réponses

  • joinPdf boolean

    Joindre le PDF en pièce jointe

    Default value is false.

Responses

  • 200 application/json

    Email envoyé

    Hide response attributes Show response attributes object
    • resultId string

      ID de l'email envoyé

    • html string

      Contenu HTML de l'email

    • subject string
  • 400

    Facture en brouillon ou action non reconnue

POST /invoice/{uid}/mail
curl \
 --request POST 'https://wuro.pro/api/v3.2/invoice/{uid}/mail' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"action":"send_invoice","to":"hello@example.com","subject":"string","content":"string","copyto":"hello@example.com","replyTo":"hello@example.com","joinPdf":false}'
Request examples
{
  "action": "send_invoice",
  "to": "hello@example.com",
  "subject": "string",
  "content": "string",
  "copyto": "hello@example.com",
  "replyTo": "hello@example.com",
  "joinPdf": false
}
Response examples (200)
{
  "resultId": "string",
  "html": "string",
  "subject": "string"
}