Relesys API Docs

v1.3

https://api.relesystest.net/api/v1.3

Concept

Recurrence Rules (RRULE)

This document describes how iCalendar RRULE syntax is used to represent recurring items in API endpoints. The RRULE format follows the RFC 5545 standard and supports the fields and patterns described below.

Supported Recurrence Frequencies

The system supports the following recurrence frequencies:

  • DAILY - repeats every N days
  • WEEKLY - repeats on selected weekdays
  • MONTHLY - repeats on a specific day (e.g., 15th) or a positional weekday (e.g., first Tuesday)

Supported RRULE Fields

The system supports the following RRULE components:

Component Description Allowed Values / Format
FREQ Specifies the recurrence frequency. DAILY, WEEKLY, MONTHLY
DTSTART Specifies when the recurrence starts. YYYYMMDDTHHmmss
INTERVAL Represents “repeat every N units”. > 0
COUNT Limits the number of occurrences. 1 → 100
UNTIL Defines the end date of the recurrence. YYYYMMDDTHHmmss
BYDAY Used for WEEKLY rules and positional MONTHLY patterns. MO, TU, WE, TH, FR, SA, SU
BYSETPOS Indicates the Nth occurrence for MONTHLY weekday rules. 1 (first), 2 (second), 3 (third), 4 (fourth), -1 (last)
BYMONTHDAY Day of month for MONTHLY rules. 1 → 31

Notes:

  • Time zones for DTSTART and UNTIL are not supported.
  • If BYSETPOS is provided, then BYDAY must be provided as well.
  • If BYMONTHDAY is provided, then neither BYDAY nor BYSETPOS should be provided.
  • BYDAY can have multiple values provided for WEEKLY occurrences (separated by commas). When frequency is MONTHLY, only one value for BYDAY should be provided.

Recurrence End Conditions

A recurrence rule must end using one of the following:

  • COUNT - the recurrence ends after a set number of occurrences.
  • UNTIL - the recurrence continues until the specified date/time. Must be later than DTSTART.

Behavior Notes

Monthly recurrence supports:

  • Specific day (e.g.: BYMONTHDAY=10)
  • Positional weekday (e.g.: BYDAY=MO;BYSETPOS=1)

Weekly recurrence supports one or more weekday selections using BYDAY.

Examples

Daily Examples

Repeats every day for exactly two occurrences:

RRULE
FREQ=DAILY;DTSTART=20251118T150000;INTERVAL=1;COUNT=2

Repeats daily until November 21st at 16:00:

RRULE
FREQ=DAILY;DTSTART=20251118T150000;INTERVAL=1;UNTIL=20251121T160000

Weekly Examples

Repeats every 2 weeks and stops after one occurrence:

RRULE
FREQ=WEEKLY;DTSTART=20251118T150000;INTERVAL=2;COUNT=1

Repeats weekly until November 19th at 16:00:

RRULE
FREQ=WEEKLY;DTSTART=20251118T150000;INTERVAL=1;UNTIL=20251119T160000

Repeats weekly every Friday for two occurrences:

RRULE
FREQ=WEEKLY;DTSTART=20251118T150000;INTERVAL=1;BYDAY=FR;COUNT=2

Repeats weekly every Monday and Tuesday for four occurrences:

RRULE
FREQ=WEEKLY;DTSTART=20251118T150000;INTERVAL=1;BYDAY=MO,TU;COUNT=4

Monthly Examples

Repeats on the 1st day of every month for one occurrence:

RRULE (day of month)
FREQ=MONTHLY;DTSTART=20251118T150000;INTERVAL=1;BYMONTHDAY=1;COUNT=1

Repeats on the second Tuesday of every month for one occurrence:

RRULE (positional weekday)
FREQ=MONTHLY;DTSTART=20251118T150000;INTERVAL=1;BYDAY=TU;BYSETPOS=2;COUNT=1

Repeats on the 1st day of each month until January 1st, 2026 at 16:00:

RRULE (day of month + UNTIL)
FREQ=MONTHLY;DTSTART=20251118T150000;INTERVAL=1;BYMONTHDAY=1;UNTIL=20260101T160000

Repeats on the second Tuesday of each month until January 30th, 2026 at 16:00:

RRULE (positional weekday + UNTIL)
FREQ=MONTHLY;DTSTART=20251118T150000;INTERVAL=1;BYDAY=TU;BYSETPOS=2;UNTIL=20260130T160000