Introduction

With the Schedule API you can share the lineup of an event’s activities, presentations, performances, or sessions. Guests can make a personalized agenda with their chosen items by bookmarking them. The created schedule will appear on your Event Details page.

With the Schedule API you can:

  • Add, delete, update schedule items.
  • Adjust time of all draft schedule items at once.
  • Publish or discard draft schedule.
  • Get the information about schedules.

Terminology

  • Schedule: A structured plan or timetable that outlines the sequence of activities, presentations, performances, or sessions scheduled to occur during an event.
  • Schedule item: A specific activity, presentation, performance, or session listed within the overall schedule of an event. Each schedule item represents a distinct component of the event's agenda and may include details such as the activity name, time slot, location, and any additional information relevant to the event's program.
  • Event: A gathering organized by an individual or business for a group of people.
Was this helpful?
Yes
No

Setup

To use the Schedule API, install the @wix/events package using npm or Yarn:

Copy
1
npm install @wix/events

or

Copy
1
yarn add @wix/events

Then import { schedule } from @wix/events:

Copy
1
import { schedule } from '@wix/events'
Was this helpful?
Yes
No

addScheduleItem( )

Adds a schedule item to the draft schedule.

Copy
function addScheduleItem(eventId: string, options: AddScheduleItemOptions): Promise<AddScheduleItemResponse>
Method Parameters
eventIdstringRequired
Event ID to which the schedule belongs.

optionsAddScheduleItemOptions
Optional fields.
Returns
Return Type:Promise<AddScheduleItemResponse>
Was this helpful?
Yes
No

deleteScheduleItem( )

Deletes schedule items from the draft schedule.

Copy
function deleteScheduleItem(eventId: string, options: DeleteScheduleItemOptions): Promise<void>
Method Parameters
eventIdstringRequired
Event ID to which the schedule belongs.

optionsDeleteScheduleItemOptions
Optional fields.
Returns
Return Type:Promise<void>
Was this helpful?
Yes
No

discardDraft( )

Clears all changes to the draft schedule.

Copy
function discardDraft(eventId: string): Promise<void>
Method Parameters
eventIdstringRequired
Event ID to which the schedule belongs.
Returns
Return Type:Promise<void>
Was this helpful?
Yes
No

getScheduleItem( )

Retrieves schedule item by ID.

Copy
function getScheduleItem(itemId: string, options: GetScheduleItemOptions): Promise<ScheduleItem>
Method Parameters
itemIdstringRequired
Schedule item ID.

optionsGetScheduleItemOptions
Optional fields.
Returns
Return Type:Promise<ScheduleItem>
Was this helpful?
Yes
No

listScheduleItems( )

Retrieves a list of up to 100 schedule items

Copy
function listScheduleItems(options: ListScheduleItemsOptions): Promise<ListScheduleItemsResponse>
Method Parameters
optionsListScheduleItemsOptions
Optional fields.
Returns
Return Type:Promise<ListScheduleItemsResponse>
Was this helpful?
Yes
No

publishDraft( )

Publishes the draft schedule.

Copy
function publishDraft(eventId: string): Promise<void>
Method Parameters
eventIdstringRequired
Event ID to which the schedule belongs.
Returns
Return Type:Promise<void>
Was this helpful?
Yes
No

queryScheduleItems( )

Creates a query to retrieve a list of schedule items.

The queryScheduleItems( ) function builds a query to retrieve a list of schedule items and returns a ItemsQueryBuilder object.

The returned object contains the query definition, which is typically used to run the query using the find() function.

You can refine the query by chaining ItemsQueryBuilder functions onto the query. ItemsQueryBuilder functions enable you to sort, filter, and control the results queryScheduleItems( ) returns.

queryScheduleItems( ) runs with these ItemsQueryBuilder defaults, which you can override:

The functions that are chained to queryScheduleItems( ) are applied in the order they're called. For example, if you apply ascending('name') and then descending('stageName'), the results are sorted first by the name, and then, if there are multiple results with the same name, the items are sorted by stageName.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),ascending(),descending()
nameeq(),ne(),ascending(),descending()
descriptioneq(),ne(),ascending(),descending()
stageNameeq(),ne(),ascending(),descending()
_createdDateeq(),ne(),lt(),le(),gt(),ge(),ascending(),descending()
_updatedDateeq(),ne(),lt(),le(),gt(),ge(),ascending(),descending()
eventIdeq(),ne(),ascending(),descending()
Copy
function queryScheduleItems(): ItemsQueryBuilder
Request
This method does not take any parameters
Returns
Return Type:ItemsQueryBuilder
Was this helpful?
Yes
No

rescheduleDraft( )

Adjusts the time of all draft schedule items at once per event.

Copy
function rescheduleDraft(eventId: string, options: RescheduleDraftOptions): Promise<void>
Method Parameters
eventIdstringRequired
Event ID to which the schedule belongs.

optionsRescheduleDraftOptions
Optional fields.
Returns
Return Type:Promise<void>
Was this helpful?
Yes
No

updateScheduleItem( )

Updates a schedule item in a draft schedule.

Copy
function updateScheduleItem(itemId: string, eventId: string, options: UpdateScheduleItemOptions): Promise<UpdateScheduleItemResponse>
Method Parameters
itemIdstringRequired
Schedule item ID.

eventIdstringRequired
Event ID to which the schedule belongs.

optionsUpdateScheduleItemOptions
Optional fields.
Returns
Return Type:Promise<UpdateScheduleItemResponse>
Was this helpful?
Yes
No