Event Rules Model

The Event Rules model has the following endpoints:

Action

Method

resource

Description

Get All Event Rules

GET

/event_rules

Find Event Rules

GET

/event_rules/:event_rule_id

Update Event Rule

PUT

/event_rules/:event_rule_id

Create Event Rule

POST

/event_rules

Remove Event Rule

DELETE

/event_rules/:event_rule_id

Get All Event Channels

GET

/event_rules/:event_rule_id/channels

Find Event Channel

GET

/event_rules/:event_rule_id/channels/:event_rule_channel_id

Create Event Channel

POST

/event_rules/:event_rule_id/channels

Update Event Channel

PUT

/event_rules/:event_rule_id/channels/:event_rule_channel_id

Delete Event Channel

DELETE

/event_rules/:event_rule_id/channels/:event_rule_channel_id

📘

Event Rules info

  • Only admins can use this endpoints

The Event rule model is composed of the following attributes:

Attribute

Type

Required

Description

Whereable

name**

String

Yes

Name of event rule

Yes

description**

String

No

Event rule description

Yes

enabled

Boolean

No

Identifier to know if event rule is activated
If not provided by default is enabled

Yes

launch_type

Select

Yes

The identifier to know if the rule event is a 'times' or 'date'

Yes

date

Date

Yes

Required if 'launch_type' is set to 'date'

Yes

times

Array

Yes

Required if 'launch_type' is set to 'times'
This is not whereable

Yes

type

Select

Yes

For now only one selection: 'abandoned_cart'

Yes

The Event Rule Channels model is composed of the following attributes:

Attribute

Type

Required

Description

title**

String

Yes

Name of the event channel

body**

String

Yes

enabled**

Boolean

No

Identifier to know if event rule is activated
If not provided by default is enabled

channel**

String

Yes

Identifier of which channel type.

'email', 'sms', 'notification'