POST rule engine/triggers

From Social ID Developers
Revision as of 17:02, 30 December 2021 by Gabriel.prado (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Description

Trigger an event for a Login User.

See all available events.

Resource URL

  POST https://api.socialidnow.com/v1/marketing/rule_engine/triggers

Parameters

JSON Parameters

trigger required A hash in the format field:value, with the necessary fields for the trigger:
account_source required Type of account source. Allowed values: account, adsp.
account_identifier required 1 Value of account source.
login_user_source required Type of login user source. Allowed values: login_user, mac_address, mpact_client_id.
login_user_identifier required Value of login user source.
event_type optional Type of the event to be triggered. See all available events.
event_attrs optional A hash in the format field:value, with specific parameters for the triggered event. See all available events.

1 Must not be informed if account_source is set to account, as the value is inferred from the authentication.

Authentication

This API requires Account authentication. See Authentication.

Response

Response Status

accepted (202) The event was accepted and will be processed.
bad_request (400) Some required parameter was not informed.
unauthorized (401) The authentication is wrong. See Authentication.
internal_server_error (500) An unknown error happened.

Examples

Trigger a "region_entered" event from AirDefense Services Platform (ADSP) to the user identified by the MAC address "0a:1b:2c:3d:4e:5f":

Request

 curl -iX POST 'https://api.socialidnow.com/v1/marketing/rule_engine/triggers' \
 -d '{
         "trigger": {
           "account_source": "adsp",
           "account_identifier": "24E3S8Z7S6CYI91IOOFN",
           "login_user_source": "mac_address",
           "login_user_identifier": "0a:1b:2c:3d:4e:5f",
           "event_type": "region_entered",
           "event_attrs": {
             "region_name": "region A"
           }
         }
     }' \
 -H 'Content-type: application/json' \
 --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers
HTTP/1.1 202 Accepted
Status: 202
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox