> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# calendarEvents

> Calendar events on this store, earliest start first unless `orderBy` says otherwise. To list the events overlapping a window, pass its start as `endsAfter` and its end as `startsBefore`. Read `calendarEventCatalog` for what each event type and agenda item kind does.

**Required scopes:** [`calendar_events_read`](/docs/api-reference/v3/reference/scopes#scope-calendar_events_read)

## Arguments

<ResponseField name="after" type="String">
  Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.
</ResponseField>

<ResponseField name="before" type="String">
  Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.
</ResponseField>

<ResponseField name="endsAfter" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
  Only events that end at or after this instant.
</ResponseField>

<ResponseField name="first" type="Int">
  Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.
</ResponseField>

<ResponseField name="last" type="Int">
  Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.
</ResponseField>

<ResponseField name="orderBy" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-sort-key">CalendarEventSortKey</a>}>
  Which key to sort by (defaults to startAt, earliest first). Combine with `reverse` to flip direction.
</ResponseField>

<ResponseField name="reverse" type="Boolean">
  Reverses the sort direction selected by `orderBy` (or its default).
</ResponseField>

<ResponseField name="startsBefore" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
  Only events that start at or before this instant.
</ResponseField>

<ResponseField name="type" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-type">CalendarEventType</a>}>
  Only events of this type.
</ResponseField>

## Returns

<ResponseField name="calendarEvents" type={<a href="/docs/api-reference/v3/pagination">CalendarEventConnection!</a>} required>
  A paginated list of CalendarEvent items.

  <Expandable title="fields" lazyRender>
    <ResponseField name="edges" type={<a href="/docs/api-reference/v3/pagination">[CalendarEventEdge!]!</a>} required>
      The list of edges (each a node plus its pagination `cursor`).

      <Expandable title="fields" lazyRender>
        <ResponseField name="cursor" type="String!" required>
          Opaque cursor for this item; pass to `after`/`before` to page from here.
        </ResponseField>

        <ResponseField name="node" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event">CalendarEvent!</a>} required>
          The item at this edge.

          <Expandable title="fields" lazyRender>
            <ResponseField name="agenda" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-agenda-item">[CalendarEventAgendaItem!]!</a>} required>
              The typed items attached to this event, in order. A kind this API version does not model is returned as CalendarUnknownAgendaItem. Change them with `agendaOperations` on updateCalendarEvent.
            </ResponseField>

            <ResponseField name="agendaJson" type={<a href="/docs/api-reference/v3/reference/common/json">[JSON!]!</a>} required>
              `agenda` with every field selected, as JSON: one element per item, in order, with `__typename`.
            </ResponseField>

            <ResponseField name="allDay" type="Boolean!" required>
              Whether the event spans whole days in `timezone` rather than specific times.
            </ResponseField>

            <ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
              When the event was created.
            </ResponseField>

            <ResponseField name="description" type="String">
              Notes about the event. The Commerce Agent reads them for MARKETING events and may repeat them to shoppers, so keep internal notes out.
            </ResponseField>

            <ResponseField name="endAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
              When the event ends. Never before `startAt`.
            </ResponseField>

            <ResponseField name="id" type="ID!" required>
              The id of this calendar event.
            </ResponseField>

            <ResponseField name="startAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
              When the event starts.
            </ResponseField>

            <ResponseField name="status" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-status">CalendarEventStatus!</a>} required>
              Whether the event is upcoming, happening now, or ended.
            </ResponseField>

            <ResponseField name="timezone" type="String!" required>
              The IANA time zone the event was written in, such as `America/New_York`. `startAt` and `endAt` are instants; this is how to show them.
            </ResponseField>

            <ResponseField name="title" type="String!" required>
              The name of the event. The Commerce Agent reads it for MARKETING events and may repeat it to shoppers.
            </ResponseField>

            <ResponseField name="type" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-type">CalendarEventType!</a>} required>
              The part of the business this event belongs to.
            </ResponseField>

            <ResponseField name="updatedAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
              When the event or its agenda was last changed.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="nodes" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event">[CalendarEvent!]!</a>} required>
      The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

      <Expandable title="fields" lazyRender>
        <ResponseField name="agenda" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-agenda-item">[CalendarEventAgendaItem!]!</a>} required>
          The typed items attached to this event, in order. A kind this API version does not model is returned as CalendarUnknownAgendaItem. Change them with `agendaOperations` on updateCalendarEvent.

          <Expandable title="fields" lazyRender>
            <ResponseField name="id" type="ID!" required>
              The id of this agenda item. Pass it to an `update` or `remove` agenda operation on updateCalendarEvent.
            </ResponseField>

            <ResponseField name="kind" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-agenda-item-kind">CalendarAgendaItemKind!</a>} required>
              What this item adds to the event.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="agendaJson" type={<a href="/docs/api-reference/v3/reference/common/json">[JSON!]!</a>} required>
          `agenda` with every field selected, as JSON: one element per item, in order, with `__typename`.
        </ResponseField>

        <ResponseField name="allDay" type="Boolean!" required>
          Whether the event spans whole days in `timezone` rather than specific times.
        </ResponseField>

        <ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
          When the event was created.
        </ResponseField>

        <ResponseField name="description" type="String">
          Notes about the event. The Commerce Agent reads them for MARKETING events and may repeat them to shoppers, so keep internal notes out.
        </ResponseField>

        <ResponseField name="endAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
          When the event ends. Never before `startAt`.
        </ResponseField>

        <ResponseField name="id" type="ID!" required>
          The id of this calendar event.
        </ResponseField>

        <ResponseField name="startAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
          When the event starts.
        </ResponseField>

        <ResponseField name="status" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-status">CalendarEventStatus!</a>} required>
          Whether the event is upcoming, happening now, or ended.
        </ResponseField>

        <ResponseField name="timezone" type="String!" required>
          The IANA time zone the event was written in, such as `America/New_York`. `startAt` and `endAt` are instants; this is how to show them.
        </ResponseField>

        <ResponseField name="title" type="String!" required>
          The name of the event. The Commerce Agent reads it for MARKETING events and may repeat it to shoppers.
        </ResponseField>

        <ResponseField name="type" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-type">CalendarEventType!</a>} required>
          The part of the business this event belongs to.
        </ResponseField>

        <ResponseField name="updatedAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
          When the event or its agenda was last changed.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="pageInfo" type={<a href="/docs/api-reference/v3/pagination">PageInfo!</a>} required>
      Pagination metadata for the current page.

      <Expandable title="fields" lazyRender>
        <ResponseField name="endCursor" type="String">
          Cursor of the last edge in this page; pass to `after` to page forward.
        </ResponseField>

        <ResponseField name="hasNextPage" type="Boolean!" required>
          Whether more items exist after this page (drives forward pagination with `first`/`after`).
        </ResponseField>

        <ResponseField name="hasPreviousPage" type="Boolean!" required>
          Whether more items exist before this page (drives backward pagination with `last`/`before`).
        </ResponseField>

        <ResponseField name="startCursor" type="String">
          Cursor of the first edge in this page; pass to `before` to page backward.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```graphql theme={null}
query {
  calendarEvents(after: "...", before: "...", endsAfter: "...", first: 10, last: 10, orderBy: CREATED_AT, reverse: true, startsBefore: "...", type: MARKETING) {
    nodes {
      agendaJson
      allDay
      createdAt
      description
      endAt
      id
      startAt
      status
      # ...
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.