Time Window Service
API Contract
REST
/api/v1/time-windows
5 endpoints
GET
/api/v1/time-windows/api/v1/time-windows
List all supported time window types
Public
Response Example
{
"data": [
{
"window": "monthly",
"label": "This Month",
"description": "Current calendar month"
},
{
"window": "quarterly",
"label": "This Quarter",
"description": "Current calendar quarter"
},
{
"window": "yearly",
"label": "This Year",
"description": "Current calendar year"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 3
}
}
GET
/api/v1/time-windows/api/v1/time-windows/:window
Get the resolved date range for a given time window type
Public
Response Example
{
"window": "quarterly",
"start_date": "2026-01-01",
"end_date": "2026-03-31",
"resolved_at": "2026-03-26T10:00:00Z"
}
POST
/api/v1/time-windows/api/v1/time-windows
Resolve a date range for a custom or named time window (supports custom anchor date)
Public
Request Example
{
"window": "monthly",
"anchor_date": "2025-11-15"
}
Response Example
{
"window": "monthly",
"start_date": "2025-11-01",
"end_date": "2025-11-30",
"resolved_at": "2026-03-26T10:01:00Z"
}
PUT
/api/v1/time-windows/api/v1/time-windows/:window
Update the configuration/offset for a time window type
Public
Request Example
{
"offset_days": -1,
"description": "Previous calendar month (offset)"
}
Response Example
{
"window": "monthly",
"offset_days": -1,
"description": "Previous calendar month (offset)",
"updated_at": "2026-03-26T10:02:00Z"
}
DELETE
/api/v1/time-windows/api/v1/time-windows/:window
Remove a custom time window configuration (built-in windows cannot be deleted)
Public
Response Example
{
"deleted": true,
"window": "custom_q1_fy2026"
}