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

ElementNumTypeDescription
Authentication1ObjectAuthenticationObject
Username1StringUsername unique to the property.
Password1StringPassword Unique to the property.
MessageType1StringSet to 'Ping'
MessageID1StringUnique Message ID (UUID Format)
TimeStamp1DateTimeDate and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
EchoData1StringEchoData 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

ElementNumTypeDescription
MessageID1StringUnique Message ID (UUID Format)
TimeStamp1DateTimeDate and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
Status1StringElement contains either Error or Success
EchoData1StringThe echo reply data on Success.
ErrorMessage0..1StringError message if an error was encountered.