Qflow for events™ API Quick Start Documentation
Qflow for events's API makes it easy for Software developers, Ticketing companies and Event organisers to integrate their solution with a simple, proven and feature rich event logistics suite. We've spent the last 5 years building a set of applications in conjunction with leading event organisers which you can benefit from immediately as part of your own setup.
You can follow our Quick Start below or use our developer sandbox here.
All Qflow for events’s API’s are REST based. What is Rest?
To access our API’s you’ll need a subscription. We provide an Enterprise API subscription and a Professional API subscription (The Enterprise subscription includes the Professional API also). The differences are detailed below.
Quick iFrame integration
You can have the Qflow dashboard / control panel within your own event / ticketing portal. You can sign your users into their Qflow event account all under your own enterprise.
For more information read here
To get start please contact support@qflow.io
Professional API
The Professional API allows you to manage your own Qflow for events account through our API or manage the accounts of other Qflow for events users via the OAuth 2 protocol.
With the Professional API you can create events and manage events, add and manage guests and get statistics. See our detailed documentation by clicking here
Enterprise API
The Enterprise API allows you to create and manage your own users within your own Qflow for events ecosystem. This API suites event management companies and ticketing companies looking for a solid check-in solution to compliment their platform.
Alongside the Enterprise API we also provide the ability for white labelling which is an easier step then full integration with our API. It also doesn’t require any development resource. For Enterprise API documentation click here
Creating tokens
First off you’ll need to get a token to work against the API. You get this token by making requests against Qflow for events’s identity server. https://identity.qflowhub.io. Making calls against our API is done using OAuth 2. What is OAuth 2?
This can be done in one of 3 ways.
1. If you know the details of the account you want to access you can use the Resource Owner flow. (If you’re programming against your own account, this would be suitable).
2. If you need to access the account of another user you would use the Authentication Token flow. (If you’re programming against an account which isn’t yours).
Create a token using the Authentication Token Flow
3. If you have access to the enterprise API, you can generate a token which allows you to create your own users. (If you're using our White Label solution for example).
Create a token for the Enterprise API
Creating your first event
Once you've got your token (see Creating tokens) you can use our API (Click here for documentation). You'll need the token you've just created and your Primary Subscription Key which can be found in your welcome email.
Let's start by creating an event.
Headers
POST https://api.qflowhub.io/v1/api/event
Content-Type: application/json
Ocp-Apim-Subscription-Key: {subscription key - in welcome email}
Authorization: Bearer {token generated above}
Request
{
"title": "My first event",
"startTime": "10 May 2018",
"endTime": "11 May 2018",
"timeZoneId": "Europe/London"
}
Response
{
"id": "94a600a7-54af-4fd0-8507-c6ec75104921",
"title": "My first event",
"startTime": "2018-05-10T00:00:00",
"endTime": "2018-05-11T00:00:00",
"active": true,
"timeZoneId": "GMT Standard Time"
}
Examples
$url = 'https://api.qflowhub.io/v1/api/event';
$body = '{
"title": "My first event",
"startTime": "10 May 2018",
"endTime": "11 May 2018",
"timeZoneId": "Europe/London"
}';
$opts = array('http' =>
array(
'method' => 'POST',
'header' => "Content-Type: application/json\r\n".
// You can see how to generate this token above
"Authorization: Bearer 2f0f746bfa6caad205ceaffe00d8ce1f"."\r\n".
// This subscription key is in your welcome email
'content' => $body,
'timeout' => 60));
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context, -1, 40000);
print $result;
var url = "https://api.qflowhub.io/v1/api/event";
using (var client = new HttpClient())
{
// Generate this token using above instructions
client.DefaultRequestHeaders.Add("Authorization", "Bearer 222011c17e2c79436ee5079b91cce40f");
// This key is in your welcome email
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "1f7105f7f98843d9bb6abdf1fb8c027e");
var result = await client.PostAsJsonAsync(url, new
{
title = "My first event",
startTime = "10 May 2024",
endTime = "11 May 2024",
timeZoneId = "Europe/London"
}
dynamic json = JsonConvert.DeserializeObject(await result.Content.ReadAsStringAsync());
Console.WriteLine(json.ToString());
}
Adding a guest to your event
Once you've created your event you can add a guest. An scenario where this call is beneficial is when a customer purchases a ticket. You can add them to Qflow for events immediately ready for check-in.
You can tag guests to make them easier to manage and also get great stats back later on groups. If you prefix a tag with {session} or {tickettype} it will add specific icons to them in the Control Panel.
Headers
POST https://api.qflowhub.io/v1/api/guest
Content-Type: application/json
Ocp-Apim-Subscription-Key: {subscription key - in welcome email}
Authorization: Bearer {token generated above}
Request
{
"firstName": "Joe",
"otherNames": "",
"lastName": "Bloggs",
"email": "joe.bloggs@example.com",
"plusOnes": 1,
"additionalInfo": "Card #1234",
"barcode": "123456",
"tags": "VIP, Session 1, {tickettype}Main Entry",
"eventId": "94a600a7-54af-4fd0-8507-c6ec75104921",
"validFrom": "",
"validTo": "",
"isGroup": false
}
Response
{
"id": "15646953-5805-497a-9550-6e86cbc4f20a",
"firstName": "Joe",
"otherNames": "",
"lastName": "Bloggs",
"email": "joe.bloggs@example.com",
"plusOnes": 1,
"admittedPlusOnes": 0,
"additionalInfo": "Card #1234",
"barcode": "123456", "tags": "VIP, Session 1, {tickettype}Main Entry, ",
"createdBy": "API (acme_resowner)",
"admitted": null,
"blockedDate": null,
"blockedReason": "",
"eventId": "94a600a7-54af-4fd0-8507-c6ec75104921",
"validFrom": null,
"validTo": null,
"isGroup": false
}
Examples
$url = 'https://api.qflowhub.io/v1/api/guest';
$body = '{
"firstName": "Joe",
"otherNames": "",
"lastName": "Bloggs",
"email": "joe.bloggs@example.com",
"plusOnes": 1,
"additionalInfo": "Card #1234",
"barcode": "123456",
"tags": "VIP, Session 1, {tickettype}Main Entry",
"eventId": "94a600a7-54af-4fd0-8507-c6ec75104921",
"isGroup": false
}';
$opts = array('http' =>
array(
'method' => 'POST',
'header' =>
"Content-Type: application/json\r\n".
"Authorization: Bearer 075f2079f4594862adc258bc45b1c97d"."\r\n".
"Ocp-Apim-Subscription-Key: 1f5305f7f99243d9bb6abdf1fb8c027e",
'content' => $body,
'timeout' => 60));
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context, -1, 40000);
print $result;
var url = "https://api.qflowhub.io/v1/api/guest";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer 222011c17e2c79336ee5079b91cce40f");
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "1f7105f7f98823d9bb6abdf1fb8c027e");
var result = await client.PostAsJsonAsync(url,
new {
firstName = "Joe",
otherNames = "",
lastName = "Bloggs",
email = "joe.bloggs@example.com",
plusOnes = 1,
additionalInfo = "Card #1234",
barcode = "123456",
tags = "VIP, Session 1, {tickettype}Main Entry",
eventId = "94a600a7-54af-4fd0-8507-c6ec75104921",
isGroup = false
});
dynamic json = JsonConvert.DeserializeObject(await result.Content.ReadAsStringAsync());
Console.WriteLine(json.ToString());
}
If you need more information or help either read through our documentation or contact us at support@qflowhub.io
Webhooks
Once a guest is checked in via the API, control panel or via the check-in app, if a webhook is setup, we'll post the below data to it. You can setup webhooks in your main API account login.
{
"Id" : "guid",
"Tags" : "string",
"Email" : "string",
"Barcode" : "string",
"LastName" : "string",
"FirstName" : "string",
"Admitted" : "datetime",
"CreatedBy" : "string",
"AdditionalInfo" : "string",
"User" : "string", (the team member who checked them in)
"EventId" : "guid"
}