Skip to main content
GET
/
customer
/
lists
List customers
curl --request GET \
  --url https://demo.onlinebillingform.com/api/v2/customer/lists \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://demo.onlinebillingform.com/api/v2/customer/lists"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://demo.onlinebillingform.com/api/v2/customer/lists', 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://demo.onlinebillingform.com/api/v2/customer/lists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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://demo.onlinebillingform.com/api/v2/customer/lists"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://demo.onlinebillingform.com/api/v2/customer/lists")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://demo.onlinebillingform.com/api/v2/customer/lists")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "users": [
    {
      "id": 4,
      "name": "Test User",
      "username": "test@baseserv.com",
      "email": "test@baseserv.com",
      "account_type": 2,
      "api_type": "sandbox",
      "mailing_contact": {
        "contact_name": "Test User",
        "phone": "03302207048",
        "email": "test@baseserv.com",
        "city": "Test City",
        "county_id": 1231,
        "country_id": 81
      }
    }
  ],
  "pagination": {
    "total": 1,
    "per_page": 15,
    "current_page": 1,
    "last_page": 1,
    "from": 1,
    "to": 1
  }
}
{
"success": false,
"errors": "Invalid API Key"
}
{
"success": false,
"errors": "Insufficient permissions for this endpoint."
}
{
"success": false,
"errors": {
"id": [
"The id field is required."
]
}
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer <live_api_key>.

Query Parameters

page
integer
per_page
integer
sort_by
string

One of id, name, username, email, created_at, updated_at

sort_dir
string

asc or desc

Response

OK

success
boolean