returns a customer by id
curl --request GET \
--url http://127.0.0.1:8080/v1/c/customer/{customer_id} \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/customer/{customer_id}"
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/{customer_id}', 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/{customer_id}",
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/{customer_id}"
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/{customer_id}")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/customer/{customer_id}")
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{
"created": "<string>",
"emails": {},
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"metadata": {},
"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,
"invoice_trigger": "immediate"
},
"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>"
}
},
"customer": "<string>",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"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>",
"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>"
}
}Customer
Get Customer
Retrieve customer by id. The API returns customer and the contract that the customer is currently on
GET
/
v1
/
c
/
customer
/
{customer_id}
returns a customer by id
curl --request GET \
--url http://127.0.0.1:8080/v1/c/customer/{customer_id} \
--header 'wb-key: <api-key>'import requests
url = "http://127.0.0.1:8080/v1/c/customer/{customer_id}"
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/{customer_id}', 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/{customer_id}",
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/{customer_id}"
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/{customer_id}")
.header("wb-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/customer/{customer_id}")
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{
"created": "<string>",
"emails": {},
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"metadata": {},
"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,
"invoice_trigger": "immediate"
},
"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>"
}
},
"customer": "<string>",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"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>",
"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>"
}
}Authorizations
api-keywb_user_cookie
Path Parameters
Response
200 - application/json
Customer
Customer detailed information
Date created
Email addresses associated with this customer
Show child attributes
Show child attributes
Unique identifier of an object. Consists of object class prefix and a UUID
Example:
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Key-value customer metadata with string values.
Show child attributes
Show child attributes
Status of the Customer
- Active - customer is active
- Inactive - Customer account was deactivated
- Temporary - Customer was created, but registration process was not completed
Available options:
active, inactive, temporary Physical address. Used by both Customer and WbCustomer entities.
Show child attributes
Show child attributes
Contracts signed by this Customer
Show child attributes
Show child attributes
Customer Reference. May contain a reference to an external system
Customer Name
Customer notes
Extra information that impacts customer's taxation
Show child attributes
Show child attributes
⌘I