Customer
Get Customer Requests in a Period of Time
This API allows you to fetch a complete list of customer linked to your app-id. You can filter the results based on multiple query params. This API is paginated. The default is 20 transactions per page.
GET
/
v2
/
customers
/
all
Get Customer Requests in a Period of Time
curl --request GET \
--url https://api.cleverhub.co/api/v2/customers/all \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>'import requests
url = "https://api.cleverhub.co/api/v2/customers/all"
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'app-id': '<api-key>', 'secret-key': '<api-key>'}};
fetch('https://api.cleverhub.co/api/v2/customers/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cleverhub.co/api/v2/customers/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"app-id: <api-key>",
"secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cleverhub.co/api/v2/customers/all"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cleverhub.co/api/v2/customers/all")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/customers/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total": 100,
"page": 1,
"per_page": 20,
"records": [
{
"uuid": "VMMAOTFQ",
"email": "string",
"first_name": "string",
"last_name": "string",
"middle_name": "string",
"dob": "2024-04-16",
"phone": "+61-12345523",
"gender": "male",
"street": "string",
"street2": "string",
"city": "string",
"postal_code": "string",
"state": "string",
"country": "US",
"identity": {
"issue_country": "US",
"document_number": "string",
"issue_date": "2024-04-16",
"expiry_date": "2024-04-16",
"id_doc_type": "Passport"
}
}
]
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}Authorizations
A unique identifier assigned to each application.
A secure token associated with the app-id.
Query Parameters
Start date to query payment requests from, format 'DD/MM/YY' or 'YYYY-MM-DDThh:mm:ss'. This datetime would be in UTC timezone
End date to query payment requests, format 'DD/MM/YY' or 'YYYY-MM-DDThh:mm:ss'. The datetime would be in UTC timezone
Page number to query. Currently we support 20 records per page
Default 20 records per page
Get Customer Requests in a Period of Time
curl --request GET \
--url https://api.cleverhub.co/api/v2/customers/all \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>'import requests
url = "https://api.cleverhub.co/api/v2/customers/all"
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'app-id': '<api-key>', 'secret-key': '<api-key>'}};
fetch('https://api.cleverhub.co/api/v2/customers/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cleverhub.co/api/v2/customers/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"app-id: <api-key>",
"secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cleverhub.co/api/v2/customers/all"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cleverhub.co/api/v2/customers/all")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/customers/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total": 100,
"page": 1,
"per_page": 20,
"records": [
{
"uuid": "VMMAOTFQ",
"email": "string",
"first_name": "string",
"last_name": "string",
"middle_name": "string",
"dob": "2024-04-16",
"phone": "+61-12345523",
"gender": "male",
"street": "string",
"street2": "string",
"city": "string",
"postal_code": "string",
"state": "string",
"country": "US",
"identity": {
"issue_country": "US",
"document_number": "string",
"issue_date": "2024-04-16",
"expiry_date": "2024-04-16",
"id_doc_type": "Passport"
}
}
]
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}