POST rule engine/triggers

From Social ID Developers
Revision as of 14:52, 13 April 2015 by Renato.neves (Talk | contribs)
Jump to: navigation, search

Contents

Description

Trigger an event for a Social Login user.

Resource URL

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

Parameters

JSON Parameters

account_id required 1 Marketing Account identifier.
appliance_id required 1 Motorola ADSP identifier.
mac_address required 2 user mac address.
mpact_client_id required 2 user Motorola MPact Client ID.
login_user_id required 2 user identifier.
event_type required type of the event to be triggered.
event_attrs optional a hash in the format field:value, with specific parameters for the triggered event.

1 Account identifier: the account for whom the event will be triggered must be informed by the fields "account_id" or "appliance_id". Therefore, one of these fields must be given.

2 User identifier: the user for whom the event will be triggered must be informed by the fields "mac_address", "mpact_client_id" or "login_user_id". Therefore, one of these fields must be given.

Authentication

This API requires Marketing 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

Using appliance_id and mac_address

Request

curl -iX POST 'https://api.socialidnow.com/v1/marketing/rule_engine/triggers' \
 -d '{"appliance_id": "24E3S8Z7S6CYI91IOOFN",
      "mac_address": "0a:1b:2c:3d:4e:5f",
      "event_type": "presence_entered"} }' \
 -H 'Content-type: application/json' \
 --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers
HTTP/1.1 202 Accepted
Status: 202

Using appliance_id and login_user_id

Request

curl -iX POST 'https://api.socialidnow.com/v1/marketing/rule_engine/triggers' \
 -d '{"appliance_id": "24E3S8Z7S6CYI91IOOFN",
      "login_user_id": "873",
      "event_type": "region_exit",
      "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