Customers
Retrieve Customer by External ID
Retrieves customer details using the merchant assigned external customer identifier
GET
/
customers
Retrieve Customer by External ID
curl --request GET \
--url https://api-sandbox.y.uno/v1/customers \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/customers"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/customers', 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://api-sandbox.y.uno/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-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 := "https://api-sandbox.y.uno/v1/customers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-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("https://api-sandbox.y.uno/v1/customers")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "94121f98-98f7-4d57-aa5f-228401d35b12",
"merchant_customer_id": "1744402154",
"first_name": "John",
"last_name": "Doe",
"gender": "F",
"date_of_birth": "1990-02-28",
"email": "john.doe@gmail.com",
"nationality": "CO",
"country": "CO",
"document": {
"document_type": "CC",
"document_number": "1010268952"
},
"phone": {
"number": "3132450765",
"country_code": "57"
},
"billing_address": {
"address_line_1": "Calle 34 # 56 - 78",
"address_line_2": "Apartamento 502, Torre I",
"country": "CO",
"state": "Cundinamarca",
"city": "Bogotá",
"zip_code": "111111",
"neighborhood": "Test"
},
"shipping_address": {
"address_line_1": "Calle 34 # 56 - 78",
"address_line_2": "Apartamento 502, Torre I",
"country": "CO",
"state": "Cundinamarca",
"city": "Bogotá",
"zip_code": "111111",
"neighborhood": "Test"
},
"metadata": [
{
"key": "ID",
"value": "1234"
}
],
"created_at": "2025-04-11T20:09:14.927971Z",
"updated_at": "2025-04-11T20:09:14.927972Z",
"merchant_customer_created_at": "2023-08-05T14:43:58.980718Z"
}{
"code": "CUSTOMER_NOT_FOUND",
"messages": [
"Customer not found."
]
}{
"code": "INVALID_CREDENTIALS",
"messages": [
"Invalid Credentials"
]
}{
"code": "AUTHORIZATION_REQUIRED",
"messages": [
"The merchant has no authorization to use this API."
]
}{
"code": "NOT_FOUND",
"messages": [
"Not Found"
]
}This request enables you to retrieve details of customers based on their
merchant_customer_id, which needs to be provided in the request path.Authorizations
Query Parameters
Response
200
Was this page helpful?
⌘I
Retrieve Customer by External ID
curl --request GET \
--url https://api-sandbox.y.uno/v1/customers \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/customers"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/customers', 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://api-sandbox.y.uno/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-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 := "https://api-sandbox.y.uno/v1/customers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-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("https://api-sandbox.y.uno/v1/customers")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "94121f98-98f7-4d57-aa5f-228401d35b12",
"merchant_customer_id": "1744402154",
"first_name": "John",
"last_name": "Doe",
"gender": "F",
"date_of_birth": "1990-02-28",
"email": "john.doe@gmail.com",
"nationality": "CO",
"country": "CO",
"document": {
"document_type": "CC",
"document_number": "1010268952"
},
"phone": {
"number": "3132450765",
"country_code": "57"
},
"billing_address": {
"address_line_1": "Calle 34 # 56 - 78",
"address_line_2": "Apartamento 502, Torre I",
"country": "CO",
"state": "Cundinamarca",
"city": "Bogotá",
"zip_code": "111111",
"neighborhood": "Test"
},
"shipping_address": {
"address_line_1": "Calle 34 # 56 - 78",
"address_line_2": "Apartamento 502, Torre I",
"country": "CO",
"state": "Cundinamarca",
"city": "Bogotá",
"zip_code": "111111",
"neighborhood": "Test"
},
"metadata": [
{
"key": "ID",
"value": "1234"
}
],
"created_at": "2025-04-11T20:09:14.927971Z",
"updated_at": "2025-04-11T20:09:14.927972Z",
"merchant_customer_created_at": "2023-08-05T14:43:58.980718Z"
}{
"code": "CUSTOMER_NOT_FOUND",
"messages": [
"Customer not found."
]
}{
"code": "INVALID_CREDENTIALS",
"messages": [
"Invalid Credentials"
]
}{
"code": "AUTHORIZATION_REQUIRED",
"messages": [
"The merchant has no authorization to use this API."
]
}{
"code": "NOT_FOUND",
"messages": [
"Not Found"
]
}