This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// subscribe to notification | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveTestNotification:) name:[Wootric surveyDidDisappearNotification] object:nil]; | |
- (void) receiveTestNotification:(NSNotification *) notification | |
{ | |
if ([[notification name] isEqualToString:[Wootric surveyWillAppearNotification]]){ | |
NSLog (@"Survey will be presented!"); | |
} else if ([[notification name] isEqualToString:[Wootric surveyWillDisappearNotification]]){ | |
NSLog (@"Survey will disappear!"); | |
} else if ([[notification name] isEqualToString:[Wootric surveyDidAppearNotification]]){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Payload | |
{ | |
"end_users": "[{ \"phone_number\":\"+17862927907\", \"external_id\": \"sms_external_id_1\", \"properties\": {\"name\": \"Diego\",\"role\": \"Developer\",\"city\": \"Ayampe\"}}, { \"phone_number\":\"+15126636854\", \"external_id\": \"sms_external_id_2\", \"properties\": {\"name\": \"Prabhat\",\"role\": \"CTO\",\"city\": \"San Jose\"}}]", | |
"survey_immediately": true, | |
"show_disclaimer": true, | |
"custom_disclaimer_message": "*SMS rates apply", | |
"intro": "Hi, please answer this survey.", | |
"survey_settings": { | |
"language" : "EN", | |
"product_name": "Wootric" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -H "content-type: application/json" \ | |
-H "Authorization: Bearer <your_token>" \ | |
"http://api.wootric.com/v1/sms_survey" \ | |
-d { | |
"end_users": "[{\"phone_number\":\"+17862960233\", \"properties\": {\"country\": \"USA\"}}]", | |
"survey_immediately": true, | |
"show_disclaimer": true, | |
"custom_disclaimer_message": "*disclaimer message", | |
"intro": "test intro", | |
"survey_settings": {"product_name": "Custom Product", "language": "FR"} |