📊 Returns aggregated statistics for orders with optional currency conversion to a unified currency.
HTTP: GET /orders/stats
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| domain | string | no | Filter by domain (or leave empty for all domains). | profi-parfemy.cz |
| date_from | string | no | Start date (YYYY-MM-DD). Default: last 30 days. | 2025-01-01 |
| date_to | string | no | End date (YYYY-MM-DD). Default: today. | 2025-12-31 |
| convert_to | string | no | Convert all amounts to this currency (e.g., EUR, CZK). Uses CNB exchange rates. | EUR |
| group_by | string | no | Group results: day, week, month, domain, product, partner. | day |
curl -H "Authorization: ApiKey YOUR_API_KEY" "https://admin.elpricing.com/api/orders/stats?date_from=2025-01-01&convert_to=EUR&group_by=day"
Tasks are persisted to var/api_queue/tasks.json. Process them with:
php go.php cron:list\nphp go.php cron:go
Logs are written to var/api_queue/logs/{task_id}.log.