Oracle Help Center | Oracle Push Cloud Service (Standalone) title

Example cUrls

Users can be queried a handful of ways:

You can also use query logic to further segment your pushes.


Below is a list of Example cURLs to give you an idea of how to configure your backend for our APIs.


Category Query (AND/OR/NOT Logic):


AND:

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Test AND"}&tag_query=Colorado AND Skiing'  


OR:

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Test OR"}&tag_query=Colorado OR Skiing'


AND/OR:

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Test AND/OR"}&tag_query=(Colorado AND Skiing) or (Utah AND Snowboarding)'  


NOT:

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Test NOT"}&tag_query=broadcast NOT USA'



Location Query:


Basic Location

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Test Location"}&location_query={"reg":{"lat":<LATITUDE>,"lon":<LONGITUDE>,"dist":<RANGE_OF_SEARCH_IN_KILOMETERS>}}&audience=broadcast'


Location + Categories

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"You are near Push IO and enjoy Cars"}&location_query={"reg":{"lat":40.017796,"lon":-105.281941,"dist":0.5}}&tag_query=broadcast AND Cars'



Sending to Individual Users:


Sending To Multiple UUIDs on Multiple Platforms

curl 'https://api.pushio.com/api/v1/notify_devices/APP_ID/SENDER_SECRET' -d 'payload={"message":"Test Direct Message"}&recipient_ids={"AAAAAAAAAA_axxx":["00000000-0000-0000-0000-000000000000"],"AAAAAAAAAA_gxxx":["00000000-0000-0000-0000-000000000001","00000000-0000-0000-0000-000000000002"]}'


Sending To Multiple User Identifiers

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Test Direct Message"}&tag_query=$user_identifier="user_50_from_CRM" OR $user_identifier=”user_100_from_CRM”'



Push Payload with Unique/Per-Platform Data:

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Test","payload_gcm":{"alert":"Hello Android Users!","sound":"rooster"},"payload_apns":{"alert":"Hello iOS Users!","sound":"default.wav","badge":10}}&audience=broadcast'



Useful cURL Commands:


Timezone Push

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Timezone Push Test"}&tag_query=$timezone="America/Denver" or $timezone="America/Los_Angeles"'


Inactive User Push

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Inactive User Push Test"}&tag_query=$updated_at < days_ago(7)'


Locale Push

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Locale Push Test"}&tag_query=($locale ="en_US" or $locale = "de_DE") and Soccer'


Scheduled Push

curl 'https://api.pushio.com/api/v1/notify_app/APP_ID/SENDER_SECRET' -d 'payload={"message":"Happy New Years!","payload_apns":{"sound":"default.wav"}}&audience=broadcast&deliver_at=2013-12-31T23:59:59Z'