Retrieve
curl --request GET \
--url https://{defaultHost}/v1/customers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/customers/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/customers/{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_URL => "https://{defaultHost}/v1/customers/{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 => [
"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://{defaultHost}/v1/customers/{id}"
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://{defaultHost}/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/customers/{id}")
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{
"id": "1b8c8797-63eb-475b-a1ff-3a3b526533c9",
"object": "customer",
"affiliation_expires_at": null,
"billing_matches_shipping": true,
"email": "customer-22@example.com",
"first_name": null,
"indexed": true,
"last_name": null,
"live_mode": true,
"name": null,
"phone": null,
"unsubscribed": false,
"tax_enabled": true,
"portal_url": "http://app.example.com/portal_redirect/customers/1b8c8797-63eb-475b-a1ff-3a3b526533c9",
"affiliation": null,
"billing_address": "9674b084-9f6a-4bf1-a53e-99f43a9c7583",
"default_payment_method": null,
"default_saved_list": null,
"shipping_address": null,
"tax_identifier": null,
"created_at": 1793796875,
"updated_at": 1793796875
}Customers
Retrieve
Retrieves details of a specific customer.
GET
/
v1
/
customers
/
{id}
Retrieve
curl --request GET \
--url https://{defaultHost}/v1/customers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/customers/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/customers/{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_URL => "https://{defaultHost}/v1/customers/{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 => [
"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://{defaultHost}/v1/customers/{id}"
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://{defaultHost}/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/customers/{id}")
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{
"id": "1b8c8797-63eb-475b-a1ff-3a3b526533c9",
"object": "customer",
"affiliation_expires_at": null,
"billing_matches_shipping": true,
"email": "customer-22@example.com",
"first_name": null,
"indexed": true,
"last_name": null,
"live_mode": true,
"name": null,
"phone": null,
"unsubscribed": false,
"tax_enabled": true,
"portal_url": "http://app.example.com/portal_redirect/customers/1b8c8797-63eb-475b-a1ff-3a3b526533c9",
"affiliation": null,
"billing_address": "9674b084-9f6a-4bf1-a53e-99f43a9c7583",
"default_payment_method": null,
"default_saved_list": null,
"shipping_address": null,
"tax_identifier": null,
"created_at": 1793796875,
"updated_at": 1793796875
}Authorizations
Response
200 - application/json
Success
Expandable – The associated affiliation ID.
Expandable – Property not returned unless expanded.
Expandable – The associated address ID.
Expandable – The associated payment method ID.
Expandable – The associated saved list ID.
Expandable – Property not returned unless expanded.
Expandable – Property not returned unless expanded.
Expandable – Property not returned unless expanded.
Expandable – The associated address ID.
Expandable – The associated tax identifier ID.
Expandable – Property not returned unless expanded.
Was this page helpful?