Get All Customers
Take a paginated look at the complete list of customers managed by your business.
get
https://{BASE_URL}/customer
Get all customers (paginated)
CODE SAMPLES
HTTP
GET /customer HTTP/1.1
Host: {{BASE_URL}}
NodeJs - Axios
var axios = require('axios');
var config = {
method: 'get',
url: '{{BASE_URL}}/customer',
headers: { }
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
PHP - cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{BASE_URL}}/customer',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Python - Requests
import requests
url = "{BASE_URL}}/customer"
payload={}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Java - Unirest
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("{BASE_URL}}/customer")
.asString();
Go - Native
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "{BASE_URL}}/customer"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Last modified 10mo ago