Lets you create a new behavioral event.
Authentication
- Valid OAuth 2.0 authentication token must be included in the request header.
- Use the X-CAP-API-OAUTH-TOKEN header to pass the token.
Request Body Parameters
Parameter | Type | Description |
---|---|---|
eventName* | string | Name of the event. |
actions* | enum | Destination of the event. Values: |
description | string | Short description for the event. |
fields | obj | Configure fields for the current event with attributes:
|
name | string | Specify the name of the field. |
type | enum | Specify the type of the attribute. Values: |
addCustomerIfNotExists | obj | Set this value to |
valueType | enum | Data-type of the attribute. For example, |
value | string | Value of the attribute based on its |
identifierType | Object | Specify the identifier type and its value |
value | String | Supported values: userId, mobile, email, externalId, wechat, martjackId, cuid, fbid, unionId, fcmToken, line, cardnumber, cardExternalId |
valueType | String | Value for the identifier type |
For information on event uniqueness check, see Event uniqueness check.
API specific Error codes
Error Code | Description | Reason |
---|---|---|
1806 | Event_name event already exists | Already existing event name |
1810 | Event_name event actions invalid | Invalid or unsupported event actions |
1811 | event name invalid | Invalid or unsupported event name |
1823 | tillCod invalid event field type | Invalid or unsupported event field type |
1802 | field attribute value fails for validation type isRequired | Invalid/null field attribute value |