Search.../

getEvent( )

Retrieves an event by ID.

Syntax

function getEvent(eventId: string, options: GetEventOptions): Promise<V3Event>

getEvent Parameters

NAME
TYPE
DESCRIPTION
eventId
string

Event ID.

options
Optional
GetEventOptions

Optional fields.

Returns

Event.

Return Type:

Promise<
V3Event
>
NAME
TYPE
DESCRIPTION
_createdDate
Date

Date and time when the event was created in yyyy-mm-ddThh:mm:sssZ format.

_id
string

Event ID.

_updatedDate
Date

Date and time when the event was updated in yyyy-mm-ddThh:mm:sssZ format.

agendaSettings
AgendaSettings

Event schedule details.

calendarUrls
CalendarUrls

URLs that allow you to add an event to the Google calendar, or to download an ICS calendar file.

contactLabel
string

Assigned contacts label key.

dateAndTimeSettings
DateAndTimeSettings

Event date and time settings.

detailedDescription
string

Detailed description of an event. You can enter the description using rich text format (add various types of markups, such as underlines, italics, bolding, color codes, bullet lists, and links by using HTML formatting tags).

eventDisplaySettings
V3EventDisplaySettings

Visual settings for event.

eventPageUrl
string

Event page URL components.

form
Form

Event registration form.

guestListSettings
GuestListSettings

Guest list configuration.

instanceId
string

Instance ID of the site where the event is hosted.

location
Location

Event location.

mainImage
string

Main event image.

onlineConferencing
OnlineConferencing

Online conferencing details.

registration
Registration

RSVP or ticketing registration details.

seoSettings
SeoSettings

SEO settings.

shortDescription
string

Short description that appears under the event title.

slug
string

Unique identifier of the event page. The naming is the same as the event title written in kebab case. For example, if your event title is "Leather Crafting 101", then the slug is "leather-crafting-101".

status
string

Event status:

  • UPCOMING: Event is published and scheduled to start.
  • STARTED: Event has started.
  • ENDED: Event has ended.
  • CANCELED: Event is canceled.
  • DRAFT: Event is not published.
summaries
Summaries

Summary of RSVP or ticket sales.

title
string

Event title.

userId
string

ID of the user who created the event.

Was this helpful?

getEvent example

Copy Code
1import { wixEventsV2 } from 'wix-events.v2';
2
3 async function getEvent(eventId, options) {
4 try {
5 const result = await wixEventsV2.getEvent(eventId, options);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13