---
title: "Agrège la valeur stock (qty × unit_price) par zone d'entrepôt."
method: GET
path: "/api/v1/supply/stock-value/by-zone"
tags: ["Supply Chain MRP (V2)"]
---

# Agrège la valeur stock (qty × unit_price) par zone d'entrepôt.

`GET /api/v1/supply/stock-value/by-zone`

## Request

- Base URL: `https://erp.eyeot.fr/api/v1`
- URL: `https://erp.eyeot.fr/api/v1/api/v1/supply/stock-value/by-zone`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Agrège la valeur stock (qty × unit_price) par zone d'entrepôt.

    Inclut un bucket "Sans bin assigné" pour les lots `current_bin_id
    IS NULL` (lots legacy ou non encore affectés à un bin physique).
    Multi-devise : group_by Product.currency puis conversion via
    `currency_service.convert_to_org_currency` (pattern R118).

    Query params :
        include_unassigned (bool, default true) — inclure le bucket
            "Sans bin assigné" dans la réponse.

    Réponse :
        {
            "data": {
                "zones": [{zone_id, zone_name, zone_code, zone_type,
                           site_id, site_name, total_qty, total_value,
                           nb_lots, nb_products}, ...],
                "total_value": "12345.67",
                "total_lots": 42,
                "currency": "EUR",
                "computed_at": "2026-05-15T10:30:00+00:00"
            }
        }

**Permissions requises** : `supply:read`

## Response `200`

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

- object
  - `data` StockValueByZoneResponse
    - `computed_at` string, date-time
    - `currency` string
    - `total_lots` integer
    - `total_value` number
    - `zones` StockValueZoneEntry[]
      - `nb_lots` integer
      - `nb_products` integer
      - `site_id` string, nullable
      - `site_name` string, nullable
      - `total_qty` number
      - `total_value` number
      - `zone_code` string, nullable
      - `zone_id` string, nullable
      - `zone_name` string
      - `zone_type` string, nullable
  - `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

- `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).
- `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)
