y2kshane / Ideabiz-adminapp-common-models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Java Classes for Admin App

More information : http://docs.ideabiz.lk/en/Go_Live/Admin_API

##Subscription Result

{
  "subscription": {
    "number": "94777123456",
    "status": "SUBSCRIBED",
    "registration": {
      "datetime": "2014-05-20 10:33:11",
      "method": "SMS"
    },
    "unregistration": {
      "datetime": "2014-05-20 10:33:11",
      "method": "SMS"
    }
  }
}

field Description mendetory
number Subscriber mobile number. Eg: 94777123456 mendetory
status current status
UNSUBSCRIBED : User already unsubscribed
SUBSCRIBED : User have active subscription
BLOCKED : User blocked from application
INACTIVE : User subscribed to app. but not active. may be insufficient balance
mendetory
registration User registration info mendetory
registration -> datetime User registration timestamp mendetory
registration -> method User registration method
values : SMS, WEB, USSD
mendetory
unregistration User registration info
if no unregistration information, this should null
optional
unregistration -> datetime User registration timestamp mendetory
unregistration -> method User registration method
values : SMS, WEB, USSD, ADMIN
mendetory

History

{
  "subscriberHistory": {
    "number": "94777123456",
    "offset": 10,
    "limit": 0,
    "history": [
      {
        "datetime": "2014-05-20 10:33:11",
        "trigger": "ADMIN",
        "event": "UNSUBSCRIBE",
        "note": "",
        "status": "SUCCESS"
      },
      {
        "datetime": "2014-05-20 10:33:11",
        "trigger": "SYSTEM",
        "event": "CHARGING",
        "note": "no funds",
        "status": "FAILED"
      },
      {
        "datetime": "2014-05-20 10:33:11",
        "trigger": "SYSTEM",
        "event": "SMS",
        "note": "",
        "status": "SUCCESS"
      },
      {
        "datetime": "2014-05-20 10:33:11",
        "trigger": "SUBSCRIBER",
        "event": "SUBSCRIBE",
        "note": "",
        "status": "SUCCESS"
      }
    ]
  }
}
field Description mendetory
number Subscriber mobile number. Eg: 94777123456 mendetory
offset Offset of current response mendetory
limit limit of current response mendetory
history last 10 events regarding specific user
this array contain object of history
mendetory
history -> datetime event timestamp mendetory
history -> trigger actor of event trigger.
Eg : SYSTEM,SUBSCRIBER,ADMIN
mendetory
history -> event event type
Eg: SUBSCRIBE, UNSUBSCRIBE, SMS, USSD, CHARGING
mendetory
history -> note any note as string mendetory
history -> status specific event status
Eg : SUCCESS, FAILED
mendetory

Not found subscription

{
  "subscription": {
    "number": "94777123456",
    "status": "NOTFOUND"
  }
}
field Description mendetory
number Subscriber mobile number. Eg: 94777123456 mendetory
status current status
NOTFOUND : User subscription not found
mendetory

Subscription deleted

{
  "subscription": {
    "number": "94777123456",
    "status": "UNSUBSCRIBED",
  }
}
field Description mendetory
number Subscriber mobile number. Eg: 94777123456 mendetory
status Unsubscribe status
UNSUBSCRIBED : Successfully removed user from application
NOTFOUND : User subscription not found
NOTCHANGED : user not subscribed to application or unsubcription failed
mendetory

Error

{
  "error": {
    "statusCode": "ERROR",
    "message": "Unable to proccess request",
  }
}

About


Languages

Language:Java 100.0%