Skip to main content

getAllEvents

Get all available events. 🔐 This method requires authorization.

Description​

Fetches the events configured in the project and resolves to an array of IContentApiEvent objects.

.getAllEvents(

);

Examples​

Minimal example​

const response = await Events.getAllEvents();

Example response​

[
{
"id": 4,
"identifier": "send_code",
"localizeInfos": {
"title": "Code"
}
},
{
"id": 3,
"identifier": "registration_event",
"localizeInfos": {
"title": "Registration"
}
},
{
"id": 2,
"identifier": "lessPrice",
"localizeInfos": {
"title": "less price"
},
"module": "catalog"
}
]

Response schema​

Schema: IContentApiEvent[]

id: number
Event ID.
example: 1

identifier: string
Marker of the event.
example: "price_change"

localizeInfos: Record<string, unknown>
Localized data of the event.

module: string
Module the event belongs to; absent on system events that are not bound to a module, such as send_code.
example: "catalog"