POST rule engine/triggers
(Difference between revisions)
Renato.neves (Talk | contribs) (→JSON Parameters) |
Renato.neves (Talk | contribs) (→JSON Parameters) |
||
Line 12: | Line 12: | ||
{| | {| | ||
− | |||
− | |||
− | |||
− | |||
! align="left" width="200px" | appliance_id | ! align="left" width="200px" | appliance_id | ||
− | | width="200px" | required | + | | width="200px" | required |
| Motorola ADSP identifier. | | Motorola ADSP identifier. | ||
|- | |- | ||
! align="left" width="200px" | mac_address | ! align="left" width="200px" | mac_address | ||
− | | width="200px" | required <sup> | + | | width="200px" | required <sup>1</sup> |
| user MAC Address. | | user MAC Address. | ||
|- | |- | ||
! align="left" width="200px" | mpact_client_id | ! align="left" width="200px" | mpact_client_id | ||
− | | width="200px" | required <sup> | + | | width="200px" | required <sup>1</sup> |
| user Motorola MPact Client ID. | | user Motorola MPact Client ID. | ||
|- | |- | ||
! align="left" width="200px" | login_user_id | ! align="left" width="200px" | login_user_id | ||
− | | width="200px" | required <sup> | + | | width="200px" | required <sup>1</sup> |
| user identifier. | | user identifier. | ||
|- | |- | ||
Line 41: | Line 37: | ||
|} | |} | ||
− | <sup>1 | + | <sup>1</sup> 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 == | == Authentication == |
Revision as of 14:59, 13 April 2015
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
appliance_id | required | Motorola ADSP identifier. |
---|---|---|
mac_address | required 1 | user MAC Address. |
mpact_client_id | required 1 | user Motorola MPact Client ID. |
login_user_id | required 1 | 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 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