curl --request POST \
--url https://api-sandbox.revolv3.com/api/Customers/{customerId}/address \
--header 'Content-Type: application/json-patch+json' \
--header 'x-revolv3-token: <api-key>' \
--data '
{
"addressType": "Billing",
"addressLine1": "100 Main Street",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
}
'import requests
url = "https://api-sandbox.revolv3.com/api/Customers/{customerId}/address"
payload = {
"addressType": "Billing",
"addressLine1": "100 Main Street",
"addressLine2": None,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": None,
"email": None,
"country": "US"
}
headers = {
"x-revolv3-token": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-revolv3-token': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
addressType: 'Billing',
addressLine1: '100 Main Street',
addressLine2: null,
city: 'Santa Ana',
state: 'CA',
postalCode: '90000',
phoneNumber: null,
email: null,
country: 'US'
})
};
fetch('https://api-sandbox.revolv3.com/api/Customers/{customerId}/address', 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}/address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'addressType' => 'Billing',
'addressLine1' => '100 Main Street',
'addressLine2' => null,
'city' => 'Santa Ana',
'state' => 'CA',
'postalCode' => '90000',
'phoneNumber' => null,
'email' => null,
'country' => 'US'
]),
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}/address"
payload := strings.NewReader("{\n \"addressType\": \"Billing\",\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.revolv3.com/api/Customers/{customerId}/address")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"addressType\": \"Billing\",\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.revolv3.com/api/Customers/{customerId}/address")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-revolv3-token"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"addressType\": \"Billing\",\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n}"
response = http.request(request)
puts response.read_body{
"customerId": 1,
"merchantCustomerRefId": "1234-5678-9101",
"firstName": "John",
"lastName": "Doe",
"billingAddresses": [
{
"addressId": 0,
"addressLine1": "100 Main Street",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
}
],
"shippingAddresses": [],
"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."
}Add Customer Address
Adds a new billing or shipping address to an existing customer profile. The address can later be used for billing calculations, tax reporting, or to associate with subscriptions and invoices. This endpoint is commonly used during onboarding or when a customer adds additional addresses to their profile.
Each customer can have multiple addresses, but if a duplicate address/address type combination is submitted, the request will be rejected with a 400 Bad Request status.
Ensure address uniqueness (per type) before submitting to avoid validation errors.
curl --request POST \
--url https://api-sandbox.revolv3.com/api/Customers/{customerId}/address \
--header 'Content-Type: application/json-patch+json' \
--header 'x-revolv3-token: <api-key>' \
--data '
{
"addressType": "Billing",
"addressLine1": "100 Main Street",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
}
'import requests
url = "https://api-sandbox.revolv3.com/api/Customers/{customerId}/address"
payload = {
"addressType": "Billing",
"addressLine1": "100 Main Street",
"addressLine2": None,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": None,
"email": None,
"country": "US"
}
headers = {
"x-revolv3-token": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-revolv3-token': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
addressType: 'Billing',
addressLine1: '100 Main Street',
addressLine2: null,
city: 'Santa Ana',
state: 'CA',
postalCode: '90000',
phoneNumber: null,
email: null,
country: 'US'
})
};
fetch('https://api-sandbox.revolv3.com/api/Customers/{customerId}/address', 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}/address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'addressType' => 'Billing',
'addressLine1' => '100 Main Street',
'addressLine2' => null,
'city' => 'Santa Ana',
'state' => 'CA',
'postalCode' => '90000',
'phoneNumber' => null,
'email' => null,
'country' => 'US'
]),
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}/address"
payload := strings.NewReader("{\n \"addressType\": \"Billing\",\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.revolv3.com/api/Customers/{customerId}/address")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"addressType\": \"Billing\",\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.revolv3.com/api/Customers/{customerId}/address")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-revolv3-token"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"addressType\": \"Billing\",\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n}"
response = http.request(request)
puts response.read_body{
"customerId": 1,
"merchantCustomerRefId": "1234-5678-9101",
"firstName": "John",
"lastName": "Doe",
"billingAddresses": [
{
"addressId": 0,
"addressLine1": "100 Main Street",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
}
],
"shippingAddresses": [],
"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
1 <= x <= 1000000000Body
Address.
3000Supplemental information for the address.
3000City.
3000State.
2Postal Code.
2 - 20The phone number associated with a payment method that is used for billing purposes.
7 - 21^(?=.*\d)\+?[0-9\s\-\(\)\.]{7,20}$The email associated with a billing address.
3000The input must be a valid Alpha2 code, Alpha3 code, UN code, or full country name.
250Response
Created
1 <= x <= 1000000000100150150Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

