The Hailo API lets you integrate Hailo into your own application. It is a HTTP-based JSON API, accessible at https://api.hailoapp.com/
All endpoints in the documentation starts with the following URL:
https://api.hailoapp.com
Type | Name | Description | Details |
---|---|---|---|
API Key | Default | Default Authentication |
Pass As: URL Query String |
The API client (SDK) and sample code for this programming langauge is still in Beta. Please kindly report any issue/feedback to support@restunited.com
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-flash.tar.gz
tar mzxvf Hailo-dev-0.0.4-flash.tar.gz
mv Hailo-flash /path/to/your/project/libs/
The API client (SDK) and sample code for this programming langauge is still in Beta. Please kindly report any issue/feedback to support@restunited.com
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-android_java.tar.gz
tar mzxvf Hailo-dev-0.0.4-android_java.tar.gz
cd Hailo-android_java
mvn package
cp target/lib/httpclient* YOUR_PROJECT/libs/
cp target/lib/jackson* YOUR_PROJECT/libs/
cp target/Hailo-0.0.4.jar YOUR_PROJECT/libs/
You may also need to add the above JARs to your build path. Please refer to the instructions
here.
import com.hailoapp.api.client.*;
import com.hailoapp.api.hailo.api.*;
import com.hailoapp.api.hailo.model.*;
The API client (SDK) and sample code for this programming langauge is still in Beta. Please kindly report any issue/feedback to support@restunited.com
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-csharp.tar.gz
tar mzxvf Hailo-dev-0.0.4-csharp.tar.gz
mv Hailo-csharp /path/to/your/project/lib/
Hailo-csharp
to the projectSystem.Web
and Hailo-csharp/bin/Newtonsoft.Json.dll
to the project's "References"using com.hailoapp.api.Hailo.Api;
using com.hailoapp.api.Hailo.Model;
Please kindly ignore the warnings for the time being while we're improving the generated SDK for C#
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-java.tar.gz
tar mzxvf Hailo-dev-0.0.4-java.tar.gz
cd Hailo-java
mvn package
mvn install
<dependency>
<groupId>com.hailoapp.api</groupId>
<artifactId>Hailo</artifactId>
<version>0.0.4</version>
<scope>compile</scope>
</dependency>
import com.hailoapp.api.client.*;
import com.hailoapp.api.hailo.api.*;
import com.hailoapp.api.hailo.model.*;
The API client (SDK) and sample code for this programming langauge is still in Beta. Please kindly report any issue/feedback to support@restunited.com
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-objc.tar.gz
tar mzxvf Hailo-dev-0.0.4-objc.tar.gz
cd Hailo-objc
pod install
#import <SWGApiClient.h>
// load models (responses) defined for endpoints
#import <Drivers.h>
#import <Driver.h>
#import <Etas.h>
#import <Eta.h>
// load classes for accessing the endpoints
#import <SWGDriversApi.h>
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-php.tar.gz
tar mzxvf Hailo-dev-0.0.4-php.tar.gz
mv Hailo-php /path/to/project/directory/
sudo apt-get install php5-curl
<?php
require_once 'Hailo-php/Hailo.php';
?>
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-python.tar.gz
tar mzxvf Hailo-dev-0.0.4-python.tar.gz
cd Hailo-python
python setup.py install --user # for current user
sudo python setup.py install # for all user
import urllib2
import Hailo
from pprint import pprint
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-ruby.tar.gz
tar mzxvf Hailo-dev-0.0.4-ruby.tar.gz
cd Hailo-ruby
gem build Hailo.gemspec
gem install ./Hailo-0.0.4.gem
gem "Hailo", "~> 0.0.4"
require 'Hailo'
Hailo::Swagger.configure do |config|
config.scheme = 'https'
config.host = 'api.hailoapp.com'
config.base_path = ''
config.inject_format = false
end
The API client (SDK) and sample code for this programming langauge is still in Beta. Please kindly report any issue/feedback to support@restunited.com
wget http://files1.restunited.com/libraries/api_hailoapp_com_005648/dev/0/0/4/sw/Hailo-dev-0.0.4-scala.tar.gz
tar mzxvf Hailo-dev-0.0.4-scala.tar.gz
cd Hailo-scala
mvn package
mvn install
<dependency>
<groupId>com.hailoapp.api</groupId>
<artifactId>Hailo</artifactId>
<version>0.0.4</version>
<scope>compile</scope>
</dependency>
import com.hailoapp.api.client._;
import com.hailoapp.api.hailo.api._;
import com.hailoapp.api.hailo.model._;
Please follow the instructions here to download and install Unirest for Java.
Please follow the instructions here to download and install Unirest for Node.js.
Please follow the instructions here to download and install Unirest for Objective-C.
Please follow the instructions here to download and install Unirest for PHP.
Please follow the instructions here to download and install Unirest for Python.
Please follow the instructions here to download and install Unirest for Ruby.
Please follow the instructions here to download and install Unirest for .Net.
https://api.hailoapp.com
/drivers/eta
The ETA endpoint allows you to retrieve an Estimated Time of Arrival for cabs near to a location.
Name | Type | Location | Description | |
---|---|---|---|---|
api_token | String | URL query string | API key or token for authorization |
This endpoint returns Eta (model)
Sample response
{
"etas": [
{
"eta": 6,
"count": 3,
"service_type": "regular"
},
{
"eta": 6,
"count": 3,
"service_type": "executive"
}
]
}
try
{
var driversApi: DriversApi = new DriversApi();
var response: Eta = driversApi.eta("sample_api_token");
}
catch (e:Error)
{
trace(e)
}
/** generated by http://restunited.com */
/** for any feedback/issue with the code, please send to support{at}restunited.com */
try {
DriversApi driversApi = new DriversApi();
Eta response = driversApi.eta("sample_api_token");
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "https://api.hailoapp.com/drivers/eta?api_token=<api_token>"
// generated by http://restunited.com
// for any feedback/issue with the code, please send to support{at}restunited.com
try
{
DriversApi driversApi = new DriversApi();
Eta response = driversApi.eta("sample_api_token");
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// generated by http://restunited.com
// for any feedback/issue with the code, please send to support{at}restunited.com
try {
DriversApi driversApi = new DriversApi();
Eta response = driversApi.eta("sample_api_token");
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
// generated by http://restunited.com
// for any feedback/issue with the code, please send to support{at}restunited.com
@try
{
SWGDriversApi *driversApi = [[SWGDriversApi alloc] init];
Eta *response = [driversApi etaWithCompletionBlock:@"sample_api_token"];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// generated by http://restunited.com
// for any feedback/issue with the code, please send to support{at}restunited.com
// setup authentication
$api_token = 'YOUR_API_KEY';
try{
$apiClient = new Hailo\APIClient('https://api.hailoapp.com');
$drivers_api = new Hailo\DriversAPI($apiClient);
$response = $drivers_api->eta($api_token);
var_dump($response);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
# generated by http://restunited.com
# for any feedback/issue with the code, please send to support{at}restunited.com
try:
api_client = Hailo.swagger.ApiClient(api_server="https://api.hailoapp.com")
drivers_api = Hailo.DriversApi(api_client)
response = drivers_api.eta("sample_api_token")
if isinstance(response, list):
map(lambda p: pprint(vars(p)), response)
else:
pprint(vars(response))
except Exception, e:
print(e)
# generated by http://restunited.com
# for any feedback/issue with the code, please send to support{at}restunited.com
# setup authentication
api_token = 'YOUR_API_KEY'
begin
response = Hailo::DriversAPI.eta(api_token)
p response
rescue StandardError => e
puts "caught error: #{e}"
end
/** generated by http://restunited.com */
/** for any feedback/issue with the code, please send to support{at}restunited.com */
try {
val driversApi = new DriversApi
var response = driversApi.eta("sample_api_token")
} catch {
case e: Exception => println("exception caught: " + e);
}
HttpResponse<String> response = Unirest.get("https://api.hailoapp.com/drivers/eta?api_token=<api_token>")
.asString();
// HTTP status code
int code = response.getCode();
// Headers
Map<String, String> headers = response.getHeaders();
// Parsed body
String body = response.getBody();
// Unparsed body
InputStream rawBody = response.getRawBody();
unirest.get("https://api.hailoapp.com/drivers/eta?api_token=<api_token>")
.end(function (response) {
// HTTP status code
var code = response.code;
// Headers
var headers = response.headers;
// Parsed body
var body = response.body;
// Unparsed body
var raw_body = response.raw_body;
});
UNIUrlConnection *asyncConnection = [[UNIRest get:^(UNISimpleRequest *request) {
[request setUrl:@"https://api.hailoapp.com/drivers/eta?api_token=<api_token>"];
}] asJsonAsync:^(UNIHTTPJsonResponse *response, NSError *error) {
// HTTP status code
NSInteger code = response.code;
// Headers
NSDictionary *responseHeaders = response.headers;
// Parsed body
UNIJsonNode *body = response.body;
// Unparsed body
NSData *rawBody = response.rawBody;
}];
$response = Unirest::get(
"https://api.hailoapp.com/drivers/eta?api_token=<api_token>",
null,
null
);
$response->code; // HTTP status code
$response->headers; // Headers
$response->body; // Parsed body
$response->raw_body; // Unparsed body
response = unirest.get("https://api.hailoapp.com/drivers/eta?api_token=<api_token>")
response.code # HTTP status code
response.headers # The HTTP headers
response.body # The parsed response
response.raw_body # The unparsed response
response = Unirest.get(
"https://api.hailoapp.com/drivers/eta?api_token=<api_token>",
headers: {},
parameters: {}
)
response.code # Status code
response.headers # Response headers
response.body # Parsed body
response.raw_body # Unparsed body
HttpResponse<MyClass> response = Unirest.get("https://api.hailoapp.com/drivers/eta?api_token=<api_token>")
.asString<MyClass>();
response.Code; // HTTP status code
response.Headers; // Headers
response.Body; // Parsed body
response.Raw; // Unparsed body
Error Code | Message |
---|---|
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Resource not found |
502 | Bad gateway |
503 | Service Unavailable |
https://api.hailoapp.com
/drivers/near
Take users directly from your app into the Hailo app's confirm screen, with pickup and destination information pre-filled. Both the iOS and Android apps can be launched by invoking hailoapp://confirm, and both accept the same parameters. Note: To ensure a seamless user experience, please check there are drivers nearby with a call to the ETA endpoint before sending them to the Hailo app.
Name | Type | Location | Description | |
---|---|---|---|---|
api_token | String | URL query string | API key or token for authorization |
This endpoint returns Driver (model)
Sample response
{
"drivers": [
{
"latitude": 51.50808,
"longitude": -0.116408,
"service_type": "regular"
},
{
"latitude": 51.504695,
"longitude": -0.113202,
"service_type": "regular"
},
{
"latitude": 51.51135,
"longitude": -0.127148,
"service_type": "regular"
},
{
"latitude": 51.511745,
"longitude": -0.117742,
"service_type": "regular"
},
{
"latitude": 51.509996,
"longitude": -0.118696,
"service_type": "regular"
}
]
}
try
{
var driversApi: DriversApi = new DriversApi();
var response: Driver = driversApi.near("sample_api_token");
}
catch (e:Error)
{
trace(e)
}
/** generated by http://restunited.com */
/** for any feedback/issue with the code, please send to support{at}restunited.com */
try {
DriversApi driversApi = new DriversApi();
Driver response = driversApi.near("sample_api_token");
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
curl --get --include "https://api.hailoapp.com/drivers/near?api_token=<api_token>"
// generated by http://restunited.com
// for any feedback/issue with the code, please send to support{at}restunited.com
try
{
DriversApi driversApi = new DriversApi();
Driver response = driversApi.near("sample_api_token");
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
// generated by http://restunited.com
// for any feedback/issue with the code, please send to support{at}restunited.com
try {
DriversApi driversApi = new DriversApi();
Driver response = driversApi.near("sample_api_token");
System.out.println(response);
} catch (ApiException e) {
System.out.printf("ApiException caught: %s\n", e.getMessage());
}
// generated by http://restunited.com
// for any feedback/issue with the code, please send to support{at}restunited.com
@try
{
SWGDriversApi *driversApi = [[SWGDriversApi alloc] init];
Driver *response = [driversApi nearWithCompletionBlock:@"sample_api_token"];
}
@catch (NSException *exception)
{
NSLog(@"%@ ",exception.name);
NSLog(@"Reason: %@ ",exception.reason);
}
// generated by http://restunited.com
// for any feedback/issue with the code, please send to support{at}restunited.com
// setup authentication
$api_token = 'YOUR_API_KEY';
try{
$apiClient = new Hailo\APIClient('https://api.hailoapp.com');
$drivers_api = new Hailo\DriversAPI($apiClient);
$response = $drivers_api->near($api_token);
var_dump($response);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
# generated by http://restunited.com
# for any feedback/issue with the code, please send to support{at}restunited.com
try:
api_client = Hailo.swagger.ApiClient(api_server="https://api.hailoapp.com")
drivers_api = Hailo.DriversApi(api_client)
response = drivers_api.near("sample_api_token")
if isinstance(response, list):
map(lambda p: pprint(vars(p)), response)
else:
pprint(vars(response))
except Exception, e:
print(e)
# generated by http://restunited.com
# for any feedback/issue with the code, please send to support{at}restunited.com
# setup authentication
api_token = 'YOUR_API_KEY'
begin
response = Hailo::DriversAPI.near(api_token)
p response
rescue StandardError => e
puts "caught error: #{e}"
end
/** generated by http://restunited.com */
/** for any feedback/issue with the code, please send to support{at}restunited.com */
try {
val driversApi = new DriversApi
var response = driversApi.near("sample_api_token")
} catch {
case e: Exception => println("exception caught: " + e);
}
HttpResponse<String> response = Unirest.get("https://api.hailoapp.com/drivers/near?api_token=<api_token>")
.asString();
// HTTP status code
int code = response.getCode();
// Headers
Map<String, String> headers = response.getHeaders();
// Parsed body
String body = response.getBody();
// Unparsed body
InputStream rawBody = response.getRawBody();
unirest.get("https://api.hailoapp.com/drivers/near?api_token=<api_token>")
.end(function (response) {
// HTTP status code
var code = response.code;
// Headers
var headers = response.headers;
// Parsed body
var body = response.body;
// Unparsed body
var raw_body = response.raw_body;
});
UNIUrlConnection *asyncConnection = [[UNIRest get:^(UNISimpleRequest *request) {
[request setUrl:@"https://api.hailoapp.com/drivers/near?api_token=<api_token>"];
}] asJsonAsync:^(UNIHTTPJsonResponse *response, NSError *error) {
// HTTP status code
NSInteger code = response.code;
// Headers
NSDictionary *responseHeaders = response.headers;
// Parsed body
UNIJsonNode *body = response.body;
// Unparsed body
NSData *rawBody = response.rawBody;
}];
$response = Unirest::get(
"https://api.hailoapp.com/drivers/near?api_token=<api_token>",
null,
null
);
$response->code; // HTTP status code
$response->headers; // Headers
$response->body; // Parsed body
$response->raw_body; // Unparsed body
response = unirest.get("https://api.hailoapp.com/drivers/near?api_token=<api_token>")
response.code # HTTP status code
response.headers # The HTTP headers
response.body # The parsed response
response.raw_body # The unparsed response
response = Unirest.get(
"https://api.hailoapp.com/drivers/near?api_token=<api_token>",
headers: {},
parameters: {}
)
response.code # Status code
response.headers # Response headers
response.body # Parsed body
response.raw_body # Unparsed body
HttpResponse<MyClass> response = Unirest.get("https://api.hailoapp.com/drivers/near?api_token=<api_token>")
.asString<MyClass>();
response.Code; // HTTP status code
response.Headers; // Headers
response.Body; // Parsed body
response.Raw; // Unparsed body
Error Code | Message |
---|---|
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Resource not found |
502 | Bad gateway |
503 | Service Unavailable |
Name | Type | Description | |
---|---|---|---|
drivers | Array of Drivers (model) |
Drivers Example: |
Name | Type | Description | |
---|---|---|---|
latitude | Number |
Latitude Example: 51.50808 | |
longitude | Number |
Longitude Example: -0.116408 | |
service_type | String |
Service type Example: regular |
Name | Type | Description | |
---|---|---|---|
etas | Array of Etas (model) |
Etas Example: |
Name | Type | Description | |
---|---|---|---|
count | Integer |
Count Example: 3 | |
eta | Integer |
Eta Example: 6 | |
service_type | String |
Service type Example: regular |
No Terms of Conditions defined
Please contact api@hailocab.com for questions or feedbacks