Event Organizer API
Authentication
Lüp provides Event Organisers with a OAuth 2 Client Id and Secret that allows Client Applications to authenticate against Lüp APIs. If you have not received your Client Id and Secret please email help@lup.com.au.
Authentication is performed via the Client Credentials OAuth 2 Flow. Once authenticated an application should request an Access Token for use as a Bearer Token within the Authorization Header of a HTTP Request. Please note the use of the Client Credentials flow is important. If when attempting to authenticate you are asked for a username and password then your OAuth implementation is using the wrong flow. For more information refer to Client Credentials.
Scopes
The Event Organisers API is secured against a oapi scope. This scope should be included in your Access Token request.
Authentication Example with C#
Using the IdentityModel NuGet Package
string clientId = "xxxxxxxxxxxxxxxxxx"; string clientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; var disco = await DiscoveryClient.GetAsync("https://security.lup.com.au"); var tokenClient = new TokenClient(disco.TokenEndpoint, clientId, clientSecret); var tokenResponse = await tokenClient.RequestClientCredentialsAsync("oapi"); Console.WriteLine(tokenResponse.AccessToken);
Other Languages
Access Tokens can be requested using the Client Credential OAuth 2 Flow with a oapi Scope the following URI
https://security.lup.com.au/connect/token
Events API
Request
HTTP GET: https://oapi.lup.com.au/api/v1/events HEADER: Authorization Bearer xxxxxxxxxxxxxxxxxxxxxxxxx
Response
The Events API returns an application/json formatted array of Event objects in the following format.
Note: This API is not paged.
[ { "id": "202e27c5-f853-426c-999b-e83e967bc8a0", "name": "My Really Cool Event", "code": "", "startDate": "2018-01-24T00:00:00", "endDate": "2018-01-25T06:00:00", "visitors": "/api/v1/event/202e27c5-f853-426c-999b-e83e967bc8a0/visitors" }, { "id": "6ae5bc77-6ad2-42b7-b608-90388018096c", "name": "My Really Cool Event 2", "code": "", "startDate": "2018-01-24T00:00:00", "endDate": "2018-01-25T06:00:00", "visitors": "/api/v1/event/6ae5bc77-6ad2-42b7-b608-90388018096c/visitors" } ]
Visitors API
The Visitors API returns an application/json formatted object which includes an array of Visitor objects along with Paging information.
Note: This is a paged API and will return a maximum of 50 visitors with each request. If additional pages exist the nextPage and previousPage properties will contain URI's for those pages. We at Lup encode the longCode value the QR code on a visitor's ticket (rather than the ID).
This Visitors API will always return the last modified Visitor first.
Currently the Visitors API is supporting 2 different versions, the V2 gives greater insight into your visitors however there are no plans in the short term to remove support for intergrations implemented against the V1 API.
Optional Header
You can optionally filter the returned results by adding the If-Modified-Since HTTP header. The value of this header should be provided in ISO8601 date-time format (eg “2019-01-08T23:00:08Z”).
With the V2 api, You can optionally change the delimter used on the answers by provding the customDelimiter via the query string. The value of this header should be a single character & url encodeed (eg to use ; as the custom Delimiter, please add the following to the querystring ?customDelimiter=%3B).
When applied only visitors modified since the specified time will be returned. If there are no visitors modified after this time the API will return a HTTP 304.
Visitors API - V2
Request
HTTP GET: https://oapi.lup.com.au/api/v2/events/{eventId:GUID}/visitors HEADER: Authorization Bearer xxxxxxxxxxxxxxxxxxxxxxxxx OPTIONAL HEADER: If-Modified-Since yyyy-mm-ddThh:mm:ssZ
Response
{ "visitors": [ { "id": "377c6597-0f9a-4e3e-9aaf-ed3908adaf92", "givenName": "Visitor 1", "familyName": "Visitor Name", "email": "visitor1@mailinator.com", "postCode": "3076", "phoneNumber": "0406650430", "productCode": "Adult", "productType": "Adult", "couponCode": "FR33T1CK3T", "answers": [], "addOns": [], "priceExTax": 0.00, "priceIncTax": 0.00, "tax": 0.00, "atEvent": false, "currency": "AUD", "ticketStatus": "Active", "longCode":"6bee18ee6faa49679da4acc6a8ffe1de", "modifiedUTC": "2018-01-24T05:42:11.368882+00:00" }, { "id": "0595a90d-7f73-4425-a900-3e25c372a748", "givenName": "visitor 2", "familyName": "doe", "email": "visitordoe@mailinator.com", "postCode": "3113", "phoneNumber": "0406650430", "productCode": "Adult", "productType": "Adult", "couponCode": "", "phoneNumber": "1300884226", "answers": [ { "question": "How was your day today?", "response": "Fantastic!!!!" } ], "addOns": [ { "productCode":"INCLUDED_CHEESECAKE_SLICE", "productType":"INCLUDED_CHEESECAKE_SLICE", "priceExTax": 9.00, "priceIncTax": 10.00, "tax": 1.0, } ], "priceExTax": 68.18, "priceIncTax": 75.00, "tax": 6.82, "currency": "AUD", "atEvent": true, "ticketStatus": "Active", "longCode":"5f6d97c57db94e159c29d314b86e66c2", "modifiedUTC": "2018-01-24T05:42:03.7365127+00:00" } ], "totalCount": 1000, "totalPages": 3, "nextPage": "/api/v2/events/87096932-93fb-401f-8c05-d47abc65b871/visitors?page=3", "previousPage": "/api/v2/events/87096932-93fb-401f-8c05-d47abc65b871/visitors?page=1" }
Visitors API - V1
Request
HTTP GET: https://oapi.lup.com.au/api/v1/events/{eventId:GUID}/visitors HEADER: Authorization Bearer xxxxxxxxxxxxxxxxxxxxxxxxx OPTIONAL HEADER: If-Modified-Since yyyy-mm-ddThh:mm:ssZ
Response
{ "visitors": [ { "id": "377c6597-0f9a-4e3e-9aaf-ed3908adaf92", "givenName": "Visitor 1", "familyName": "Visitor Name", "email": "visitor1@mailinator.com", "postCode": "3076", "productCode": "Adult", "productType": "Adult", "couponCode": "FR33T1CK3T", "answers": [], "atEvent": false, "modifiedUTC": "2018-01-24T05:42:11.368882+00:00" }, { "id": "0595a90d-7f73-4425-a900-3e25c372a748", "givenName": "visitor 2", "familyName": "doe", "email": "visitordoe@mailinator.com", "postCode": "3113", "productCode": "Adult", "productType": "Adult", "couponCode": "", "phoneNumber": "1300884226", "answers": [ { "question": "How was your day today?", "response": "Fantastic!!!!" } ], "atEvent": true, "modifiedUTC": "2018-01-24T05:42:03.7365127+00:00" } ], "totalCount": 1000, "totalPages": 3, "nextPage": "/api/v1/events/87096932-93fb-401f-8c05-d47abc65b871/visitors?page=3", "previousPage": "/api/v1/events/87096932-93fb-401f-8c05-d47abc65b871/visitors?page=1" }