Update Event (Custom)

Lets you add or remove fields and customers for an event. You need to pass the entire payload of the event.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Prerequisites

  • Authentication: Basic/OAuth authentication
  • Default access group

Example request

curl --location --request PUT 'https://eu.api.capillarytech.com/v2/events' \
--header 'Content-Type: application/json' \
--header 'Cookie: _cfuvid=wt8d4fYS58HryJHm8c1rXf1DHjZVfMI9qocnVL_Stxo-1758799896660-0.0.1.1-604800000; _cfuvid=NMpRvtWWP3izaAO2jX6gHgmPjT1VrUYA4rFoEvaCGtI-1758802176508-0.0.1.1-604800000' \
--header 'Authorization: Basic bWFkMjU2YQ==' \
--data '{
    "eventName": "Group_User_Event",
    "actions": [
        "EMFConsumer"
    ],
    "fields": [
        {
            "attributes": {
                "addCustomerIfNotExists": {
                    "valueType": "Boolean",
                    "value": "true"
                }
            },
            "type": "customer",
            "name": "customer"
        },
        {
            "attributes": {
                "isRequired": {
                    "valueType": "Boolean",
                    "value": "false"
                }
            },
            "type": "tillCode",
            "name": "String"
        },
        {
            "attributes": {
                "isRequired": {
                    "valueType": "Boolean",
                    "value": "false"
                }
            },
            "type": "groupId",
            "name": "enum"
        }
    ]
}'
curl --location --request PUT 'https://eu.api.capillarytech.com/v2/events' \
--header 'X-CAP-API-OAUTH-TOKEN: eyJraWQiOiJrMSIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJDYXBpbGxhcnkiLCJleHAiOjE3NDY0NjU3NzYsImp0aSI6IktwX3ltdGI3aEZoU21XclhJV3NHeVEiLCJpYXQiOjE3NDY0NjM5NzYsInN1YiI6InJ1dHVqYU9hdXRoIiwiY2xpZW50X2lkIjoyMjk1Mywib3JnX2lkIjoxMDA3MzcsInRva2VuX3VzZSI6InRva2VuX2FjY2VzcyIsImNsaWVudF9rZXkiOiJoaHNBenBocGNGOFI4bkdYZzZrQjBBcDdYIiwiZGVmYXVsdF90aWxsIjo3NTE1NTM3Mywic2NvcGVzIjoiW10ifQ.HJUQdt3jhAz67d-aPKegIyNwXpdlpx1PWGrjOIYw-Ei8CeV6UAq0kvFYbZhzcBx5tEshUgC39vKt4lJ14O_yIz_Ta-vuDRhvsCJeo1CgOpEV-MI2FwnAu1A6vyB7E7T2UnuZPKUukvenkHtZvk8MpS61PhQvU92DvOLoAkdN4tTYbj4pCzV0xlqejPrXFJewHFcXjuEeskoPy_RX8BecdxxbKB4JsHJ4ererD6_YrfTQPLgvnAcOffREe_0Wa_xCtK4CBihsD2IeMQuACBp_STqgeEegRhKGVySqcAE1FpYtkY7NtfLe4YWVQD4Nd6un-XouRnfpD5K4o1e69OVSNA' \
--header 'Content-Type: application/json' \
--header 'Cookie: _cfuvid=PeVDUYK1.WXqSbLr9s0KMRB_g5pBGS1W1BDpQykP18I-1746463976267-0.0.1.1-604800000; _cfuvid=QlI8tqYI8Ta5fLsAYaGDCkEEFdMMKubnukity31whYk-1758804658292-0.0.1.1-604800000' \
--header 'Authorization: Basic bWFkaHVfcmltYTowZjAwNmZlNGM4ZjFhNmRjMmI2ZDI1N2NkNzI3MjU2YQ==' \
--data '{
    "eventName": "TestBE-Rutuja",
    "actions": [
        "EIConsumer"
        
    ],
    "description": "This is a demo event created && updated by Rutuja Hatwar",
    "fields": [
        {
            "name": "customer",
            "type": "customer",
            "attributes": {
                "addCustomerIfNotExists": {
                    "valueType": "Boolean",
                    "value": "false"
                }
            }
        },
        {
            "name": "String",
            "type": "tillCode",
            "attributes": {
                "isRequired": {
                    "valueType": "Boolean",
                    "value": "false"
                }
            }
        },
        {
            "name": "enum",
            "type": "tillCode",
            "attributes": {
                "isRequired": {
                    "valueType": "Boolean",
                    "value": "false"
                }
            }
        }
    ]
}'

Request Body Parameters

ParameterTypeDescription
eventName*stringName of the event.
actions*enumDestination of the event. Values: EMFConsumer for EMF related events: Loyalty, DVS, and Communication, EIConsumer for Essential Insights.
descriptionstringA short description for the event.
fieldsobjConfigure fields for the current event with attributes: name, type, and value.
-addCustomerIfNotExists - Adds the customer if the customer does not exist.
-isRequired - Marks the attribute as mandatory
-isUniqueKeyField - Includes the attribute, to the unique key. Once defined as a unique key field, this attribute becomes mandatory and needs to be marked as isRequired. By default, customer identifier and event name are already part of the unique key.
namestringName of the field.
typeenumSpecify the type of the attribute. Values: tillCode, couponCode, customer, productSku, productBrand, productCategory, string, double.
addCustomerIfNotExistsobjSet this value to true to allow registering new customers in to the loyalty program automatically
valueTypeenumData-type of the attribute. For example, Boolean, Enum, String.
valuestringValue of the attribute based on its valueType.For example, if valueType is Boolean, value could be either true or false.

All parameters marked with * are mandatory. For more information on event uniqueness check, refer to the documentation.

Example response

{
    "warnings": [],
    "errors": []
}


Body Params
string
Response

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json