---
title: "Update a PENDING order."
method: PUT
path: "/api/v1/commandes/{order_id}"
tags: ["Approvisionnement"]
---

# Update a PENDING order.

`PUT /api/v1/commandes/{order_id}`

## Request

- Base URL: `https://erp.eyeot.fr/api/v1`
- URL: `https://erp.eyeot.fr/api/v1/api/v1/commandes/{order_id}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

**Permissions requises** : `commandes:write`

## Request body

- OrderUpdate
  - `expected_delivery_date` string, date, nullable
  - `items` OrderLineInput[], nullable
    - `product_id` string, uuid, required
    - `quantity` integer, required
    - `unit_price` number, nullable
  - `notes` string, nullable

## Response `200`

Succès — payload `{data, meta}` (cf. API-GUIDE §3.1)

- object
  - `data` OrderResponse
    - `created_at` string, date-time
    - `creator_name` unknown
    - `expected_delivery_date` string, date, nullable
    - `id` string, uuid
    - `items` OrderLineResponse[]
      - `id` string, uuid
      - `product_id` string, uuid
      - `product_name` string
      - `quantity` integer
      - `total_price` number
      - `unit_price` number
    - `notes` string, nullable
    - `order_type` string
    - `reference` string
    - `sent_at` string, date-time, nullable
    - `sent_to` string, nullable
    - `site_name` unknown
    - `status` string
    - `supplier_name` unknown
    - `total_amount` number
  - `meta` PaginationMeta: Métadonnées de pagination cursor (cf. API-GUIDE §6).
    - `limit` integer
    - `next_cursor` string, nullable
    - `prev_cursor` string, nullable
    - `total_count` integer

## Other responses

- `400`: Validation Marshmallow échouée. `errors` détaille chaque champ invalide.
- `401`: JWT manquant, expiré ou révoqué.
- `402`: L'organisation n'a pas d'abonnement actif (paywall). Rediriger vers /activate.
- `403`: Permissions `module:action` insuffisantes pour cette route.
- `404`: Ressource introuvable (ou cross-tenant — équivalent à hidden).
- `409`: État incohérent (email dupliqué, ressource déjà dans cet état, etc.).
- `422`: Validation Marshmallow échouée. `errors` détaille chaque champ invalide.
- `429`: Trop de requêtes. Honorer le header `Retry-After` (secondes).

---

[API](https://skmtc.dev/eyeot/apis/eyeot-erp-api.md) · [All operations](https://skmtc.dev/eyeot/apis/eyeot-erp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/eyeot/apis/eyeot-erp-api/revisions/42ab95222a89?raw)
