PATCH /delivery-receipt/{uid}

Met à jour un bon de livraison existant.

Gestion de la numérotation

Si le bon passe à un état "validé" (waiting, shipped, delivered) et n'a pas encore de numéro, un numéro officiel est automatiquement attribué via le système de numérotation.

États disponibles

  • draft : Brouillon (modifiable librement)
  • waiting : En attente d'expédition
  • shipped : Expédié
  • delivered : Livré
  • refused : Refusé par le client
  • canceled : Annulé
  • inactive : Supprimé (soft delete)

Événement déclenché

Un événement UPDATE_RECEIPT est émis après la mise à jour.

Path parameters

  • uid string Required

    Identifiant unique du bon de livraison

application/json

Body Required

  • client_name string

    Nom du client

  • client_address string

    Adresse du client

  • client_city string

    Ville du client

  • client_zip_code string

    Code postal du client

  • client_country string

    Pays du client

  • client_email string

    Email du client

  • date string(date-time)

    Date du bon de livraison

  • shipping_date string(date-time)

    Date d'expédition

  • state string

    État du bon de livraison :

    • draft : Brouillon
    • waiting : En attente d'expédition
    • shipped : Expédié
    • delivered : Livré
    • refused : Refusé
    • canceled : Annulé

    Values are draft, waiting, shipped, delivered, refused, canceled, or inactive.

  • title string

    Description courte ou libellé du bon

  • lines array[object]

    Lignes du bon de livraison

    Hide lines attributes Show lines attributes object
    • title string

      Titre de la ligne

    • description string

      Description détaillée

    • quantity number

      Quantité

    • reference string

      Référence produit

    • weight number

      Poids (en kg)

Responses

  • 200 application/json

    Bon de livraison mis à jour

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

        Unique identifier for the delivery receipt

      • client string

        Reference to the client

      • client_name string

        Name of the client

      • client_contact string

        Contact person at the client

      • client_email string

        Email of the client

      • client_mobile string

        Mobile phone of the client

      • comment string

        Additional comments

      • company string

        Reference to the company

      • company_name string

        Name of the company

      • date string(date-time)

        Date of the delivery receipt

      • delivery_address string

        Delivery address

      • delivery_city string

        Delivery city

      • delivery_country string

        Delivery country

      • delivery_zip_code string

        Delivery zip code

      • delivery_date string

        Delivery date

      • fromInvoice string

        Reference to the invoice if created from an invoice

      • fromQuote string

        Reference to the quote if created from a quote

      • lines array[object]

        List of delivery receipt lines

        Hide lines attributes Show lines attributes object
        • description string

          Description of the line

        • quantity number

          Quantity

          Default value is 1.

        • reference string

          Reference of the product

        • title string

          Title of the line

        • type string

          Type of the line

          Values are product or header. Default value is product.

        • weight number

          Weight of the product

      • number string

        Receipt number

      • numberOrder string

        Order number

      • notes string

        Additional notes

      • shipping_date string(date-time)

        Shipping date

      • shipping_method string

        Shipping method

      • shippingNbPackages number

        Number of packages

      • state string

        State of the delivery receipt

        Values are draft, waiting, shipped, delivered, refused, canceled, or inactive. Default value is draft.

      • title string

        Short description or label of the delivery receipt

      • totalWeight number

        Total weight of all products

      • totalQuantity number

        Total quantity of all products

        Default value is 0.

      • type string

        Type of the receipt

        Value is delivery. Default value is delivery.

  • 400

    Requête invalide - Données incorrectes

  • 403

    Non autorisé - Droits insuffisants pour modifier ce bon

  • 404

    Bon de livraison non trouvé

PATCH /delivery-receipt/{uid}
curl \
 --request PATCH 'https://wuro.pro/api/v3.2/delivery-receipt/{uid}' \
 --header "X-APP-ID: $API_KEY" \
 --header "X-APP-SECRET: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"client_name":"string","client_address":"string","client_city":"string","client_zip_code":"string","client_country":"string","client_email":"string","date":"2025-05-04T09:42:00Z","shipping_date":"2025-05-04T09:42:00Z","state":"draft","title":"string","lines":[{"title":"string","description":"string","quantity":42.0,"reference":"string","weight":42.0}]}'
Request examples
{
  "client_name": "string",
  "client_address": "string",
  "client_city": "string",
  "client_zip_code": "string",
  "client_country": "string",
  "client_email": "string",
  "date": "2025-05-04T09:42:00Z",
  "shipping_date": "2025-05-04T09:42:00Z",
  "state": "draft",
  "title": "string",
  "lines": [
    {
      "title": "string",
      "description": "string",
      "quantity": 42.0,
      "reference": "string",
      "weight": 42.0
    }
  ]
}
Response examples (200)
{
  "updatedReceipt": {
    "_id": "string",
    "client": "string",
    "client_name": "string",
    "client_contact": "string",
    "client_email": "string",
    "client_mobile": "string",
    "comment": "string",
    "company": "string",
    "company_name": "string",
    "date": "2025-05-04T09:42:00Z",
    "delivery_address": "string",
    "delivery_city": "string",
    "delivery_country": "string",
    "delivery_zip_code": "string",
    "delivery_date": "string",
    "fromInvoice": "string",
    "fromQuote": "string",
    "lines": [
      {
        "description": "string",
        "quantity": 1,
        "reference": "string",
        "title": "string",
        "type": "product",
        "weight": 42.0
      }
    ],
    "number": "string",
    "numberOrder": "string",
    "notes": "string",
    "shipping_date": "2025-05-04T09:42:00Z",
    "shipping_method": "string",
    "shippingNbPackages": 42.0,
    "state": "draft",
    "title": "string",
    "totalWeight": 42.0,
    "totalQuantity": 0,
    "type": "delivery"
  }
}