GET
/api/mod/ventas/{espacio}/inventory/summaryEl resumen del inventario
Cuántos artículos hay, cuántos tienen stock, cuántos están agotados o bajos, y la última carga.
- PERMISOlee (vale cualquier clave)
- CRÉDITOSno gasta
- AUTENTICACIÓNBearer bth_…
PARÁMETROS
| CAMPO | TIPO | REQUERIDO | QUÉ ES |
|---|---|---|---|
| espacio | string | SÍ | El id del espacio (sale en GET /api/companies). Tiene que tener el módulo Ventas. |
RESPUESTA 200
| CAMPO | TIPO | QUÉ ES |
|---|---|---|
| total · activos | integer | Artículos, y cuántos activos. |
| en_stock · agotados | integer | Con cantidad mayor que 0, y con 0. |
| stock_bajo | integer | En su umbral o por debajo. |
| last_sync | object | null | La última carga: fuente (file si fue un archivo), items_upserted y created_at. null si nunca se cargó. |
ERRORES DE ESTA RUTA · SIEMPRE {"detail": …}
| STATUS | CUÁNDO | DETAIL LITERAL |
|---|---|---|
| 403 | El espacio no tiene el módulo Ventas | módulo no habilitado para este espacio. |
Y los de cualquier ruta —clave inválida, cuenta no al día, IP, límites—, en Errores, límites y créditos.