/services/forms/v1/form-submissions/dashboard-stats
Auth
Returns submission counts bucketed by interval (hour/daily/weekly/monthly) along with headline KPIs for the requested date range. Optionally accepts a comparison period for year-over-year style deltas. All bucketing is done in the authenticated user's timezone so chart labels match what the user sees in the rest of the dashboard.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
form_id |
integer | No | 42 |
|
start_date |
string (date-time) | Yes | 2026-01-01 00:00:00 |
|
end_date |
string (date-time) | Yes | 2026-03-31 23:59:59 |
|
compare_start_date |
string|null (date-time) | No | 2025-01-01 00:00:00 |
|
compare_end_date |
string|null (date-time) | No | 2025-03-31 23:59:59 |
|
interval |
string
hour, daily, weekly, monthly |
No | weekly |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
data |
object | |
data.interval |
mixed | |
data.auto_interval |
string monthly, weekly, daily, hour |
|
data.disabled_intervals |
mixed[] | |
data.chart |
object | |
data.compare_chart |
object|null | |
data.stats |
object |
| Field | Type | Description |
|---|---|---|
message |
string | Errors overview. |
errors |
object | A detailed description of each field that failed validation. |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
Retry-After |
integer | Seconds until the rate limit resets | 60 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
curl -X POST "https://api.wemasy.nl/api/services/forms/v1/form-submissions/dashboard-stats" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"form_id": 42,
"start_date": "2026-01-01 00:00:00",
"end_date": "2026-03-31 23:59:59",
"compare_start_date": "2025-01-01 00:00:00",
"compare_end_date": "2025-03-31 23:59:59",
"interval": "weekly"
}'
fetch('https://api.wemasy.nl/api/services/forms/v1/form-submissions/dashboard-stats', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"form_id": 42,
"start_date": "2026-01-01 00:00:00",
"end_date": "2026-03-31 23:59:59",
"compare_start_date": "2025-01-01 00:00:00",
"compare_end_date": "2025-03-31 23:59:59",
"interval": "weekly"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
->accept('application/json')
->post('https://api.wemasy.nl/api/services/forms/v1/form-submissions/dashboard-stats', {
"form_id": 42,
"start_date": "2026-01-01 00:00:00",
"end_date": "2026-03-31 23:59:59",
"compare_start_date": "2025-01-01 00:00:00",
"compare_end_date": "2025-03-31 23:59:59",
"interval": "weekly"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"form_id": 42,
"start_date": "2026-01-01 00:00:00",
"end_date": "2026-03-31 23:59:59",
"compare_start_date": "2025-01-01 00:00:00",
"compare_end_date": "2025-03-31 23:59:59",
"interval": "weekly"
}
r = requests.post("https://api.wemasy.nl/api/services/forms/v1/form-submissions/dashboard-stats", headers=headers, json=data)
print(r.json())
{
"error": false,
"data": {
"interval": "string",
"auto_interval": "string",
"disabled_intervals": [],
"chart": {
"labels": [],
"values": []
},
"compare_chart": {
"labels": [],
"values": []
},
"stats": {
"total": "string",
"daily_average": 0,
"peak_count": "string",
"peak_label": "string",
"active_forms": 0,
"compare_total": "string",
"compare_trend": "string",
"compare_percentage": 0
}
}
}