Skip to main content
GET
/
v1
/
customers
/
{id}
Get customer by ID
curl --request GET \
  --url http://localhost:3000/v1/customers/{id}
import requests

url = "http://localhost:3000/v1/customers/{id}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('http://localhost:3000/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/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",
]);

$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://localhost:3000/v1/customers/{id}"

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("http://localhost:3000/v1/customers/{id}")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:3000/v1/customers/{id}")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "customer": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "full_name": "<string>",
    "email": "<string>",
    "phone": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "analytics": {
      "total_orders": 123,
      "total_spend": 123,
      "average_order_value": 123,
      "orders_pending": 123,
      "orders_completed": 123,
      "orders_cancelled": 123,
      "first_order_at": "<string>",
      "last_order_at": "<string>",
      "price_sensitivity_score": 123,
      "order_frequency_days": 123,
      "category_spend": {},
      "category_frequency": {},
      "category_percent": {},
      "retailer_spend": {},
      "retailer_frequency": {},
      "price_sensitivity_factors": {
        "retailer_discount_ratio": 123,
        "price_vs_median": 123,
        "sale_behavior": 123,
        "brand_premium": 123,
        "weighted_score": 123
      },
      "frequently_purchased": [
        {
          "id": "<string>",
          "count": 123
        }
      ],
      "computed_at": "<string>"
    }
  }
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Path Parameters

id
string<uuid>
required

Customer profile UUID

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Customer detail

Get customer response

customer
object
required

Customer detail