Switch product users. Your developer documentation has moved over to the switchsolar.io website.
A Calendar defines important dates that are associated with tariffs, including billing dates, holiday schedules (which are typically off-peak and thus have lower rates), and “dynamic” events such as smart days, critical peaks and system peaks. The Calendar endpoints allow you to query what calendars are available and what dates they specify.
Data Definitions
Calendar has a resource type of Calendar. An individual date has a resource type of CalendarDate. Each calendar has a list of events on them that denote the type of dates on the calendar. For example “billing period end” would be an event on a billing period calendar, and Easter Sunday would be an event on a holiday calendar. Then Easter Sunday 2015 is actually a calendar date, as is the specific billing period end date of June 12, 2015.
Calendar
A Calendar is a simple object that has the following data structure.
A descriptive name for the calendar. If the utility gives it a name (they typically do for billing cycles) it will be that. Otherwise its indicative of its purpose (e.g. “Holidays”).
calendarType
String
M
Indicates the type of dates in this calendar. Values are HOLIDAY (e.g. 4th July), BILLING (for billing periods) and PRICING_PERIOD for dynamic pricing events like critical peaks.
lseId
Long
M
The ID of the utility (LSE) that the calendar belongs to.
events
List of CalendarEvent
A list of the types of events on this calendar (See below for CalendarEvent structure). This is only populated on Get Calendar, not on Get Calendars.
Each CalendarEvent item in the events list above has the following fields:
The ID of the utility (LSE) that the calendar belongs to.
calendarEventType
String
M
Either HOLIDAY, BILLING or PRICING_PERIOD
dateDefinitionType
String
E
FIXED_DATE occurs on the same date, MANUAL is non-deterministic, FLOATING_DATE floats (e.g. first Monday of the month), and EASTER_DATE relates to the easter calendar
locale
String
ISO Country Code of the locales date (e.g. US).
seededUntil
Date
When the underlying dates for this event are populated through to.
fixedMonth
Integer
E
For fixed dates, the month of year.
fixedDay
Integer
E
For fixed dates, the day of month.
dayOfWeek
Integer
E
For floating dates, the day of the week.
weekOfMonth
Integer
E
For floating dates, the week of the month.
adjustment
Integer
E
An adjustment value, uses for various date types.
Calendar Date
The actual dates are provided in the CalendarDate resource type.