Retrieve customer detail
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/customers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/customers/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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{
"message": "<string>",
"success": true,
"content": {
"customer": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"full_name": "<string>",
"profile_image_url": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"is_phone_verified": true,
"is_email_verified": true,
"is_whatsapp_verified": true,
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"last_seen": "2023-11-07T05:31:56Z",
"kyc_status": "pending",
"is_verified": true,
"customer_group_id": "<string>",
"tags": [
"<string>"
],
"business": {
"name": "<string>",
"business_type": "<string>",
"pan_number": "<string>",
"gstin": "<string>",
"is_registered_under_gst": true
},
"segments": [
{
"id": "<string>",
"name": "<string>"
}
],
"address": {
"first_name": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"id": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true,
"is_default_shipping": true,
"is_default_billing": true
},
"loyalty": {
"membership_number": "<string>",
"points_earned": 123,
"points_redeemed": 123,
"points_balance": 123,
"total_spent": 123,
"total_orders": 123,
"lifetime_spent": 123,
"lifetime_orders": 123,
"date_of_join": "2023-11-07T05:31:56Z",
"date_of_assign": "2023-11-07T05:31:56Z",
"date_of_reset": "2023-11-07T05:31:56Z",
"current_tier": {
"id": "<string>",
"name": "<string>"
},
"next_tier": {
"id": "<string>",
"name": "<string>",
"total_spent_threshold": 1,
"total_orders_threshold": 1
},
"name": "<string>",
"renewal_type": "yearly",
"tier_upgrade_criteria": "total-spent"
},
"notification_preferences": {
"transactional": {
"email": true,
"sms": true,
"whatsapp": true
},
"promotional": {
"email": true,
"sms": true,
"whatsapp": true
},
"newsletter": {
"email": true,
"sms": true,
"whatsapp": true
}
}
}
}
}POSAdmin
Retrieve customer detail
Retrieve customer detail
GET
/
pos
/
customers
/
{id}
Retrieve customer detail
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/customers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/customers/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/admin/pos/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{
"message": "<string>",
"success": true,
"content": {
"customer": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"full_name": "<string>",
"profile_image_url": "<string>",
"country_code": "<string>",
"phone": "<string>",
"email": "<string>",
"is_phone_verified": true,
"is_email_verified": true,
"is_whatsapp_verified": true,
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"last_seen": "2023-11-07T05:31:56Z",
"kyc_status": "pending",
"is_verified": true,
"customer_group_id": "<string>",
"tags": [
"<string>"
],
"business": {
"name": "<string>",
"business_type": "<string>",
"pan_number": "<string>",
"gstin": "<string>",
"is_registered_under_gst": true
},
"segments": [
{
"id": "<string>",
"name": "<string>"
}
],
"address": {
"first_name": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"id": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true,
"is_default_shipping": true,
"is_default_billing": true
},
"loyalty": {
"membership_number": "<string>",
"points_earned": 123,
"points_redeemed": 123,
"points_balance": 123,
"total_spent": 123,
"total_orders": 123,
"lifetime_spent": 123,
"lifetime_orders": 123,
"date_of_join": "2023-11-07T05:31:56Z",
"date_of_assign": "2023-11-07T05:31:56Z",
"date_of_reset": "2023-11-07T05:31:56Z",
"current_tier": {
"id": "<string>",
"name": "<string>"
},
"next_tier": {
"id": "<string>",
"name": "<string>",
"total_spent_threshold": 1,
"total_orders_threshold": 1
},
"name": "<string>",
"renewal_type": "yearly",
"tier_upgrade_criteria": "total-spent"
},
"notification_preferences": {
"transactional": {
"email": true,
"sms": true,
"whatsapp": true
},
"promotional": {
"email": true,
"sms": true,
"whatsapp": true
},
"newsletter": {
"email": true,
"sms": true,
"whatsapp": true
}
}
}
}
}Was this page helpful?
⌘I