Getting Started!

Qflow'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’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.

Enterprise API

The Enterprise API allows you to create and manage your own users within your own Qflow 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

Professional API

The Professional API allows you to manage your own Qflow account through our API or manage the accounts of other Qflow 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

Quick Start

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’s identity server. http://identity.qflowhub.io. Making calls against our API’s is done using OAuth 2. What is OAuth 2?

This can be done in 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).

How to create a token using the Resource Owner Flow

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).

How to 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).

How to 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.

POST - https://api.qflowhub.io/v1/api/event

Headers

Content-Type: application/json

Ocp-Apim-Subscription-Key: {subscription key - in welcome email}

Authorization: Bearer {token generated above}

Request Body

                
{
  "title": "My first event",
  "startTime": "10 May 2018",
  "endTime": "11 May 2018",
  "timeZoneId": "Europe/London"
}
                
            

Response Body

                
{
  "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"
}    
                
            
                
$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".
        "Authorization: Bearer 2f0f746bfa6caad205ceaffe00d8ce1f"."\r\n". // You can see how to generate this token above
        "Ocp-Apim-Subscription-Key: bbcd65faef9947b1b80d0fbb3502b5fe", // 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())
{
	client.DefaultRequestHeaders.Add("Authorization", "Bearer 222011c17e2c79436ee5079b91cce40f"); // Generate this token using above instructions
	client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "1f7105f7f98843d9bb6abdf1fb8c027e"); // This key is in your welcome email

	var result = await client.PostAsJsonAsync(url, new
 	{
    	title = "My first event1",
     	startTime = "10 May 2018",
     	endTime = "11 May 2018",
     	timeZoneId = "Europe/London"
 	});

 	dynamic json = JsonConvert.DeserializeObject(await result.Content.ReadAsStringAsync());
 	Console.WriteLine(json.ToString());
}    
                
            
                
Dim url = "https://api.qflowhub.io/v1/api/event"

Using client = New HttpClient()
	client.DefaultRequestHeaders.Add("Authorization", "Bearer 222011c17e2c79436ee5079b91cce40f")
	' Generate this token using above instructions
	client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "1f7105f7f98843d9bb6abdf1fb8c027e")
	' This key is in your welcome email
	Dim result = Await client.PostAsJsonAsync(url, New With { _
		Key .title = "My first event1", _
		Key .startTime = "10 May 2018", _
		Key .endTime = "11 May 2018", _
		Key .timeZoneId = "Europe/London" _
	})

	Dim json As dynamic = JsonConvert.DeserializeObject(Await result.Content.ReadAsStringAsync())
	Console.WriteLine(json.ToString())
End Using
                
            

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 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.

POST - https://api.qflowhub.io/v1/api/guest

Headers

Content-Type: application/json

Ocp-Apim-Subscription-Key: {subscription key - in welcome email}

Authorization: Bearer {token generated above}

Request Body

                
{
  "firstName": "Joe",
  "otherNames": "",
  "lastName": "Bloggs",
  "email": "joe.bloggs@example.com",
  "plusOnes": 1,
  "additionalInfo": "Card #1234",
  "barcode": "123456",
  "tags": "VIP,{session}Session 1, {tickettype}Main Entry",
  "eventId": "94a600a7-54af-4fd0-8507-c6ec75104921",
  "validFrom": "",
  "validTo": "",
  "isGroup": false
}
                
            

Response Body

                
{
  "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}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
}		
                
            
                
$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}Session 1, {tickettype}Main Entry",
  "eventId": "94a600a7-54af-4fd0-8507-c6ec75104921",
  "validFrom": "",
  "validTo": "",
  "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"); // Generate this token using above instructions
	client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "1f7105f7f98823d9bb6abdf1fb8c027e"); // This key is in your welcome email

	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}Session 1, {tickettype}Main Entry",
  		eventId = "94a600a7-54af-4fd0-8507-c6ec75104921",
  		validFrom = "",
  		validTo = "",
  		isGroup = false
 	});

 	dynamic json = JsonConvert.DeserializeObject(await result.Content.ReadAsStringAsync());
 	Console.WriteLine(json.ToString());
}
                
            
                
Dim url = "https://api.qflowhub.io/v1/api/guest"

Using client = New HttpClient()
	client.DefaultRequestHeaders.Add("Authorization", "Bearer 222011c17e2c79336ee5079b91cce40f")
	' Generate this token using above instructions
	client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "1f7105f7f98823d9bb6abdf1fb8c027e")
	' This key is in your welcome email
	Dim result = Await client.PostAsJsonAsync(url, New With { _
		Key .firstName = "Joe", _
		Key .otherNames = "", _
		Key .lastName = "Bloggs", _
		Key .email = "joe.bloggs@example.com", _
		Key .plusOnes = 1, _
		Key .additionalInfo = "Card #1234", _
		Key .barcode = "123456", _
		Key .tags = "VIP,{session}Session 1, {tickettype}Main Entry", _
		Key .eventId = "94a600a7-54af-4fd0-8507-c6ec75104921", _
		Key .validFrom = "", _
		Key .validTo = "", _
		Key .isGroup = False _
	})

	Dim json As dynamic = JsonConvert.DeserializeObject(Await result.Content.ReadAsStringAsync())
	Console.WriteLine(json.ToString())
End Using
                
            

If you need more information or help either read through our documentation or contact us at support@qflowhub.io

Enjoy!

The Qflow Team