LRSConnect Activation
Methods relating to the activation of gateway to LRSConnect and connection status.
LRSConnect is a cloud service that allows franchises or a restaurant chain to collect their orders for each restaurant into a central location for a higher-level overview and to gain analytics into the performance of their restaurants.
If interested with integrating with the cloud, visit the LRSConnect API or connect LRSUS.
While it is not necessary to provide integration, cloud connectivity can be established through the API.
POST /api/v2/gateway/activate
Enables connection to LRSConnect given device code. To retrieve device code, contact LRSUS if you are a subscriber. Once successfully activated, this endpoint does not need to be called again unless a factory reset on the gateway occurs.
Body Parameters
Property | Description | Type |
---|---|---|
deviceCode | Code used to activate gateway against LRSConnect. Should be a 10 digit string separated by hyphens. e.g. 012-3456-789 | string |
Responses
200 OK
Successfully activated with cloud.
{
"status": 200,
"returnCode": 1011,
"message": "Successfully activated with LRSConnect."
}
200 OK
Already activated.
{
"status": 200,
"returnCode": 1008,
"message": "Already activated with LRSConnect."
}
400 Bad Request
deviceCode
passed is not recognized by LRSConnect.
{
"status": 400,
"message": "Invalid device code.",
"returnCode": -19
}
400 Bad Request
Device code is not in the proper format.
{
"status": 400,
"message": "Malformed device code. Must be in the format of 012-3456-789",
"returnCode": --17
}
400 Bad Request
deviceCode
not passed.
{
"status": 400,
"message": "Missing device code.",
"returnCode": -18
}
GET /api/v2/gateway/activate
Retrieves status of last known connection to LRSConnect. Useful for debugging if there is a problem connecting to the cloud.
Responses
Response Details
Property | Description | Type |
---|---|---|
state | Connection state of the gateway to LRSConnect. - NOT_CONFIGURED indicates that connection to LRSConnect has not been attempted.- CONFIGURED indicates that the gateway already has device code stored and is ready to be activated. This state may not be shown as the gateway will attempt to activate itself when the gateway is powered on and is connected to internet. If CONFIGURED remains, it might indicate a network issue.- NOT_ACTIVATED indicates the gateway has attempted activation and failed, either due to issues on LRSConnect which would be detailed in lastCloudStatus or an incorrect device code was used.- ACTIVATED indicates gateway is connected to cloud. | enum values: NOT_CONFIGURED CONFIGURED NOT_ACTIVATED ACTIVATED |
lastCloudConnected | Describes the last date and time the gateway was connected to LRSConnect and sent out orders. | datetime (string) |
lastCloudStatus | Describes the results of last connection. Will include the HTTP status code as well as a message detailing some kind of fault or success. This can be used to debug if there is an issue with the gateway sending orders. | object or null |
200 OK (New Device Activation Status)
Expected status for a new device that has not attempted activation and does not have an existing configuration.
{
"status": 200,
"returnCode": 12,
"activationStatus": {
"state": "NOT_CONFIGURED",
"lastCloudConnected": null,
"lastCloudStatus": null
}
}
200 OK (Configured Device Activation Status)
Expected status for a device that has been configured with a device code but has not attempted activation. This state may not be seen if gateway is immediately connected to internet and has successfully activated.
{
"status": 200,
"returnCode": 12,
"activationStatus": {
"state": "CONFIGURED",
"lastCloudConnected": null,
"lastCloudState": null
}
}
200 OK (Already Activated Status)
If the gateway has attempted to be activated and is already activated according to LRSConnect, the pairState
will remain ACTIVATED
and lastCloudStatus will indicate that the gateway has been attempted to be activated.
{
"status": 200,
"returnCode": 12,
"activationStatus": {
"state": "ACTIVATED",
"lastCloudConnected": null,
"lastCloudStatus": null
}
}
Updated almost 7 years ago