Ping Request
Description
The Ping message is used to test the API connection. It is usually the first message to be completed in the development process since it is the most simple to implement compared to the other messages.
When a client application sends a correctly-formatted & authenticated JSON Ping message Levart will respond with a corresponding response message.
The EchoData element is required to be set with some data to be returned in the response.
It would be ideal if this message is implemented in both directions to assist in the certification process. e.g. By Levart pushing the ping request to PMS JSON service and getting a response, and also the PMS being able to Ping Levart's JSON service and get a response
This message is provided for development and is not required for production usage.
Direction
Levart → PMS
and
PMS → Levart
Request
{
"Authentication" : {
"Username": "abc",
"Password": "456"
},
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-01-28T15:15:00+08:00",
"MessageType": "Ping",
"EchoData": "Test123"
}
Specification JSON Ping Request
Element | Num | Type | Description |
---|---|---|---|
Authentication | 1 | Object | AuthenticationObject |
Username | 1 | String | Username unique to the property. |
Password | 1 | String | Password Unique to the property. |
MessageType | 1 | String | Set to 'Ping' |
MessageID | 1 | String | Unique Message ID (UUID Format) |
TimeStamp | 1 | DateTime | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
EchoData | 1 | String | EchoData element, contains the contents of the string in the EchoData request |
Response (Success)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-01-28T15:15:00+08:00",
"Status": "Success",
"EchoData": "Test123"
}
Response (Error)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-01-28T15:15:00+08:00",
"Status": "Error",
"ErrorMessage": "Invalid username or password."
}
Specification JSON Ping Response
Element | Num | Type | Description |
---|---|---|---|
MessageID | 1 | String | Unique Message ID (UUID Format) |
TimeStamp | 1 | DateTime | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
Status | 1 | String | Element contains either Error or Success |
EchoData | 1 | String | The echo reply data on Success. |
ErrorMessage | 0..1 | String | Error message if an error was encountered. |