Saltar al contenido
API v1 · https://bentho.org/api
GET/api/mod/ventas/{espacio}/inventory/summary

El 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

CAMPOTIPOREQUERIDOQUÉ ES
espaciostringSÍEl id del espacio (sale en GET /api/companies). Tiene que tener el módulo Ventas.

RESPUESTA 200

CAMPOTIPOQUÉ ES
total · activosintegerArtículos, y cuántos activos.
en_stock · agotadosintegerCon cantidad mayor que 0, y con 0.
stock_bajointegerEn su umbral o por debajo.
last_syncobject | nullLa última carga: fuente (file si fue un archivo), items_upserted y created_at. null si nunca se cargó.

ERRORES DE ESTA RUTA · SIEMPRE {"detail": …}

STATUSCUÁNDODETAIL LITERAL
403El espacio no tiene el módulo Ventasmó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.