returns customers filtered by query string parameters
curl --request GET \
--url http://127.0.0.1:8080/v1/c/customer \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/customer"
headers = {"wb-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'wb-key': '<api-key>'}};
fetch('http://127.0.0.1:8080/v1/c/customer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/customer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"wb-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 := "http://127.0.0.1:8080/v1/c/customer"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wb-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("http://127.0.0.1:8080/v1/c/customer")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/customer")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["wb-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_page": 123,
"hits": [
{
"created": "<string>",
"emails": {},
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"metadata": {},
"status": "active",
"address": {
"city": "<string>",
"country": "<string>",
"line_1": "<string>",
"zip": "<string>",
"line_2": "<string>",
"state": "<string>"
},
"contracts": [
{
"amount": "<string>",
"billing_information": {
"current_period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"current_period_idx": 123
},
"configuration": {
"automatic_payment": true,
"due_date_policy": "start_of_period",
"invoice_trigger": "immediate",
"usage_period_closing_policy": "automatic"
},
"cost_estimates": {
"custom_cycle_charges": {
"periodic_daily": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_monthly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_quarterly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_weekly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_yearly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
}
},
"on_demand_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"one_time_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"recurring_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
}
},
"currency": "usd",
"customer": "<string>",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"cycle": "once",
"cycle_start_offset": 1,
"free_cycles": 1,
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"plan": "<string>",
"plan_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"plan_internal_name": "<string>",
"status": "active",
"strategy": "plan",
"activation": "2023-11-07T05:31:56Z",
"created": "2023-11-07T05:31:56Z",
"expiration": "2023-11-07T05:31:56Z",
"free_trial_end": "2023-11-07T05:31:56Z",
"next_cycle_start": "2023-11-07T05:31:56Z",
"plan_external_name": "<string>",
"pricing_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
],
"customer_reference": "<string>",
"name": "<string>",
"notes": "<string>",
"tax_details": {
"vat_id": "<string>"
}
}
],
"total": 123,
"total_pages": 123,
"backward": "<string>",
"first": "<string>",
"forward": "<string>",
"last": "<string>"
}Customer
Search for Customers
Returns customers filtered by query string parameters. Atleast one variable must be provided to do the search. All the customers meeting the search criteria will be returned
GET
/
v1
/
c
/
customer
returns customers filtered by query string parameters
curl --request GET \
--url http://127.0.0.1:8080/v1/c/customer \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/customer"
headers = {"wb-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'wb-key': '<api-key>'}};
fetch('http://127.0.0.1:8080/v1/c/customer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/customer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"wb-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 := "http://127.0.0.1:8080/v1/c/customer"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wb-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("http://127.0.0.1:8080/v1/c/customer")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/customer")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["wb-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_page": 123,
"hits": [
{
"created": "<string>",
"emails": {},
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"metadata": {},
"status": "active",
"address": {
"city": "<string>",
"country": "<string>",
"line_1": "<string>",
"zip": "<string>",
"line_2": "<string>",
"state": "<string>"
},
"contracts": [
{
"amount": "<string>",
"billing_information": {
"current_period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"current_period_idx": 123
},
"configuration": {
"automatic_payment": true,
"due_date_policy": "start_of_period",
"invoice_trigger": "immediate",
"usage_period_closing_policy": "automatic"
},
"cost_estimates": {
"custom_cycle_charges": {
"periodic_daily": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_monthly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_quarterly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_weekly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_yearly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
}
},
"on_demand_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"one_time_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"recurring_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
}
},
"currency": "usd",
"customer": "<string>",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"cycle": "once",
"cycle_start_offset": 1,
"free_cycles": 1,
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"plan": "<string>",
"plan_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"plan_internal_name": "<string>",
"status": "active",
"strategy": "plan",
"activation": "2023-11-07T05:31:56Z",
"created": "2023-11-07T05:31:56Z",
"expiration": "2023-11-07T05:31:56Z",
"free_trial_end": "2023-11-07T05:31:56Z",
"next_cycle_start": "2023-11-07T05:31:56Z",
"plan_external_name": "<string>",
"pricing_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
],
"customer_reference": "<string>",
"name": "<string>",
"notes": "<string>",
"tax_details": {
"vat_id": "<string>"
}
}
],
"total": 123,
"total_pages": 123,
"backward": "<string>",
"first": "<string>",
"forward": "<string>",
"last": "<string>"
}Query Parameters
Response
200 - application/json
Customers
A paginated result of the requested resource This is based on Keyset Pagination https://vladmihalcea.com/sql-seek-keyset-pagination/