curl --request PATCH \
--url https://api-sandbox.y.uno/v1/customers/{id} \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--data '
{
"email": "john.doe2@gmail.com"
}
'import requests
url = "https://api-sandbox.y.uno/v1/customers/{id}"
payload = { "email": "john.doe2@gmail.com" }
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({email: 'john.doe2@gmail.com'})
};
fetch('https://api-sandbox.y.uno/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://api-sandbox.y.uno/v1/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'john.doe2@gmail.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/customers/{id}"
payload := strings.NewReader("{\n \"email\": \"john.doe2@gmail.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-sandbox.y.uno/v1/customers/{id}")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john.doe2@gmail.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"john.doe2@gmail.com\"\n}"
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.doe2@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:10:29.163144Z",
"updated_at": "2025-04-11T20:10:29.163141Z",
"merchant_customer_created_at": "2023-08-05T14:43:58.980718Z"
}{
"code": "INVALID_REQUEST",
"messages": [
"Invalid request"
]
}{
"code": "INVALID_CREDENTIALS",
"messages": [
"Invalid credentials"
]
}{
"code": "AUTHORIZATION_REQUIRED",
"messages": [
"The merchant has no authorization to use this API."
]
}Update Customer
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/customers/{id} \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--data '
{
"email": "john.doe2@gmail.com"
}
'import requests
url = "https://api-sandbox.y.uno/v1/customers/{id}"
payload = { "email": "john.doe2@gmail.com" }
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({email: 'john.doe2@gmail.com'})
};
fetch('https://api-sandbox.y.uno/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://api-sandbox.y.uno/v1/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'john.doe2@gmail.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/customers/{id}"
payload := strings.NewReader("{\n \"email\": \"john.doe2@gmail.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-sandbox.y.uno/v1/customers/{id}")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john.doe2@gmail.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"john.doe2@gmail.com\"\n}"
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.doe2@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:10:29.163144Z",
"updated_at": "2025-04-11T20:10:29.163141Z",
"merchant_customer_created_at": "2023-08-05T14:43:58.980718Z"
}{
"code": "INVALID_REQUEST",
"messages": [
"Invalid request"
]
}{
"code": "INVALID_CREDENTIALS",
"messages": [
"Invalid credentials"
]
}{
"code": "AUTHORIZATION_REQUIRED",
"messages": [
"The merchant has no authorization to use this API."
]
}POST/customers API request. The only required field for the request is the customer id. Other supported request fields are equal to the ones on the customer creation process.
You need to specify only the fields you want to update. Every field is available for update.Authorizations
Path Parameters
The unique identifier of the customer (UUID | MAX 36; MIN 36).
Body
The unique identifier of the customer in the external merchant (MAX 255; MIN 3).
Customer´s registration date on the merchants platform (ISO 8601 MAX 27; MIN 27)
The customer's first name (MAX 255; MIN 3).
The customer's last name (MAX 255; MIN 3).
The customer's gender.
The customer's date of birth in the YYYY-MM-DD format (MAX 10; MIN 10).
The customer's e-mail (MAX 255; MIN 3).
The customer's nationality (MAX 2; MIN 2; ISO 3166-1 [blocked]).
AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, CV, KH, CM, CA, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SZ, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW The customer's country (MAX 2; MIN 2; ISO 3166-1 [blocked]).
AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, CV, KH, CM, CA, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SZ, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW Specifies the customer's document object, including its number and type.
Show child attributes
Show child attributes
Specifies the customer's phone number object.
Show child attributes
Show child attributes
Specifies the customer's billing address object.
Show child attributes
Show child attributes
Specifies the customer's shipping address object.
Show child attributes
Show child attributes
Specifies a list of metadata objects. You can add up to 50 metadata objects.
Show child attributes
Show child attributes
Response
200
"94121f98-98f7-4d57-aa5f-228401d35b12"
"1744402154"
"John"
"Doe"
"F"
"1990-02-28"
"john.doe2@gmail.com"
"CO"
"CO"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"2025-04-11T20:10:29.163144Z"
"2025-04-11T20:10:29.163141Z"
"2023-08-05T14:43:58.980718Z"
Was this page helpful?