LLSR API - Scanning API Specification and Examples

Note that the methods in this API require authentication to use them. Visit the Authentication API for more information.

Root Nodes

/scanning                     Scanning API root node
/scanning/lifts               Lift information
/scanning/{barcode}/hotlist   Hotlist information for a ticket/pass
/scanning/{barcode}/usage     Usage information for a ticket/pass
/scanning/{barcode}/validate  Validation of a ticket/pass

/scanning/lifts

Reading

Details of the currently available lifts can be quieried through the lifts node. The following example shows how the /scanning/lifts/ endpoint is used to achieve this:

GET /scanning/lifts HTTP/1.1
Host: api.skilouise.com

In this example, a query on the lifts endpoint might generate the following JSON-encoded result:

{
  "lifts":[
    {
      "id":3,
      "short":"GC",
      "name":"Glacier"
    },
    {
      "id":5,
      "short":"LL",
      "name":"Gondola"
    },
    {
      "id":7,
      "short":"PT",
      "name":"Ptarmigan"
    },
    {
      "id":6,
      "short":"SC",
      "name":"Sunny Carpet"
    },
    {
      "id":17,
      "short":"ST",
      "name":"Sunny Tube"
    },
    {
      "id":8,
      "short":"TP",
      "name":"Terrain Park"
    }
  ]
}
	

If there aren't any lifts associated with a resort then the following JSON-encoded result might be generated:

{
  "error":{
    "code":200,
    "message":"No lifts available"
  }
}

Publishing

Unavailable.

Updating

Unavailable.

Deleting

Unavailable.

/scanning/{barcode}/hotlist

Reading

Details of the status of a ticket/pass can be queried through the hotlist node. The following example shows how the /scanning/hotlist endpoint is used to achieve this:

GET /scanning/HFT31092/hotlist HTTP/1.1
Host: api.skilouise.com

In this example, a query on the pass/ticket HFT31092 might generate the following JSON-encoded result:

{
  "barcode":"HFT31092",
  "hotlist":[
    {
      "code":0,
      "description":"ACTIVE",
      "barcode":"HFT31092",
      "date_entered":"2015-01-07 10:37",
      "date_from":"2015-01-07",
      "date_until":"2015-10-15",
      "employee":"Mountain Greeter",
      "comment":" Customer: LIAM DOWNEY",
      "resort":"Lake Louise"
    },
    {
      "code":58,
      "description":"QUIT",
      "barcode":"HFT31092",
      "date_entered":"2015-01-03 17:11",
      "date_from":"2015-01-05",
      "date_until":"2016-01-06",
      "employee":"Termination Form",
      "comment":"Automatic Hotlist - Employee has left the company",
      "resort":"Lake Louise"
    }
    ]
}

If the ticket/pass HFT31092 did not exist, the following error result would be generated:

{
  "error":{
    "code":200,
    "message":"Barcode has no history"
  }
}

Publishing

Recording a hotlist entry of a ticket/pass a can be made through the hotlist node. The following example shows how the /scanning/hotlist endpoint is used to achieve this:

POST /scanning/HFX12345/hotlist HTTP/1.1
Host: api.skilouise.com

code=99&until=2019-01-01T00:00:00-06:00&employee=Test Employee&comment=Testing

In this example, the pass "HFX12345" is being hotlisted by Test Employee with code 99 (SEE GS) from the current date/time until midnight of January 1, 2019 (Mountain Daylight Savings Time, 6 hours behind UTC). The comment field is optional, and is used to provide additional information about the hotlist, reasons for hotlisting, and so on.

An optional 'from' can be used to specify the date/time the hotlist entry begins; e.g.:

POST /scanning/HFX12345/hotlist HTTP/1.1
Host: api.skilouise.com

code=99&from=2018-12-01T00:00:00-06:00&until=2019-01-01T00:00:00-06:00&employee=Test Employee&comment=Testing

If successful, the following JSON-encoded result would be generated:

{
  "barcode":"HFX12345",
  "result":true
}

This is a list of commonly used hotlist codes and what they represent:

  • 0 - ACTIVE
  • 13 - PASS EXPIRED
  • 22 - REISSUED PASS
  • 51 - DISMISSAL
  • 52 - FRIENDLY
  • 53 - LOST
  • 54 - MISCONDUCT
  • 55 - REFUNDED
  • 56 - STOLEN
  • 57 - FORGOT SP
  • 58 - QUIT
  • 59 - WINNER-KEEP TICKET
  • 60 - USED LAST YEAR
  • 61 - SICK
  • 62 - NOT VALID AT LL
  • 65 - CALL RCMP
  • 90 - CAPTURE CARD
  • 91 - UNPAID BALANCE
  • 92 - CC PROBLEM
  • 93 - CC LOST
  • 94 - NO VALID EMAIL
  • 95 - SEASON OVER
  • 96 - SEE HR
  • 97 - WCB NO SKI!
  • 99 - SEE GS

Updating

Unavailable.

Deleting

Unavailable.

/scanning/{barcode}/usage

Reading

Details of usage of a ticket/pass can be queried through the usage node. The following example shows how the /scanning/usage endpoint is used to achieve this:

GET /scanning/HFT31092/usage HTTP/1.1
Host: api.skilouise.com

In this example, a query on the pass/ticket HFT31092 might generate the following JSON-encoded result:

{
  "barcode":"HFT31092",
  "usage":[
    {
      "ticket":"HFT31092     ",
      "date":"2015-04-09 13:19:42",
      "description":"ACTIVE",
      "lift":"Glacier",
      "resort":"Lake Louise"
    },
    {
      "ticket":"HFT31092     ",
      "date":"2015-02-12 09:43:56",
      "description":"ACTIVE",
      "lift":"Glacier",
      "resort":"Lake Louise"
    }
    ]
}

If the ticket/pass HFT31092 does not exist, the following error result would be generated:

{
  "error":{
    "code":200,
    "message":"Barcode has no history"
  }
}

Publishing

Recording a scan of a ticket/pass a can be made through the usage node. The following example shows how the /scanning/usage endpoint is used to achieve this:

POST /scanning/HFT31092/usage HTTP/1.1
Host: api.skilouise.com

liftID=7096b6f82b4ad51db64038a
deviceID=SCANNER-01
batchScan=false

Parameters:

  • liftID
    • Defines what lift the scan should be applied to.
  • deviceID
    • Defines what device the scan was recorded with.
  • batchScan
    • Defines if the device scanning the ticket couldn't check the ticket live. If the scan is being sent with a 10s+ delay this should be true. If no parameter entry is made this will default to being a live scan.

In this example, a scan of pass "HFT31092" is recorded live being used at lift ID 3 If successful, the following JSON-encoded result would be generated:

{
  "barcode":"HFT31092",
  "result":{
    "valid":"0",
    "message":"ACTIVE",
    "notifyLevel":"OK",
    "rides":"999",
    "ridesUsed":"108",
    "allowedDays":"400",
    "totalDays":"400",
    "daysUsed":"30",
    "ticketType":"SP",
    "currentDate":"2015-04-18 05:18:00",
    "memberID":"3468",
    "resortID":"1",
    "cat":"M-A",
    "description":"LAKE LOUISE STAFF Perm  FULL",
    "comment":"Valid Scan"
  }
}

Defining response data


"valid":"0"

The ID of the response code for the scanned ticket.

0 is the only valid response code. All other ID's require either an interaction with a Mountain greeter or complete prevention of entry.


"notifyLevel":"OK"

Three types of responses:

  • "OK" - Which means allow them to proceed.
  • "Warning" - Means that some sort staff interaction needs to be completed before being allowed up.
  • "Error" - Do not allow up the lift no matter what.


"message":"ACTIVE"

What the response code ID means. (Ex. "Call RCMP", "Valid", "Not in Whitelist")


"comment":"Valid Scan"

Three types of responses:

  • "N/A" - Comment can be ignored.
  • "Valid Scan" - Another way to verify the scan is valid.
  • If pass is hotlisted then the comment will hold what comment was given for the hotlist.

Updating

Unavailable.

Deleting

Unavailable.

/scanning/{barcode}/validate

Reading

Validation of a ticket/pass a can be made through the validate node. The following example shows how the /scanning/validate endpoint is used to achieve this:

GET /scanning/HFT31092/trace HTTP/1.1
Host: api.skilouise.com

In this example, a query on the ticket/pass HFT31092 might generate the following JSON-encoded result:

{
  "barcode":"HFT31092",
  "result":{
    "valid":"0",
    "message":"ACTIVE",
    "notifyLevel":"OK",
    "rides":"999",
    "ridesUsed":"107",
    "allowedDays":"400",
    "totalDays":"400",
    "daysUsed":"30",
    "ticketType":"SP",
    "currentDate":"2015-04-18 05:04:00",
    "memberID":"3468",
    "resortID":"1",
    "cat":"M-A",
    "description":"LAKE LOUISE STAFF Perm  FULL",
    "comment":"Valid Scan"
  }
}

Publishing

Unavailable.

Updating

Unavailable.

Deleting

Unavailable.

HTTP Status Codes

The Scanning API uses the following standard HTTP status codes:

200: OK
400: Bad Request
401: Unauthorized
503: Service Unavailable