POST /quote

Crée un nouveau devis.

Numérotation automatique:

  • Si l'état est 'pending', 'waiting', 'accepted', 'refused', 'invoiced' ou 'canceled', un numéro est automatiquement attribué
  • Le créateur (positionCreator) et l'assigné (positionAssigned) sont automatiquement définis

Types de documents:

  • quote: Devis standard
  • proforma: Facture proforma
  • bdc: Bon de commande

Calculs automatiques:

  • Les totaux HT, TVA et TTC sont calculés automatiquement

Événement déclenché: CREATE_QUOTE

application/json

Body Required

  • client string

    ID du client

  • client_name string

    Nom du client (si pas de client référencé)

  • client_address string
  • client_city string
  • client_zip_code string
  • client_country string

    Default value is France.

  • client_email string(email)
  • date string(date-time)

    Date du devis (défaut = maintenant)

  • expiry_date string(date-time)

    Date de validité

  • state string

    État initial

    Values are draft, pending, waiting, accepted, or refused. Default value is draft.

  • type string

    Type de document

    Values are quote, proforma, or bdc. Default value is quote.

  • title string

    Titre/objet du devis

  • quote_lines array[object]

    Lignes du devis

    Hide quote_lines attributes Show quote_lines attributes object
    • title string
    • description string
    • reference string
    • product string

      ID du produit (optionnel)

    • price_ht number
    • quantity number

      Default value is 1.

    • tva_rate number
    • unit string
    • type string

      Values are product, header, subtotal, or globalDiscount. Default value is product.

    • discount number

Responses

  • 201 application/json

    Devis créé

    Hide response attribute Show response attribute object
    • newQuote object
      Hide newQuote attributes Show newQuote attributes object
      • _id string

        Unique identifier for the quote

      • VATRates array[object]

        List of VAT rates applied to the quote

        Hide VATRates attributes Show VATRates attributes object
        • amount number

          Amount of VAT

        • rate string

          VAT rate

        • total number

          Total amount with this VAT rate

      • accept_date string(date-time)

        Date when the quote was accepted

      • acomptes array[object]

        List of advance payments

        Hide acomptes attributes Show acomptes attributes object
        • _id string
        • amount number

          Amount of the advance payment

        • amount_ht number

          Amount without tax

        • credit boolean

          If it's a credit note

          Default value is false.

        • date string(date-time)
        • sold boolean

          Default value is false.

        • number string
        • type string

          Type of payment

          Values are advance, sold, credit, or invoice.

      • base_currency string

        The currency with which the company works for this quote

        Default value is EUR.

      • client string

        Reference to the client

      • client_name string

        Name of the client

      • client_address string

        Address of the client

      • client_city string

        City of the client

      • client_zip_code string

        Zip code of the client

      • client_country string

        Country of the client

        Default value is France.

      • client_email string

        Email of the client

      • client_phone string

        Phone number of the client

      • company string

        Reference to the company

      • company_name string

        Name of the company

      • date string(date-time)

        Date of the quote

      • expiry_date string(date-time)

        Expiry date of the quote

      • quote_lines array[object]

        List of quote lines

        Hide quote_lines attributes Show quote_lines attributes object
        • _id string

          Unique identifier for the line

        • description string

          Description of the line

        • price_ht number

          Price without tax

          Default value is 0.

        • quantity number

          Quantity

          Default value is 1.

        • reference string

          Reference of the product

        • title string

          Title of the line

        • total_ht number

          Total amount without tax

          Default value is 0.

        • total_ttc number

          Total amount with tax

          Default value is 0.

        • tva_rate number

          VAT rate

        • type string

          Type of the line

          Values are product, header, subtotal, or globalDiscount. Default value is product.

        • unit string

          Unit of measurement

      • number string

        Quote number

      • state string

        State of the quote

        Values are invoiced, refused, accepted, waiting, draft, canceled, or inactive. Default value is waiting.

      • title string

        Short description or label of the quote

      • total_ht number

        Total amount without tax

      • total_ttc number

        Total amount with tax

      • total_tva number

        Total tax amount

      • type string

        Type of the quote

        Values are quote, proforma, or bdc. Default value is quote.

  • 400

    Données invalides

POST /quote
curl \
 --request POST 'https://wuro.pro/api/v3.2/quote' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"client":"string","client_name":"string","client_address":"string","client_city":"string","client_zip_code":"string","client_country":"France","client_email":"hello@example.com","date":"2025-05-04T09:42:00Z","expiry_date":"2025-05-04T09:42:00Z","state":"draft","type":"quote","title":"string","quote_lines":[{"title":"string","description":"string","reference":"string","product":"string","price_ht":42.0,"quantity":1,"tva_rate":42.0,"unit":"string","type":"product","discount":42.0}]}'
Request examples
{
  "client": "string",
  "client_name": "string",
  "client_address": "string",
  "client_city": "string",
  "client_zip_code": "string",
  "client_country": "France",
  "client_email": "hello@example.com",
  "date": "2025-05-04T09:42:00Z",
  "expiry_date": "2025-05-04T09:42:00Z",
  "state": "draft",
  "type": "quote",
  "title": "string",
  "quote_lines": [
    {
      "title": "string",
      "description": "string",
      "reference": "string",
      "product": "string",
      "price_ht": 42.0,
      "quantity": 1,
      "tva_rate": 42.0,
      "unit": "string",
      "type": "product",
      "discount": 42.0
    }
  ]
}
Response examples (201)
{
  "newQuote": {
    "_id": "string",
    "VATRates": [
      {
        "amount": 42.0,
        "rate": "string",
        "total": 42.0
      }
    ],
    "accept_date": "2025-05-04T09:42:00Z",
    "acomptes": [
      {
        "_id": "string",
        "amount": 42.0,
        "amount_ht": 42.0,
        "credit": false,
        "date": "2025-05-04T09:42:00Z",
        "sold": false,
        "number": "string",
        "type": "advance"
      }
    ],
    "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",
    "expiry_date": "2025-05-04T09:42:00Z",
    "quote_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": "waiting",
    "title": "string",
    "total_ht": 42.0,
    "total_ttc": 42.0,
    "total_tva": 42.0,
    "type": "quote"
  }
}