REST API

Introduction

All REST requests described below are relative to the endpoint address specified in the application settings. For example, if the endpoint address is https://somewhere.com then the check_endpoint REST API location is expected to be available at https://somewhere.com/qr_check_in/check_endpoint/:apiKey.

Event Statistics

Methods that require an event name return the statistics for the event. The phone application will use this information to update it's onscreen event statistics whenever each of these methods are called. The structure of the statistics is:

{
  "number_of_checkins": 100,
  "number_in_venue": 90,
  "number_of_failed_checkins": 5
}

In this structure number_of_checkins is the number of people that have been checked into the event. The number of the people in the venue is reported in number_in_venue. It is calculated from the number of check ins - number of times the "-" button has been pressed + the number of times the "+" has been pressed. The number_of_failed_checkins is the number of incorrect tickets that have been attempted to be checked in.

Methods


GET /qr_check_in/check_endpoint/:apiKey

Validates that the QR Check In app is configured with the right endpoint and API key. If the validation is succesful the list of valid events will be returned in event_names. Two other mandatory return values indicate what functionality is available in the application on the scan page. The allow_manual_checkins option indicates whether the Check In Door Sale button will be displayed or not. The allow_pass_in_out flag indicates whether to support pass ins/outs and will determine if the + and - buttons will be displayed.

Example Request

https://localhost/qr_check_in/check_endpoint/a0c9ec48e2827752ceaf

Example Responses

Correct API Key
{
  "success": true,
  "allow_manual_checkins": true,
  "allow_pass_in_out": true,
  "event_names": [
    "event 1 name",
    "event 2 name",
    "event 3 name"
  ],
}
Incorrect API Key
{
  "success": false
}

GET /qr_check_in/get_event_statistics/:apiKey/:eventName

Gets the event statistics for the specified event.

Example Request

https://localhost/qr_check_in/get_event_statistics/a0c9ec48e2827752ceaf/My%20Event

Example Responses

Valid API Key and Event
{
  "success": true,
  "event_statistics": {
    "number_of_checkins": 100,
    "number_in_venue": 90,
    "number_of_failed_checkins": 5
  }
}
Incorrect API Key or Event Name
{
  "success": false
}

GET /qr_check_in/check_in/:apiKey/:eventName/:ticketToken

Checks in the ticket with the specified token.

Example Request

https://localhost/qr_check_in/check_in/a0c9ec48e2827752ceaf/My%20Event/a6b3777cd0a

Example Responses

Valid API Key and Event
{
  "success": true,
  "success_message": "Checked In: John Smith<br/>(1/2)",
  "event_statistics": {
    "number_of_checkins": 100,
    "number_in_venue": 90,
    "number_of_failed_checkins": 5
  }
}
Incorrect API Key
{
  "success": false,
  "error_message": "Invalid API key!"
}
Incorrect Event Name
{
  "success": false,
  "error_message": "Invalid event specified!"
}
Unknown Ticket
{
  "success": false,
  "error_message": "Could not find ticket!"
}
Ticket Already Checked In
{
  "success": false,
  "error_message": "Ticket already checked in!"
}

GET /qr_check_in/check_out/:apiKey/:eventName/:ticketToken

Checks out the ticket with the specified token.

Example Request

https://localhost/qr_check_in/check_out/a0c9ec48e2827752ceaf/My%20Event/a6b3777cd0a

Example Responses

Valid API Key and Event
{
  "success": true,
  "success_message": "Checked Out: John Smith<br/>(1/2)",
  "event_statistics": {
    "number_of_checkins": 100,
    "number_in_venue": 90,
    "number_of_failed_checkins": 5
  }
}
Incorrect API Key
{
  "success": false,
  "error_message": "Invalid API key!"
}
Incorrect Event Name
{
  "success": false,
  "error_message": "Invalid event specified!"
}
Unknown Ticket
{
  "success": false,
  "error_message": "Could not find ticket!"
}
Ticket Already Checked Out
{
  "success": false,
  "error_message": "Ticket already checked out!"
}

Searches for tickets by customer name. It is suggested for usability that a fuzzy text search is implemented as well as support for searching by just first name or last name rather than requiring the full name.

Example Request

https://localhost/qr_check_in/search/a0c9ec48e2827752ceaf/My%20Event/John

Example Responses

Valid API Key and Event
{
  "success": true,
  "matches": [
    {
      "name": "John Smith",
      "address": "10 Smith Street, Some Suburb",
      "tickets": [
        {
          "summary": "General 1 / 2",
          "ticket_token": "d0e56fca322dea798a9d",
          "checked_in": true
        },
        {
          "summary": "General 2 / 2",
          "ticket_token": "ea687f9ac3da78fe975a",
          "checked_in": false
        },
        {
          "summary": "Member 1 / 1",
          "ticket_token": "cd3ca765a65cef7a8eef",
          "checked_in": true
        }
      ]
    },
    {
      "name": "John White",
      "address": "10 White Street, Some Suburb",
      "tickets": [
        {
          "summary": "General 1 / 1",
          "ticket_token": "c4d68547ad7cda99d7ea7",
          "checked_in": false
        }
      ]
    }
  ]
}