Update Customer
curl --request PATCH \
--url https://api-sandbox.revolv3.com/api/Customers/{customerId} \
--header 'Content-Type: application/json-patch+json' \
--header 'x-revolv3-token: <api-key>' \
--data '
{
"merchantCustomerRefId": "1234-5678-9101",
"firstName": "Jonathan",
"lastName": null
}
'import requests
url = "https://api-sandbox.revolv3.com/api/Customers/{customerId}"
payload = {
"merchantCustomerRefId": "1234-5678-9101",
"firstName": "Jonathan",
"lastName": None
}
headers = {
"x-revolv3-token": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-revolv3-token': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({merchantCustomerRefId: '1234-5678-9101', firstName: 'Jonathan', lastName: null})
};
fetch('https://api-sandbox.revolv3.com/api/Customers/{customerId}', 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.revolv3.com/api/Customers/{customerId}",
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([
'merchantCustomerRefId' => '1234-5678-9101',
'firstName' => 'Jonathan',
'lastName' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"x-revolv3-token: <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.revolv3.com/api/Customers/{customerId}"
payload := strings.NewReader("{\n \"merchantCustomerRefId\": \"1234-5678-9101\",\n \"firstName\": \"Jonathan\",\n \"lastName\": null\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-revolv3-token", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+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.revolv3.com/api/Customers/{customerId}")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"merchantCustomerRefId\": \"1234-5678-9101\",\n \"firstName\": \"Jonathan\",\n \"lastName\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.revolv3.com/api/Customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-revolv3-token"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"merchantCustomerRefId\": \"1234-5678-9101\",\n \"firstName\": \"Jonathan\",\n \"lastName\": null\n}"
response = http.request(request)
puts response.read_body{
"customerId": 1,
"merchantCustomerRefId": "1234-5678-9101",
"firstName": "Jonathan",
"lastName": "Doe",
"billingAddresses": [
{
"addressId": 1,
"addressLine1": "100 Main Street",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
}
],
"shippingAddresses": [
{
"addressId": 2,
"addressLine1": "101 First Street",
"addressLine2": null,
"city": "Costa Mesa",
"state": "CA",
"postalCode": "90001",
"phoneNumber": null,
"email": null,
"country": "US"
}
],
"taxAddresses": [],
"subscriptions": []
}{
"message": "Unable to perform the request action with provided data."
}{
"message": "Attempted to perform an unauthorized operation."
}{
"message": "Unable to find an entity with the provided data."
}Customers
Update Customer
Updates the details of an existing customer, such as their first name, last name, or merchant customer reference ID. Only the fields provided in the request will be updated — all other customer data remains unchanged.
This endpoint is typically used when customers change their names, correct a typo, or update their profile during checkout or in an admin panel.
PATCH
/
api
/
Customers
/
{customerId}
Update Customer
curl --request PATCH \
--url https://api-sandbox.revolv3.com/api/Customers/{customerId} \
--header 'Content-Type: application/json-patch+json' \
--header 'x-revolv3-token: <api-key>' \
--data '
{
"merchantCustomerRefId": "1234-5678-9101",
"firstName": "Jonathan",
"lastName": null
}
'import requests
url = "https://api-sandbox.revolv3.com/api/Customers/{customerId}"
payload = {
"merchantCustomerRefId": "1234-5678-9101",
"firstName": "Jonathan",
"lastName": None
}
headers = {
"x-revolv3-token": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-revolv3-token': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({merchantCustomerRefId: '1234-5678-9101', firstName: 'Jonathan', lastName: null})
};
fetch('https://api-sandbox.revolv3.com/api/Customers/{customerId}', 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.revolv3.com/api/Customers/{customerId}",
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([
'merchantCustomerRefId' => '1234-5678-9101',
'firstName' => 'Jonathan',
'lastName' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"x-revolv3-token: <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.revolv3.com/api/Customers/{customerId}"
payload := strings.NewReader("{\n \"merchantCustomerRefId\": \"1234-5678-9101\",\n \"firstName\": \"Jonathan\",\n \"lastName\": null\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-revolv3-token", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+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.revolv3.com/api/Customers/{customerId}")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"merchantCustomerRefId\": \"1234-5678-9101\",\n \"firstName\": \"Jonathan\",\n \"lastName\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.revolv3.com/api/Customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-revolv3-token"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"merchantCustomerRefId\": \"1234-5678-9101\",\n \"firstName\": \"Jonathan\",\n \"lastName\": null\n}"
response = http.request(request)
puts response.read_body{
"customerId": 1,
"merchantCustomerRefId": "1234-5678-9101",
"firstName": "Jonathan",
"lastName": "Doe",
"billingAddresses": [
{
"addressId": 1,
"addressLine1": "100 Main Street",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
}
],
"shippingAddresses": [
{
"addressId": 2,
"addressLine1": "101 First Street",
"addressLine2": null,
"city": "Costa Mesa",
"state": "CA",
"postalCode": "90001",
"phoneNumber": null,
"email": null,
"country": "US"
}
],
"taxAddresses": [],
"subscriptions": []
}{
"message": "Unable to perform the request action with provided data."
}{
"message": "Attempted to perform an unauthorized operation."
}{
"message": "Unable to find an entity with the provided data."
}Authorizations
Path Parameters
Required range:
1 <= x <= 1000000000Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Response
OK
Required range:
1 <= x <= 1000000000Maximum string length:
100Maximum string length:
150Maximum string length:
150Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

