Availability calendars for store items
What's new
Store items accept an optional, nullable availability_calendar that describes when the item is on sale. A calendar has a type of either periods — up to 100 explicit start_at/end_at windows — or recurrence, a repeating window defined by start_at, end_at, a frequency of daily or weekly, an interval of 1–52, an optional weekdays list, and a UTC start_time/end_time pair. When end_time is not after start_time, the window crosses midnight.
Impact
An item that could previously only be scheduled as one continuous window via start_at/end_at can now run on a repeating schedule — a weekday happy hour, a weekend sale — or across a set of disjoint windows, without creating a separate store item per window. Omitting availability_calendar falls back to a single window built from start_at/end_at, so existing items behave exactly as before.
Changes
| Resource | Change |
|---|---|
| create_store_item, update_store_item, bulk_update_store_items, batch_create_store_item | Added optional availability_calendar to the request body |
| get_all_store_items, get_store_items, create_store_item, update_store_item, bulk_update_store_items | Added availability_calendar to store item responses |
| Components | Added the AvailabilityCalendar, AvailabilityCalendarType, AvailabilityPeriod, AvailabilityRecurrence, RecurrenceFrequency, and Weekday schemas |
Upgrade
- No action required. Keep sending
start_at/end_atand omitavailability_calendarto preserve the current single-window behavior. - If you read store items, expect
availability_calendarto be present on responses and treatnullas "scheduled bystart_at/end_at".
需要技术支持?
联系我们的集成技术团队: integration@aghanim.com