POST api/RTO/device/RegisterDevice
To register the SmartPhone device for push notification purpose
POST api/RTO/device/PushNotification
Request Information
URI Parameters
None.
Body Parameters
DeviceRegistrationModel
DeviceRegistrationModel| Name | Description | Type | Additional information |
|---|---|---|---|
| UserName |
This is the unique user id of the student which they use for login into RTOManager |
string |
Required |
| DeviceToken |
This is unique device token of the registered mobile device (IOS or Android) |
string |
Required |
| DeviceType |
Android or IOS |
DeviceType |
Required |
| RegistrationAction |
The action required if the user already exist, possible values could be u = update, n = save new record |
RegistrationAction |
None. |
| ApplicationUrl |
URL of RTOM Instance from where the device is registered |
string |
None. |
Request Formats
application/json, text/json
{
"UserName": "sample string 1",
"DeviceToken": "sample string 2",
"DeviceType": "Android",
"RegistrationAction": "U",
"ApplicationUrl": "sample string 3"
}
application/xml, text/xml
<DeviceRegistrationModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MobileApp_WebAPI.Models.RTO"> <ApplicationUrl>sample string 3</ApplicationUrl> <DeviceToken>sample string 2</DeviceToken> <DeviceType>Android</DeviceType> <RegistrationAction>U</RegistrationAction> <UserName>sample string 1</UserName> </DeviceRegistrationModel>
Response Information
Resource Description
Response message
ServiceResponseModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Code |
Response code 0 for success and 1 for error |
string |
Required |
| Message |
Message with description of error in case the response is 1 |
string |
Required |
Response Formats
application/json, text/json
{
"Code": "sample string 1",
"Message": "sample string 2"
}
application/xml, text/xml
<ServiceResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MobileApp_WebAPI.Models.RTO"> <Code>sample string 1</Code> <Message>sample string 2</Message> </ServiceResponseModel>