Skip to content
ulkeroz edited this page Mar 5, 2015 · 2 revisions

This API is used for sending push messages to devices.

  • POST /CurioAdmin/sapi/push/send/{profileId}/{timestamp}/{hash}

  • Content-Type: application/json

  • Request Body: (For sending push to defined tokens)

{

"messageContent" : "Content of push message!",
"platforms" : [ { 
      "profilePlatform" : {"id": 421} ,
      "messageParams" : [  
          {"messageKey":"ios-key-1", "messageValue":"value-1"},
          {"messageKey":"ios-key-2", "messageValue":"value-2"}
       ]
    }, { 
      "profilePlatform" : {"id": 420} ,
      "messageParams" : [  
          {"messageKey":"android-key-2", "messageValue":"value-2"},
          {"messageKey":"android-key-1", "messageValue":"value-1"}
       ]
    } ],
"rules" : [ { 
      "pushType" : "SELECTIVE", "tokens":["token-1", "token-2", "token-3"]}]
    } ]

}

  • Request Body: (For sending push to defined customId’s)

{

"messageContent" : "Content of push message!",
"platforms" : [ { 
      "profilePlatform" : {"id": 421} ,
      "messageParams" : [  
          {"messageKey":"ios-key-1", "messageValue":"value-1"},
          {"messageKey":"ios-key-2", "messageValue":"value-2"}
       ]
    }, { 
      "profilePlatform" : {"id": 420} ,
      "messageParams" : [  
          {"messageKey":"android-key-2", "messageValue":"value-2"},
          {"messageKey":"android-key-1", "messageValue":"value-1"}
       ]
    } ],
"rules" : [ { 
      "pushType" : "CUSTOM_ID", "tokens":["customId-1", "customId-2", "customId-3"]}]
    } ]

}

  • profileId : ID of profile definition @Curio

  • timestamp : Current timestamp as long (in milliseconds)

  • hash : a token which is generated using HmacMD5 encryption on “profileId + timestamp + apiKey of the application @Curio

  • messageContent : Content of push message to send.

  • platforms : Platform definitions for sending push ( with id & custom parameters for push)

  • rules : Must be set as “SELECTIVE” for sending push with tokens. Must be set as “CUSTOM_ID” for sending push with customId’s.

  • Long : the pushId which can be used for tracking the push status is returned.

  • SELECTIVE

  • BULK

  • ONLINE

  • SCREEN

  • EVENT

  • DEVICE_TYPE

  • OPERATING_SYSTEM

  • VERSION

  • DEVICE_VENDOR

  • GSM_OPERATOR

  • DEVICE_MODEL

  • SCREEN_RESOLUTION

Clone this wiki locally