Analyseer product-, voorraad- en verkoopdata. Gebruik bij "data", "analyse", "analytics", "statistieken", "hoeveel", "welke producten", "omzet", "verkoop", "rapport".
Analyseer data van gameshopenter.com. Focus: $ARGUMENTS
curl -s "https://gameshopenter.com/api/products?t=$(date +%s)" \
-H "User-Agent: Mozilla/5.0" | python3 -c "
import json, sys
d = json.load(sys.stdin)
p = d.get('products', [])
print(f'=== PRODUCTEN ({len(p)}) ===')
# Per platform
platforms = {}
for x in p:
plat = x.get('platform', 'Onbekend')
platforms[plat] = platforms.get(plat, 0) + 1
for plat, count in sorted(platforms.items(), key=lambda x: -x[1]):
print(f' {plat}: {count}')
# Prijsverdeling
prices = [x.get('price', 0) for x in p if x.get('price', 0) > 0]
if prices:
print(f'\n=== PRIJZEN ===')
print(f' Gemiddeld: €{sum(prices)/len(prices):.2f}')
print(f' Mediaan: €{sorted(prices)[len(prices)//2]:.2f}')
print(f' Laagste: €{min(prices):.2f}')
print(f' Hoogste: €{max(prices):.2f}')
print(f' Premium (≥€50): {sum(1 for p in prices if p >= 50)}')
# Conditie verdeling
conditions = {}
for x in p:
c = x.get('condition', 'Geen')
conditions[c] = conditions.get(c, 0) + 1
print(f'\n=== CONDITIE ===')
for c, count in sorted(conditions.items(), key=lambda x: -x[1]):
print(f' {c}: {count}')
# Zonder foto
no_img = [x['sku'] for x in p if not x.get('image')]
if no_img:
print(f'\n⚠️ Zonder foto: {len(no_img)} ({no_img[:5]})')
"
curl -s "https://gameshopenter.com/api/stock" \
-H "Authorization: Bearer gameshop-admin-2024" | python3 -c "
import json, sys
d = json.load(sys.stdin)
items = d if isinstance(d, dict) else d.get('inventory', {})
total = sum(v.get('quantity', 0) for v in items.values() if isinstance(v, dict))
reserved = sum(v.get('reserved', 0) for v in items.values() if isinstance(v, dict))
available = total - reserved
print(f'=== VOORRAAD ===')
print(f' Totaal: {total}')
print(f' Gereserveerd: {reserved}')
print(f' Beschikbaar: {available}')
out_of_stock = [k for k, v in items.items() if isinstance(v, dict) and v.get('quantity', 0) - v.get('reserved', 0) <= 0]
if out_of_stock:
print(f' Uitverkocht: {len(out_of_stock)} ({out_of_stock[:5]})')
" 2>/dev/null || echo "Voorraad API niet beschikbaar"
curl -s "https://gameshopenter.com/api/orders/list" \
-H "Authorization: Bearer gameshop-admin-2024" | python3 -c "
import json, sys
from datetime import datetime, timedelta
orders = json.load(sys.stdin)
if isinstance(orders, dict): orders = orders.get('orders', [])
print(f'=== ORDERS ({len(orders)}) ===')
# Status verdeling
statuses = {}
for o in orders:
s = o.get('status', 'onbekend')
statuses[s] = statuses.get(s, 0) + 1
for s, count in sorted(statuses.items(), key=lambda x: -x[1]):
print(f' {s}: {count}')
# Omzet
totals = [o.get('total', 0) for o in orders if o.get('status') not in ['cancelled', 'refunded']]
if totals:
print(f'\n=== OMZET ===')
print(f' Totaal: €{sum(totals):.2f}')
print(f' Gemiddeld per order: €{sum(totals)/len(totals):.2f}')
print(f' Aantal betaalde orders: {len(totals)}')
" 2>/dev/null || echo "Orders API niet beschikbaar"
Geef een overzichtelijke tabel met de belangrijkste metrics:
=== GAMESHOP ENTER DATA RAPPORT ===
| Metric | Waarde |
|--------|--------|
| Producten live | X |
| Voorraad beschikbaar | X |
| Uitverkocht | X |
| Orders totaal | X |
| Omzet totaal | €X |
| Gem. orderwaarde | €X |
| Premium producten | X |
| Zonder foto | X |