Create/Modify Subscriber
The Create/Modify Subscriber API is used to create a new subscriber and also modify an already existing subscriber.
IMPORTANT: Only Create/Modify Subscriber API is used to create and update a subscriber
URL
The HTTP URL for Create/Modify Subscriber API is:
http://<host>:<port>/api/v1/subscribers
This service implements Gateway Filter for Authentication to authenticate access of the service by a user.
Method
POST
Header
The payload's request header includes Content-Type as application/json
Input Parameters
The following fields are input parameters:
Sample Request
{
"subscriptionService": {
"subscribe": {
"sid": "923456XQY",
"appId": "20096-6548262167",
"ufid": "aron.hale@kony.com",
"osType": "androidgcm",
"deviceId": "92345600X",
"deviceName": "Demo_Device"
}
}
}
NOTE: You need to use specific key words while providing parameters for osType in the sample request. The sample payload for all the osType is given below.
{
"subscriptionService": {
"subscribe": {
"sid": "923456XQYL",
"appId": "25016-9447884208",
"ufid": "deepak.seth@gmail.com",
"osType": "iphone or ipad", // For Apple
"osType": "androidgcm or androidjpush",
"osType": "blackberry",
"osType": "windows",// For MPNS subscription
"osType": "windows8",// For WNS subscription
"osType": "webfcm",
"deviceId": "92345600XZ",
"deviceName": "Demo_Device"
}
}
}
Sample Responses
{
"id" : "9073640394665981874",
"message" : "Subscription successful. "
}{
"id" : "4927718950329103027",
"message" : " Update successful. "
}
Response Status
| Code | Description |
|---|---|
| Status 200 | Subscription successful |
| Status 400 | Invalid Kony application ID Invalid Request. SID Cannot be empty Error occurred at property subscriptionService->subscribe->osType Invalid Request. DEVICEID Cannot be empty |
| Status 401 | Unauthorized request |
| Status 500 | Server failure to process request |