Car Rental Rates API v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Car Rental Rates API documentation
Authentication
- HTTP Authentication, scheme: bearer
Authentication
generateAuthToken
Code samples
# You can also use wget
curl -X POST /authtoken \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /authtoken HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"userName": "string",
"password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/authtoken',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/authtoken',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/authtoken', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/authtoken', 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("/authtoken");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/authtoken", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /authtoken
generateAuthToken
Implementation Notes
This endpoint authenticates the validity of a username and password combination.
A valid token will be generated if the authentication is successful.
Use the username and password provided to you in your Car Rental Rates API packet.
Mandatory fields:
- userName
- password
Body parameter
{
"userName": "string",
"password": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» userName | body | string | false | none |
» password | body | string | false | none |
Example responses
200 Response
{
"type": "string",
"token": "string",
"expiresIn": "string",
"issued": "string",
"expires": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
400 | Bad Request | Invalid grant type | None |
401 | Unauthorized | Authentication Failed or Account validity Expired | None |
403 | Forbidden | Forbidden - Access denied | None |
404 | Not Found | No user found with username: {userName} | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | false | none | none |
» token | string | false | none | none |
» expiresIn | string | false | none | none |
» issued | string | false | none | none |
» expires | string | false | none | none |
References
getCountries
Code samples
# You can also use wget
curl -X GET /countries \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /countries HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/countries',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/countries',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/countries', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/countries', 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("/countries");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/countries", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /countries
Implementation Notes
This endpoint retrieves a list of all countries available in the system.
Example responses
200 Response
[
{
"name": "string",
"code": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of countries. | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» name | string | false | none | none |
» code | string | false | none | none |
getCurrencies
Code samples
# You can also use wget
curl -X GET /currencies \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /currencies HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/currencies',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/currencies',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/currencies', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/currencies', 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("/currencies");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/currencies", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /currencies
Implementation Notes
This endpoint retrieves a list of all supported currencies.
Example responses
200 Response
[
{
"name": "string",
"code": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of currencies. | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» name | string | false | none | none |
» code | string | false | none | none |
getWebsiteCodes
Code samples
# You can also use wget
curl -X GET /websitecodes \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /websitecodes HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/websitecodes',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/websitecodes',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/websitecodes', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/websitecodes', 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("/websitecodes");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/websitecodes", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /websitecodes
Implementation Notes
This endpoint returns a list of available website codes and their corresponding source names.
Example responses
200 Response
[
{
"websiteCode": 0,
"sourceName": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of website codes. | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» websiteCode | integer | false | none | none |
» sourceName | string | false | none | none |
getStatusCodes
Code samples
# You can also use wget
curl -X GET /statuscodes \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /statuscodes HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/statuscodes',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/statuscodes',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/statuscodes', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/statuscodes', 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("/statuscodes");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/statuscodes", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /statuscodes
Implementation Notes
This endpoint returns a list of available status codes and their corresponding descriptions.
Example responses
200 Response
[
{
"statusCode": 0,
"description": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of status codes. | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | integer | false | none | none |
» description | string | false | none | none |
Locations
listLocations
Code samples
# You can also use wget
curl -X POST /locations \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /locations HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"pickupLocation": "New Jersey"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/locations',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/locations',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/locations', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/locations', 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("/locations");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/locations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /locations
Returns a paginated list of available locations
Body parameter
{
"pickupLocation": "New Jersey"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» pickupLocation | body | string | true | Search query for locations |
Example responses
200 Response
[
{
"pickupLocation": "New Jersey",
"websiteCode": 1,
"countryCode": "US"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Authorization Failed | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» pickupLocation | string | false | none | Pickup location |
» websiteCode | integer | false | none | websiteCode for the pickup location |
» countryCode | string | false | none | Country code for the pickup location |
createLocationRequest
Code samples
# You can also use wget
curl -X POST /locations/request \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /locations/request HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"pickupLocation": "string",
"sourceName": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/locations/request',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/locations/request',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/locations/request', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/locations/request', 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("/locations/request");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/locations/request", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /locations/request
Body parameter
{
"pickupLocation": "string",
"sourceName": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» pickupLocation | body | string | false | Pickup location |
» sourceName | body | string | false | Source of the pickup location |
Example responses
200 Response
{
"locationRequestId": 1
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Location requested successfully | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Authorization Failed | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» locationRequestId | integer | false | none | created location request id |
getLocationStatus
Code samples
# You can also use wget
curl -X GET /locations/{locationRequestId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /locations/{locationRequestId} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/locations/{locationRequestId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/locations/{locationRequestId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/locations/{locationRequestId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/locations/{locationRequestId}', 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("/locations/{locationRequestId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/locations/{locationRequestId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /locations/{locationRequestId}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
locationRequestId | path | integer | true | The ID of the location request |
Example responses
200 Response
{
"status": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Location status retrieved successfully | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Authorization Failed | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» status | string | false | none | Status of the location |
Shop
createShop
Code samples
# You can also use wget
curl -X POST /shops \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /shops HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"shopName": "My Shop",
"markets": [
{
"pickupLocation": "AXD",
"dropLocation": "AYT"
}
],
"websiteCode": [
1
],
"cob": "US",
"lor": 1,
"currency": "USD",
"horizon": 30,
"horizonDow": [],
"pickupTime": "10:30",
"dropTime": "10:30"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shops',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/shops',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/shops', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/shops', 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("/shops");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/shops", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /shops
Implementation Notes
This endpoint is used to create a shop with pickup/drop details.
Parameters: - shopName: Custom name for the shop. - markets: An array of market objects, each containing pickup and drop locations. - websiteCode: Source of the trip data. - cob: Country of booking details. - lor: Length of rent details. - currency: Currency code (e.g., USD, EUR). - horizon: Number of days for the horizon. - horizonDow: (Optional) Specify the days of the week for the horizon. - pickupTime: Pickup time of the trip. - dropTime: Drop time of the trip.
Important Notes:
- horizon
must contain either:
- Only numbers (1–365): "1"
, "2-5"
, "1,2-5"
, etc.
- Or only dates in:
- "YYYY/MM/DD"
- "YYYY/MM/DD-YYYY/MM/DD"
- "YYYY/MM/DD-YYYY/MM/DD,YYYY/MM/DD"
- Mixing numbers and dates is not allowed.
- horizonDow
(if provided) specifies days of the week:
- 0
– Sunday
- 1
– Monday
- 2
– Tuesday
- 3
– Wednesday
- 4
– Thursday
- 5
– Friday
- 6
– Saturday
- Example: [1, 2, 3]
for Monday, Tuesday, Wednesday
- pickupTime
and dropTime
must be in HH:MM
format (24-hour clock).
Mandatory Fields: - shopName - markets - websiteCode - cob - lor - currency - horizon - pickupTime - dropTime
Optional Fields: - horizonDow
Example Request:
json
{
"shopName": "Fast Rentals",
"markets": [
{
"pickupLocation": "AAR",
"dropLocation": "FMM"
},
{
"pickupLocation": "FMM",
"dropLocation": "AAR"
}
],
"websiteCode": [1],
"cob": "US",
"lor": 1,
"currency": "USD",
"horizon": "30",
"horizonDow": [1],
"pickupTime": "10:30",
"dropTime": "10:30"
}
Body parameter
{
"shopName": "My Shop",
"markets": [
{
"pickupLocation": "AXD",
"dropLocation": "AYT"
}
],
"websiteCode": [
1
],
"cob": "US",
"lor": 1,
"currency": "USD",
"horizon": 30,
"horizonDow": [],
"pickupTime": "10:30",
"dropTime": "10:30"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» shopName | body | string | true | Custom name for the shop. |
» markets | body | [object] | false | none |
»» pickupLocation | body | string | false | Pickup location. |
»» dropLocation | body | string | false | Drop location |
» websiteCode | body | [integer] | true | none |
» cob | body | string | true | Country of booking details. |
» lor | body | integer | true | Length of rent details. |
» currency | body | string | true | Currency code (e.g., USD, EUR). |
» horizon | body | string | true | Number of days (if not using start and end dates). |
» horizonDow | body | [integer] | false | none |
» pickupTime | body | string(time) | true | Pickup time of the trip. |
» dropTime | body | string(time) | true | Drop time of the trip. |
Example responses
201 Response
{
"message": "Shop created successfully",
"shopId": 1
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
» shopId | intiger | false | none | none |
listShops
Code samples
# You can also use wget
curl -X GET /shops/list \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /shops/list HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shops/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/shops/list',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/shops/list', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/shops/list', 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("/shops/list");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/shops/list", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /shops/list
Implementation Notes
This API call retrieves the list of shops defined in your account.
Parameters: - ShopsPerPage: Specifies the number of shop records to display per page. Helps limit the number of records fetched at one time. - pageNumber: Indicates the page number of the results to retrieve.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopsPerPage | query | integer | false | The number of items to display in a page |
pageNumber | query | integer | false | Indicates the current page number |
Example responses
200 Response
[
{
"totalRecords": 2,
"fetchedRecords": 2,
"totalPages": 1,
"currentPage": 1,
"pageSize": 10,
"shops": [
{
"shopId": 1001,
"shopName": "My Shop",
"markets": [
{
"pickupLocation": "US",
"dropLocation": "United States"
}
],
"websiteCode": [
1
],
"cob": "US",
"lor": 1,
"currency": "USD",
"horizon": 30,
"horizonDow": [],
"pickupTime": "10:30",
"dropTime": "10:30"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Authorization Failed | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» totalRecords | number | false | none | Total number of records available. |
» fetchedRecords | number | false | none | Number of records fetched in the current response. |
» totalPages | number | false | none | Total number of pages available. |
» currentPage | number | false | none | Current page number. |
» pageSize | number | false | none | Number of records per page. |
» shops | [object] | false | none | List of shops |
»» shopId | integer | false | none | Unique identifier for the shop. |
»» shopName | string | false | none | Name of the shop. |
»» markets | [object] | false | none | none |
»»» pickupLocation | string | false | none | Pickup location. |
»»» dropLocation | string | false | none | Pickup location |
»» websiteCode | [integer] | false | none | none |
»» cob | string | false | none | Country of booking details. |
»» lor | integer | false | none | Length of rent details. |
»» currency | string | false | none | Currency code (e.g., USD, EUR). |
»» horizon | string | false | none | Number of days for the horizon. |
»» horizonDow | [integer] | false | none | none |
»» pickupTime | string(time) | false | none | Pickup time of the trip. |
»» dropTime | string(time) | false | none | Drop time of the trip. |
getShop
Code samples
# You can also use wget
curl -X GET /shops/{shopId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /shops/{shopId} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shops/{shopId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/shops/{shopId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/shops/{shopId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/shops/{shopId}', 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("/shops/{shopId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/shops/{shopId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /shops/{shopId}
Implementation Notes
This endpoint is used to retrieve a shop by its ID.
Important Notes:
- The shopId
must be a valid integer.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | path | integer | true | The ID of the shop to retrieve. |
Example responses
200 Response
{
"shopName": "My Shop",
"markets": [
{
"pickupLocation": "US",
"dropLocation": "United States",
"websiteCode": 1,
"cob": "US",
"lor": 1,
"currency": "USD",
"horizon": 30,
"horizonDow": [
1
],
"pickupTime": "10:30",
"dropTime": "10:30"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful retrieval of the shop | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
404 | Not Found | Shop not found | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» shopName | string | false | none | none |
» markets | [object] | false | none | none |
»» pickupLocation | string | false | none | Pickup location. |
»» dropLocation | string | false | none | Drop location. |
»» websiteCode | integer | false | none | Website code of the trip data. |
»» cob | string | false | none | Country of booking details. |
»» lor | integer | false | none | Length of rent details. |
»» currency | string | false | none | Currency code (e.g., USD, EUR). |
»» horizon | integer | false | none | Number of days for the horizon. |
»» horizonDow | [integer] | false | none | Source of the trip data. |
»» pickupTime | string(time) | false | none | Pickup time. |
»» dropTime | string(time) | false | none | Drop time. |
updateShop
Code samples
# You can also use wget
curl -X PUT /shops/{shopId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
PUT /shops/{shopId} HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"shopName": "My Shop",
"markets": [
{
"pickupLocation": "AXD",
"dropLocation": "AYT"
}
],
"websiteCode": [
1
],
"cob": "US",
"lor": 1,
"currency": "USD",
"horizon": 30,
"horizonDow": [],
"pickupTime": "10:30",
"dropTime": "10:30"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shops/{shopId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/shops/{shopId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/shops/{shopId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/shops/{shopId}', 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("/shops/{shopId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "/shops/{shopId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /shops/{shopId}
Implementation Notes
This API call enables the user to update the configuration details of an existing shop associated with a shop ID.
Body parameter
{
"shopName": "My Shop",
"markets": [
{
"pickupLocation": "AXD",
"dropLocation": "AYT"
}
],
"websiteCode": [
1
],
"cob": "US",
"lor": 1,
"currency": "USD",
"horizon": 30,
"horizonDow": [],
"pickupTime": "10:30",
"dropTime": "10:30"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | path | integer | true | The ID of the shop to update. |
body | body | object | true | none |
» shopName | body | string | true | Custom name for the shop. |
» markets | body | [object] | true | none |
»» pickupLocation | body | string | false | Pickup location. |
»» dropLocation | body | string | false | Drop location. |
» websiteCode | body | [integer] | true | none |
» cob | body | string | true | Country of booking details. |
» lor | body | integer | true | Length of rent details. |
» currency | body | string | true | Currency code (e.g., USD, EUR). |
» horizon | body | string | true | Number of days (if not using start and end dates). |
» horizonDow | body | [integer] | false | none |
» pickupTime | body | string(time) | true | Pickup time of the trip. |
» dropTime | body | string(time) | true | Drop time of the trip. |
Example responses
200 Response
{
"message": "Shop updated successfully"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful update of the shop | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
404 | Not Found | Shop not found | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
deleteShop
Code samples
# You can also use wget
curl -X DELETE /shops/{shopId} \
-H 'Authorization: Bearer {access-token}'
DELETE /shops/{shopId} HTTP/1.1
const headers = {
'Authorization':'Bearer {access-token}'
};
fetch('/shops/{shopId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/shops/{shopId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/shops/{shopId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/shops/{shopId}', 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("/shops/{shopId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/shops/{shopId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /shops/{shopId}
Implementation Notes
This endpoint is used to delete a shop by its ID.
Important Notes:
- The shopId
must be a valid integer.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | path | integer | true | The ID of the shop to delete. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content - Shop deleted successfully, no response body. | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
404 | Not Found | Shop not found | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Schedule
createSchedule
Code samples
# You can also use wget
curl -X POST /schedule \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /schedule HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"scheduleName": "My Schedule",
"shopId": 0,
"year": "*",
"month": "*",
"dow": "*",
"day": "*",
"hour": "*",
"minute": "00",
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/schedule',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/schedule', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/schedule', 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("/schedule");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/schedule", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /schedule
Implementation Notes
This API call allows a user to create a timetable for running a specific shop at a predetermined date and time on a set schedule. While creating the schedule, the user can also define the mode of delivery — either via a Web-Hook or a queue ID.
Parameter Details:
- scheduleName: The name under which the schedule will be created.
- shopId: A unique ID generated when creating the shop.
- year:
"*"
– No specification."2025"
– Single year."2025,2026"
– Multiple years.
- month:
"*"
– All 12 months."1"
– January
"2"
– February
...
"12"
– December"1,3"
– January & March.
- dow (Day of the Week):
"*"
– All days."0"
– Sunday
"1"
– Monday
"2"
– Tuesday
"3"
– Wednesday
"4"
– Thursday
"5"
– Friday
"6"
– Saturday"1,3,5"
– Runs every Monday, Wednesday, and Friday.
- day:
"*"
– All days in the month."1-31"
– Day of the month. Can be passed as an expression (e.g.,"1,3,5"
).
- hour:
"*"
– Every hour."0-23"
– Specific hours (e.g.,"1,3,5"
).
- minute:
"0-59"
– A single minute value (e.g.,"30"
).
- startDate: Date when the schedule starts.
- endDate: Date when the schedule ends. If undefined, the schedule runs indefinitely.
Mandatory Fields: - scheduleName - shopId - year - month - dow - day - hour - minute - startDate - endDate
Note:
Schedule times are in UTC by default (hh:mm
format, 24-hour — e.g., 16:30
).
Body parameter
{
"scheduleName": "My Schedule",
"shopId": 0,
"year": "*",
"month": "*",
"dow": "*",
"day": "*",
"hour": "*",
"minute": "00",
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» scheduleName | body | string | false | Name of the schedule. |
» shopId | body | integer | false | Unique ID generated when creating the shop. |
» year | body | string(date) | false | Year(s) the schedule runs. |
» month | body | string | false | Month(s) the schedule runs. |
» dow | body | string | false | Days of the week the schedule runs. |
» day | body | string | false | Days of the month the schedule runs. |
» hour | body | string | false | Hours the schedule runs. |
» minute | body | string | false | Minutes the schedule runs. |
» startDate | body | string(date) | false | Start date of the schedule (UTC format). |
» endDate | body | string(date) | false | End date of the schedule. If undefined, runs indefinitely. |
Example responses
201 Response
{
"message": "Schedule created successfully.",
"scheduleId": 1
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
404 | Not Found | Schedule not found | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
» scheduleId | integer | false | none | none |
listSchedules
Code samples
# You can also use wget
curl -X GET /schedule/list \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /schedule/list HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule/list',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/schedule/list',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/schedule/list', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/schedule/list', 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("/schedule/list");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/schedule/list", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /schedule/list
Implementation Notes
This API call retrieves the list of schedules defined in your account. You can fetch schedule details for a specific shop by providing the shopId
. If no shopId
is provided, schedules for all shops will be returned.
Parameters: - shopId: The identifier of the shop for which to retrieve schedules. If omitted, schedules for all shops will be shown. - SchedulesPerPage: Specifies the number of schedule records to display per page, helping to limit the number of records fetched at once. - pageNumber: Determines which page of results to view.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | query | integer | false | Enter shopId |
schedulesPerPage | query | integer | false | The number of items to display in a page |
pageNumber | query | integer | false | Indicates the current page number |
Example responses
200 Response
[
{
"totalRecords": 2,
"fetchedRecords": 2,
"totalPages": 1,
"currentPage": 1,
"pageSize": 10,
"schedules": [
{
"scheduleId": 1,
"scheduleName": "X-Mas",
"shopId": 1234,
"year": "*",
"month": "*",
"dow": "*",
"day": "*",
"hour": "1",
"minute": "00",
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Authorization Failed | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» totalRecords | number | false | none | Total number of records available. |
» fetchedRecords | number | false | none | Number of records fetched in the current response. |
» totalPages | number | false | none | Total number of pages available. |
» currentPage | number | false | none | Current page number. |
» pageSize | number | false | none | Number of records per page. |
» schedules | [object] | false | none | none |
»» scheduleId | number | false | none | none |
»» scheduleName | string | false | none | none |
»» shopId | number | false | none | Unique code of the shopId which match from shops |
»» year | string | false | none | The year component of the schedule. Use '*' to match any year. |
»» month | string | false | none | The month component of the schedule. Use '*' to match any month. |
»» dow | string | false | none | The day of the week component of the schedule. Use '*' to match any day of the week. |
»» day | string | false | none | The day of the month component of the schedule. Use '*' to match any day of the month. |
»» hour | string | false | none | The hour component of the schedule. Use '*' to match any hour of the day. |
»» minute | string | false | none | The minute component of the schedule. Use '*' to match any minute of the hour. |
»» startDate | string(date) | false | none | The start date of the schedule. |
»» endDate | string(date) | false | none | The end date of the schedule. |
getScheduleById
Code samples
# You can also use wget
curl -X GET /schedule/{scheduleId}/ \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /schedule/{scheduleId}/ HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule/{scheduleId}/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/schedule/{scheduleId}/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/schedule/{scheduleId}/', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/schedule/{scheduleId}/', 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("/schedule/{scheduleId}/");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/schedule/{scheduleId}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /schedule/{scheduleId}/
Implementation Notes
Retrieves details of a single schedule based on the provided scheduleId
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scheduleId | path | integer | true | Unique identifier for the schedules. |
Example responses
200 Response
{
"scheduleId": 201,
"scheduleName": "sample_schedule_name",
"shopId": 1,
"year": "*",
"month": "*",
"dow": "*",
"day": "*",
"hour": "*",
"minute": "20",
"status": 1,
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
404 | Not Found | Schedule not found | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» scheduleId | integer | false | none | Unique identifier for the schedule. |
» scheduleName | string | false | none | Name of the schedule. |
» shopId | integer | false | none | Unique identifier for the shop in the schedule. |
» year | string | false | none | Year for the schedule. |
» month | string | false | none | Month for the schedule. |
» dow | string | false | none | Day of the week for the schedule. |
» day | string | false | none | Day of the month for the schedule. |
» hour | string | false | none | Hour for the schedule. |
» minute | string | false | none | Minute for the schedule. |
» status | integer | false | none | Status of the schedule. |
» startDate | string(date) | false | none | Start date of the schedule. |
» endDate | string(date) | false | none | End date of the schedule. |
updateSchedule
Code samples
# You can also use wget
curl -X PUT /schedule/{scheduleId}/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
PUT /schedule/{scheduleId}/ HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"scheduleName": "My schedule",
"shopId": 1,
"year": "*",
"month": "*",
"dow": "*",
"day": "*",
"hour": "*",
"minute": "20",
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/schedule/{scheduleId}/',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/schedule/{scheduleId}/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/schedule/{scheduleId}/', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/schedule/{scheduleId}/', 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("/schedule/{scheduleId}/");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "/schedule/{scheduleId}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /schedule/{scheduleId}/
Implementation Notes
Updates the details of a schedule identified by the provided scheduleId
.
Body parameter
{
"scheduleName": "My schedule",
"shopId": 1,
"year": "*",
"month": "*",
"dow": "*",
"day": "*",
"hour": "*",
"minute": "20",
"startDate": "2019-08-24",
"endDate": "2019-08-24"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scheduleId | path | integer | true | Unique identifier for the schedule to update |
body | body | object | true | none |
» scheduleName | body | string | true | Name of the schedule. |
» shopId | body | integer | true | Unique identifier for the shop in the schedule. |
» year | body | string | true | Year for the schedule. |
» month | body | string | true | Month for the schedule. |
» dow | body | string | true | Day of the week for the schedule. |
» day | body | string | true | Day of the month for the schedule. |
» hour | body | string | true | Hour for the schedule. |
» minute | body | string | true | Minute for the schedule. |
» startDate | body | string(date) | true | Start date of the schedule. |
» endDate | body | string(date) | true | End date of the schedule. |
Example responses
200 Response
{
"message": "Schedule updated successfully."
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Schedule updated successfully | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
404 | Not Found | Schedule not found | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
deleteSchedule
Code samples
# You can also use wget
curl -X DELETE /schedule/{scheduleId}/ \
-H 'Authorization: Bearer {access-token}'
DELETE /schedule/{scheduleId}/ HTTP/1.1
const headers = {
'Authorization':'Bearer {access-token}'
};
fetch('/schedule/{scheduleId}/',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete '/schedule/{scheduleId}/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('/schedule/{scheduleId}/', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/schedule/{scheduleId}/', 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("/schedule/{scheduleId}/");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/schedule/{scheduleId}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /schedule/{scheduleId}/
Implementation Notes
Deletes a schedule identified by the provided scheduleId
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scheduleId | path | integer | true | Unique identifier for the schedule to delete. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content - Schedule deleted successfully, no response body. | None |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
404 | Not Found | Schedule not found | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Rates
carRates
Code samples
# You can also use wget
curl -X POST /carrates \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /carrates HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"pickupLocation": "ATL",
"dropLocation": "AYT",
"websiteCode": 1,
"cob": "US",
"pickupDate": "2019-08-24",
"dropDate": "2019-08-24",
"pickupTime": "10:00",
"dropTime": "10:30",
"currency": "USD"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/carrates',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/carrates',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/carrates', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/carrates', 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("/carrates");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/carrates", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /carrates
Implementation Notes
This endpoint retrieves car rental rates based on a single pickup and drop location along with other required trip parameters.
Mandatory Fields: - pickupLocation - dropLocation - websiteCode - cob - pickupDate - dropDate - pickupTime - dropTime - currency
Example Request:
json
{
"pickupLocation": "ATL",
"dropLocation": "ATL",
"websiteCode": 1,
"cob": "US",
"pickupDate": "2025-10-23",
"dropDate": "2025-10-27",
"pickupTime": "10:00",
"dropTime": "14:00",
"currency": "USD"
}
Body parameter
{
"pickupLocation": "ATL",
"dropLocation": "AYT",
"websiteCode": 1,
"cob": "US",
"pickupDate": "2019-08-24",
"dropDate": "2019-08-24",
"pickupTime": "10:00",
"dropTime": "10:30",
"currency": "USD"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» pickupLocation | body | string | true | Pickup airport code or location name. |
» dropLocation | body | string | true | Drop location name. |
» websiteCode | body | integer | true | Website/source identifier. |
» cob | body | string | true | Country of Booking (e.g., US). |
» pickupDate | body | string(date) | true | Pickup date in YYYY-MM-DD format. |
» dropDate | body | string(date) | true | Drop date in YYYY-MM-DD format. |
» pickupTime | body | string(time) | true | Pickup time in HH:mm format. |
» dropTime | body | string(time) | true | Drop time in HH:mm format. |
» currency | body | string | true | Currency code (e.g., USD, EUR). |
Example responses
200 Response
[
{
"websiteCode": 1,
"source": "Expedia",
"pickupLocation": "MDZ",
"dropLocation": "MDZ",
"pickupDate": "2025-06-17",
"dropDate": "2025-06-20",
"pickupTime": "12:00:00",
"dropTime": "11:00:00",
"vendorName": "Enterprise",
"vendorCode": "ET",
"carName": "Swift",
"carType": "Economy",
"price": "159.2",
"basePrice": "13.3",
"currency": "USD",
"carCode": "CCAR",
"door": "5 door",
"airCondition": "true",
"transmission": "Manual",
"mileage": "Unlimited",
"vendorRating": "7.1",
"passengerCapacity": "5 persons",
"baggageDetails": null,
"cob": "US",
"dtcollected": "2025-05-29T12:40:23.124Z",
"statusCode": 200,
"prepay": "true",
"address": "Mendoza Intl Airport, Ruta 40 S/N, Mendoza, Argentina 00000"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» websiteCode | number | false | none | none |
» source | string | false | none | none |
» pickupLocation | string | false | none | none |
» dropLocation | string | false | none | none |
» pickupDate | string(date) | false | none | none |
» dropDate | string(date) | false | none | none |
» pickupTime | string | false | none | none |
» dropTime | string | false | none | none |
» vendorName | string | false | none | none |
» vendorCode | string | false | none | none |
» carName | string | false | none | none |
» carType | string | false | none | none |
» price | string | false | none | none |
» basePrice | string | false | none | none |
» currency | string | false | none | none |
» carCode | string | false | none | none |
» door | string | false | none | none |
» airCondition | sttring | false | none | none |
» transmission | string | false | none | none |
» mileage | string | false | none | none |
» vendorRating | string | false | none | none |
» passengerCapacity | string | false | none | none |
» baggageDetails | string¦null | false | none | none |
» cob | string | false | none | none |
» dtcollected | string(date-time) | false | none | none |
» statusCode | integer | false | none | none |
» prepay | string | false | none | none |
» address | string | false | none | none |
onDemandRates
Code samples
# You can also use wget
curl -X POST /ondemand \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /ondemand HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"shopId": 25,
"markets": [
{
"pickupLocation": "",
"dropLocation": ""
}
],
"websiteCode": [],
"cob": "",
"lor": 0,
"currency": "",
"horizon": "",
"horizonDow": [],
"pickupTime": "",
"dropTime": ""
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/ondemand',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/ondemand',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/ondemand', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/ondemand', 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("/ondemand");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/ondemand", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ondemand
Implementation Notes
This API call executes the shop to retrieve rates based on the configuration parameters defined during the shop creation. The only mandatory parameter is the shop ID. While all request parameters can be set at the time of shop creation, you may opt to define certain parameters, such as the markets, websiteCode, cob, lor, currency at runtime. Even if these parameters were set during creation, they can still be overridden during execution.
Mandatory Fields: - shopId
Optional Fields: - markets - websiteCode - cob - lor - currency - horizon - horizonDow - pickupTime - dropTime
Example Request:
Example 1:
json
{
"shopId": 25
}
Example 2:
json
{
"shopId": 25,
"markets": [
{
"pickupLocation": "AAR",
"dropLocation": "FMM"
},
{
"pickupLocation": "FMM",
"dropLocation": "AAR"
}
],
"horizon": "0-99"
}
Body parameter
{
"shopId": 25,
"markets": [
{
"pickupLocation": "",
"dropLocation": ""
}
],
"websiteCode": [],
"cob": "",
"lor": 0,
"currency": "",
"horizon": "",
"horizonDow": [],
"pickupTime": "",
"dropTime": ""
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» shopId | body | integer | false | Unique identifier for the shop. |
» markets | body | [object] | false | none |
»» pickupLocation | body | string | false | Pickup location. |
»» dropLocation | body | string | false | Drop location |
» websiteCode | body | [integer] | true | none |
» cob | body | string | true | Country of booking details. |
» lor | body | integer | true | Length of rent details. |
» currency | body | string | true | Currency code (e.g., USD, EUR). |
» horizon | body | string | true | Number of days (if not using start and end dates). |
» horizonDow | body | [integer] | false | none |
» pickupTime | body | string(time) | true | Pickup time of the trip. |
» dropTime | body | string(time) | true | Drop time of the trip. |
Example responses
200 Response
{
"message": "queue processed successfully."
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
429 | Too Many Requests | Too Many Requests | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
getShopStatus
Code samples
# You can also use wget
curl -X GET /shopstatus/{shopId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /shopstatus/{shopId} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/shopstatus/{shopId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/shopstatus/{shopId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/shopstatus/{shopId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/shopstatus/{shopId}', 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("/shopstatus/{shopId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/shopstatus/{shopId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /shopstatus/{shopId}
Implementation Notes
This endpoint is used to check the status of a shop by its ID.
Important Notes:
- The shopId
must be a valid integer.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | path | integer | true | The ID of the shop to retrieve. |
Example responses
200 Response
{
"shopId": 0,
"createdDate": "2025-05-29 13:00:00",
"completedDate": "2025-05-29 13:15:00",
"status": "completed"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» shopId | integer | false | none | none |
» createdDate | string | false | none | none |
» completedDate | string | false | none | none |
» status | string | false | none | Status of the shop request. |
getPricingData
Code samples
# You can also use wget
curl -X GET /pricingdata/{shopId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /pricingdata/{shopId} HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/pricingdata/{shopId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/pricingdata/{shopId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/pricingdata/{shopId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/pricingdata/{shopId}', 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("/pricingdata/{shopId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/pricingdata/{shopId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /pricingdata/{shopId}
Implementation Notes
This endpoint is used to fetch the pricing data for a specific shop.
Important Notes:
- The shopId
must be a valid integer.
Response Notes:
- shopId
: Unique identification number of the shop.
- websiteCode
: Source platform code for the trip data.
- source
: Car rental booking site name.
- pickupLocation
: Extracted location where the car rental starts.
- dropLocation
: Extracted location where the car rental ends.
- pickupDate
: Date of the car rental pickup.
- dropDate
: Date of the car rental drop-off.
- pickupTime
: Time of the car pickup.
- dropTime
: Time of the car drop-off.
- vendorName
: Name of the rental car provider.
- vendorCode
: Code representing the vendor.
- carName
: Name of the rented car.
- carType
: Type/category of the car (e.g., Economy, Compact).
- price
: Price including taxes.
- basePrice
: Price excluding taxes.
- currency
: Currency code used for pricing (e.g., USD, EUR).
- carCode
: Standardized code representing the car class.
- door
: Number of car doors (e.g., "5 door").
- airCondition
: Indicates if the car has air conditioning (true or false).
- transmission
: Type of car transmission (e.g., Manual, Automatic).
- mileage
: Mileage allowance (e.g., Unlimited).
- vendorRating
: Vendor rating score.
- passengerCapacity
: Number of passengers the car can accommodate (e.g., "5 persons").
- baggageDetails
: Information about baggage allowance (can be null).
- cob
: Country of booking (e.g., "US").
- dtcollected
: Timestamp when the data was collected and stored.
- statusCode
: Status code to monitor if the entry is valid (e.g., 200 for valid).
- prepay
: Indicates if the car is prepaid or not (true or false).
- address
: Full booking address of the rental location.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
shopId | path | integer | true | The ID of the shop to retrieve. |
ratesPerPage | query | integer | false | The number of items to display in a page |
pageNumber | query | integer | false | Indicates the current page number |
Example responses
200 Response
[
{
"totalRecords": 2,
"fetchedRecords": 2,
"totalPages": 1,
"currentPage": 1,
"pageSize": 10,
"rates": [
{
"shopId": 1,
"websiteCode": "EXP",
"source": "Expedia",
"pickupLocation": "MDZ",
"dropLocation": "MDZ",
"pickupDate": "2025-06-17",
"dropDate": "2025-06-20",
"pickupTime": "12:00:00",
"dropTime": "11:00:00",
"vendorName": "Enterprise",
"vendorCode": "ET",
"carName": "Swift",
"carType": "Economy",
"price": "159.2",
"basePrice": "13.3",
"currency": "USD",
"carCode": "CCAR",
"door": "5 door",
"airCondition": true,
"transmission": "Manual",
"mileage": "Unlimited",
"vendorRating": "7.1",
"passengerCapacity": "5 persons",
"baggageDetails": null,
"cob": "US",
"dtcollected": "2025-05-29T12:40:23.124Z",
"statusCode": 200,
"prepay": true,
"address": "Mendoza Intl Airport, Ruta 40 S/N, Mendoza, Argentina 00000"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Inline |
400 | Bad Request | Bad Request | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden - Access denied | None |
500 | Internal Server Error | Internal Server Error | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» totalRecords | integer | false | none | none |
» fetchedRecords | integer | false | none | none |
» totalPages | integer | false | none | none |
» currentPage | integer | false | none | none |
» pageSize | integer | false | none | none |
» rates | [object] | false | none | none |
»» shopId | integer | false | none | none |
»» websiteCode | string | false | none | none |
»» source | string | false | none | none |
»» pickupLocation | string | false | none | none |
»» dropLocation | string | false | none | none |
»» pickupDate | string(date) | false | none | none |
»» dropDate | string(date) | false | none | none |
»» pickupTime | string | false | none | none |
»» dropTime | string | false | none | none |
»» vendorName | string | false | none | none |
»» vendorCode | string | false | none | none |
»» carName | string | false | none | none |
»» carType | string | false | none | none |
»» price | string | false | none | none |
»» basePrice | string | false | none | none |
»» currency | string | false | none | none |
»» carCode | string | false | none | none |
»» door | string | false | none | none |
»» airCondition | boolean | false | none | none |
»» transmission | string | false | none | none |
»» mileage | string | false | none | none |
»» vendorRating | string | false | none | none |
»» passengerCapacity | string | false | none | none |
»» baggageDetails | string¦null | false | none | none |
»» cob | string | false | none | none |
»» dtcollected | string(date-time) | false | none | none |
»» statusCode | integer | false | none | none |
»» prepay | boolean | false | none | none |
»» address | string | false | none | none |
Webhook
createWebhook
Code samples
# You can also use wget
curl -X POST /webhooks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /webhooks HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"isAlertHook": true,
"endpoint": "https://example.com/webhook",
"authType": "none",
"userName": "admin",
"password": "securepassword123",
"token": ""
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/webhooks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/webhooks',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/webhooks', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/webhooks', 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("/webhooks");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/webhooks", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /webhooks
Implementation Notes
This endpoint is used to create a webhook.
Parameters:
- endpoint: Target URL where the webhook will send HTTP POST requests.
- authType: Authentication method to use (none
, basic
, querystring
, authheader
, header
, bearer
).
- userName: Required when authType
is basic
. Ignored if authType
is none
.
- password: Required when authType
is basic
. Ignored if authType
is none
.
- token: Required when authType
is any token-based type (querystring
, authheader
, header
, bearer
). Ignored if authType
is none
.
Important Notes:
- If authType
is none
, then userName
, password
, and token
must not be provided.
- If authType
is basic
, both userName
and password
are mandatory.
- If authType
is querystring
or authheader
or header
or bearer
token must be provided.
- You must provide either user credentials (userName
/password
) or a token
, but not both.
Example Request:
json
{
"isAlertHook": true,
"endpoint": "https://example.com/webhook",
"authType": "bearer",
"token": "abcd1234token"
}
Body parameter
{
"isAlertHook": true,
"endpoint": "https://example.com/webhook",
"authType": "none",
"userName": "admin",
"password": "securepassword123",
"token": ""
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» isAlertHook | body | boolean | false | Indicates if this webhook is used for alerts. |
» endpoint | body | string | true | URL that will receive the webhook payloads. |
» authType | body | string | true | Authentication method to use for the webhook. |
» userName | body | string | false | Required if authType is basic . |
» password | body | string | false | Required if authType is basic . |
» token | body | string | false | Required if using token-based authType (querystring , authheader , header , bearer ). |
Enumerated Values
Parameter | Value |
---|---|
» authType | none |
» authType | basic |
» authType | querystring |
» authType | authheader |
» authType | header |
» authType | bearer |
Example responses
201 Response
{
"message": "Webhook created successfully"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Webhook created successfully. | Inline |
400 | Bad Request | Bad Request – Validation failed or incorrect parameters. | None |
401 | Unauthorized | Unauthorized – Authentication credentials are invalid or missing. | None |
429 | Too Many Requests | Too Many Requests – Rate limiting in effect. | None |
500 | Internal Server Error | Internal Server Error – An unexpected issue occurred on the server. | None |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
getWebhook
Code samples
# You can also use wget
curl -X GET /webhooks \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /webhooks HTTP/1.1
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/webhooks',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/webhooks',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/webhooks', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/webhooks', 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("/webhooks");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/webhooks", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /webhooks
Implementation Notes
This endpoint is used to retrieve Webhook.
Example responses
200 Response
{
"isAlertHook": true,
"endpoint": "https://example.com/webhook",
"authType": "basic",
"userName": "admin",
"password": "********",
"token": ""
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Webhook found | Inline |
400 | Bad Request | No webhook found. | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» isAlertHook | boolean | false | none | none |
» endpoint | string | false | none | none |
» authType | string | false | none | none |
» userName | string | false | none | none |
» password | string | false | none | Required if authType is basic . |
» token | string | false | none | Required if using token-based authType (querystring , authheader , header , bearer ). |
Enumerated Values
Property | Value |
---|---|
authType | none |
authType | basic |
authType | querystring |
authType | authheader |
authType | header |
authType | bearer |
updateWebhook
Code samples
# You can also use wget
curl -X PUT /webhooks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
PUT /webhooks HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"isAlertHook": true,
"endpoint": "https://example.com/updated-hook",
"authType": "none",
"userName": "admin",
"password": "newpassword123",
"token": ""
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('/webhooks',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/webhooks',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/webhooks', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/webhooks', 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("/webhooks");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "/webhooks", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /webhooks
Implementation Notes
This endpoint updates the configuration of an existing webhook.
Parameters:
- endpoint: The new target URL to send webhook payloads to.
- authType: Authentication method (none
, basic
, querystring
, authheader
, header
, bearer
).
- userName: Required for basic
authType.
- password: Required for basic
authType.
- token: Required for token-based authTypes.
Validation Rules:
- If authType
is none
, then userName
, password
, and token
must not be present.
- If authType
is basic
, both userName
and password
are mandatory.
- If authType
is querystring
or authheader
or header
or bearer
token must be provided.
- You must provide either user credentials or a token
, but not both.
Example Request:
json
{
"endpoint": "https://example.com/updated-hook",
"authType": "querystring",
"token": "new-token-1234"
}
Body parameter
{
"isAlertHook": true,
"endpoint": "https://example.com/updated-hook",
"authType": "none",
"userName": "admin",
"password": "newpassword123",
"token": ""
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» isAlertHook | body | boolean | false | Indicates if this webhook is used for alerts. |
» endpoint | body | string(uri) | true | Updated webhook endpoint URL |
» authType | body | string | true | Updated authentication type |
» userName | body | string | false | Required if authType is basic |
» password | body | string | false | Required if authType is basic |
» token | body | string | false | Required if using token-based authType (querystring , authheader , header , bearer ). |
Enumerated Values
Parameter | Value |
---|---|
» authType | none |
» authType | basic |
» authType | querystring |
» authType | authheader |
» authType | header |
» authType | bearer |
Example responses
200 Response
{
"message": "Webhook updated successfully"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Webhook updated successfully | Inline |
400 | Bad Request | Invalid input – Validation error or Webhook not found | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |