NAV Navbar
cURL PHP Java Ruby Python

Ticketing API v2019-08-04T17:27:47Z

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The Ticketing API is used for creating and managing mobile tickets and coupons.

Base URLs:

Email: Melrose Labs - Technical Support

Authentication

Barcodes

Create barcode

Code samples

# You can also use wget
curl -X POST https://api.melroselabs.com/ticketing/barcode \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.melroselabs.com/ticketing/barcode', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/ticketing/barcode");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.post 'https://api.melroselabs.com/ticketing/barcode',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.post('https://api.melroselabs.com/ticketing/barcode', params={

}, headers = headers)

print r.json()

POST /barcode

Create a barcode

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful barcode creation Empty
400 Bad Request Unsuccessful barcode creation Error

Scanner

Scanner authentication

Code samples

# You can also use wget
curl -X GET https://api.melroselabs.com/ticketing/scanner/authenticate \
  -H 'Accept: application/json'

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.melroselabs.com/ticketing/scanner/authenticate', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/ticketing/scanner/authenticate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.melroselabs.com/ticketing/scanner/authenticate',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.melroselabs.com/ticketing/scanner/authenticate', params={

}, headers = headers)

print r.json()

GET /scanner/authenticate

OAuth 2.0 of scanner login

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK 200 response Empty

Tickets

Create ticket

Code samples

# You can also use wget
curl -X POST https://api.melroselabs.com/ticketing/ticket \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.melroselabs.com/ticketing/ticket', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/ticketing/ticket");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.post 'https://api.melroselabs.com/ticketing/ticket',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.post('https://api.melroselabs.com/ticketing/ticket', params={

}, headers = headers)

print r.json()

POST /ticket

Create a ticket

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK 200 response Empty

Update ticket

Code samples

# You can also use wget
curl -X PUT https://api.melroselabs.com/ticketing/ticket \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.melroselabs.com/ticketing/ticket', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/ticketing/ticket");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.put 'https://api.melroselabs.com/ticketing/ticket',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.put('https://api.melroselabs.com/ticketing/ticket', params={

}, headers = headers)

print r.json()

PUT /ticket

Update a ticket

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK 200 response Empty

Delete ticket

Code samples

# You can also use wget
curl -X DELETE https://api.melroselabs.com/ticketing/ticket \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.melroselabs.com/ticketing/ticket', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/ticketing/ticket");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.delete 'https://api.melroselabs.com/ticketing/ticket',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.delete('https://api.melroselabs.com/ticketing/ticket', params={

}, headers = headers)

print r.json()

DELETE /ticket

Delete a ticket

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK 200 response Empty

Validate ticket

Code samples

# You can also use wget
curl -X POST https://api.melroselabs.com/ticketing/ticket/validate/{ticketid} \
  -H 'Accept: application/json'

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.melroselabs.com/ticketing/ticket/validate/{ticketid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/ticketing/ticket/validate/{ticketid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.melroselabs.com/ticketing/ticket/validate/{ticketid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.post('https://api.melroselabs.com/ticketing/ticket/validate/{ticketid}', params={

}, headers = headers)

print r.json()

POST /ticket/validate/{ticketid}

Validate a ticket. Operation normally performed by a scanner.

Parameters

Name In Type Required Description
ticketid path string true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK 200 response Empty

Query ticket

Code samples

# You can also use wget
curl -X GET https://api.melroselabs.com/ticketing/ticket/{ticketid} \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.melroselabs.com/ticketing/ticket/{ticketid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/ticketing/ticket/{ticketid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.get 'https://api.melroselabs.com/ticketing/ticket/{ticketid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.get('https://api.melroselabs.com/ticketing/ticket/{ticketid}', params={

}, headers = headers)

print r.json()

GET /ticket/{ticketid}

Query a ticket

Parameters

Name In Type Required Description
ticketid path string true ID of ticket

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK 200 response Empty

Schemas

Empty

{}

Empty Schema

Properties

None

Error

{
  "message": "string"
}

Error Schema

Properties

Name Type Required Restrictions Description
message string false none none