GET/projects/api/v3/tasks/recurrence/preview

Returns a preview list of recurring dates.

Exactly one mode must be used: either taskId (uses the task's existing repeat settings) or dueDate + frequency (and optional selectedDays, duration, endsAt, monthlyRepeatType). Combining taskId with dueDate or frequency is an error.

On an installation that skips weekends the selectedDays frequency drops weekend occurrences instead of moving them to a weekday, so a selection made up entirely of Saturday and Sunday can never repeat. That returns a 400 carrying meta.code "skipWeekendsExcludesAllSelectedDays" rather than an empty list. A selection that mixes weekend and weekday days is previewed with only the weekdays that survive.

Query Params

  • Name
    selectedDays
    Type
    string
    Description

    comma separated list of sequence weekdays (1=Sunday .. 7=Saturday) the task repeats on

  • Name
    monthlyRepeatType
    Type
    string
    Description

    how the monthly repeat type should be interpreted

    Allowed values
    • weekDay
    • monthDay
    • lastDayOfMonth
  • Name
    frequency
    Type
    string
    Description

    repeat frequency to use when previewing without an existing task

    Allowed values
    • daily
    • weekdays
    • selectedDays
    • weekly
    • everyXDays
    • everyXDaysWeekday
    • every2Weeks
    • every3Weeks
    • every4Weeks
    • every5Weeks
    • every6Weeks
    • monthly
    • every2Months
    • every3Months
    • every4Months
    • every6Months
    • yearly
  • Name
    endsAt
    Type
    string
    Description

    date after which the sequence stops repeating; must be after dueDate and cannot be more than 10 years after dueDate

  • Name
    dueDate
    Type
    string
    Description

    due date to use when previewing without an existing task

  • Name
    cursor
    Type
    string
    Description

    pagination cursor returned by a previous request

  • Name
    taskId
    Type
    integer
    Description

    preview an existing task's saved repeat settings; cannot be combined with dueDate or frequency

  • Name
    limit
    Type
    integer
    Description

    number of dates to return per page

    Default
    25
  • Name
    duration
    Type
    integer
    Description

    number of days between repeats; must be 1 or greater. Only used by the everyXDays and everyXDaysWeekday frequencies, ignored by the others.

  • Name
    onlyFutureDates
    Type
    boolean
    Description

    when true (the default) only occurrences from today onwards are returned; set to false to anchor the preview on dueDate and include occurrences that already lie in the past

    Default
    true

Responses

  • Code
    200
    Type
    object
    Schema
    Description
    200 OK
    RecurringPreviewResponse is the response for the GET recurring preview endpoint.
  • Code
    400
    Type
    object
    Schema
    Description
    400 Bad Request
    ErrorResponse defines how []Error should be marshaled to JSON.
  • Code
    404
    Type
    object
    Schema
    Description
    404 Not Found
    ErrorResponse defines how []Error should be marshaled to JSON.

Examples

200 OK

RecurringPreviewResponse
{
  "meta": {
    "averageSpend": 0,
    "data": {},
    "limit": 0,
    "nextCursor": "string",
    "page": {
      "count": 0,
      "hasMore": true,
      "pageOffset": 0,
      "pageSize": 0
    },
    "prevCursor": "string",
    "totalCapacity": 0
  },
  "recurrences": [
    {
      "date": "string",
      "existingSequence": {
        "additionalProp": 0
      },
      "outOfSequence": true
    }
  ]
}