curl -X PATCH "https://api-sandbox.whitelabel.com/v1/banking/entities/<entity_id>" \
-H "Content-Type: application/json" \
-H "public-api-key: <public-api-key>" \
-H "private-secret-key: <private-secret-key>" \
-d '{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_entity_id": "merchant_user_12345",
"phone": {
"country_code": "+1",
"number": "2025559999"
},
"address": {
"address_line_1": "456 Oak Ave",
"address_line_2": "Suite 100",
"building_number_1": "456",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94105",
"country": "US"
},
"entity_detail": {
"individual": {
"email": "john.new@example.com",
"country_of_residence": "US"
},
"entity": {
"name": "Acme Corp LLC"
}
}
}'
const response = await fetch(`https://api-sandbox.whitelabel.com/v1/banking/entities/${entity_id}`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json', 'public-api-key': '<public-api-key>', 'private-secret-key': '<private-secret-key>' },
body: JSON.stringify({
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_entity_id": "merchant_user_12345",
"phone": {
"country_code": "+1",
"number": "2025559999"
},
"address": {
"address_line_1": "456 Oak Ave",
"address_line_2": "Suite 100",
"building_number_1": "456",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94105",
"country": "US"
},
"entity_detail": {
"individual": {
"email": "john.new@example.com",
"country_of_residence": "US"
},
"entity": {
"name": "Acme Corp LLC"
}
}
})
});
const data = await response.json();
import requests
response = requests.request(
"PATCH",
"https://api-sandbox.whitelabel.com/v1/banking/entities/{entity_id}",
headers={ "public-api-key": "<public-api-key>", "private-secret-key": "<private-secret-key>" },
json={
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_entity_id": "merchant_user_12345",
"phone": {
"country_code": "+1",
"number": "2025559999"
},
"address": {
"address_line_1": "456 Oak Ave",
"address_line_2": "Suite 100",
"building_number_1": "456",
"building_number_2": None,
"city": "San Francisco",
"state": "CA",
"zip_code": "94105",
"country": "US"
},
"entity_detail": {
"individual": {
"email": "john.new@example.com",
"country_of_residence": "US"
},
"entity": {
"name": "Acme Corp LLC"
}
}
},
)
data = response.json()
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api-sandbox.whitelabel.com/v1/banking/entities/<entity_id>");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json", "public-api-key: <public-api-key>", "private-secret-key: <private-secret-key>"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_entity_id": "merchant_user_12345",
"phone": {
"country_code": "+1",
"number": "2025559999"
},
"address": {
"address_line_1": "456 Oak Ave",
"address_line_2": "Suite 100",
"building_number_1": "456",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94105",
"country": "US"
},
"entity_detail": {
"individual": {
"email": "john.new@example.com",
"country_of_residence": "US"
},
"entity": {
"name": "Acme Corp LLC"
}
}
}');
$response = curl_exec($ch);
curl_close($ch);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("PATCH", "https://api-sandbox.whitelabel.com/v1/banking/entities/<entity_id>", strings.NewReader(`{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_entity_id": "merchant_user_12345",
"phone": {
"country_code": "+1",
"number": "2025559999"
},
"address": {
"address_line_1": "456 Oak Ave",
"address_line_2": "Suite 100",
"building_number_1": "456",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94105",
"country": "US"
},
"entity_detail": {
"individual": {
"email": "john.new@example.com",
"country_of_residence": "US"
},
"entity": {
"name": "Acme Corp LLC"
}
}
}`))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("public-api-key", "<public-api-key>")
req.Header.Set("private-secret-key", "<private-secret-key>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api-sandbox.whitelabel.com/v1/banking/entities/<entity_id>"))
.header("Content-Type", "application/json")
.header("public-api-key", "<public-api-key>")
.header("private-secret-key", "<private-secret-key>")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"merchant_entity_id\": \"merchant_user_12345\",\n \"phone\": {\n \"country_code\": \"+1\",\n \"number\": \"2025559999\"\n },\n \"address\": {\n \"address_line_1\": \"456 Oak Ave\",\n \"address_line_2\": \"Suite 100\",\n \"building_number_1\": \"456\",\n \"building_number_2\": null,\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip_code\": \"94105\",\n \"country\": \"US\"\n },\n \"entity_detail\": {\n \"individual\": {\n \"email\": \"john.new@example.com\",\n \"country_of_residence\": \"US\"\n },\n \"entity\": {\n \"name\": \"Acme Corp LLC\"\n }\n }\n}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require "net/http"
require "uri"
uri = URI("https://api-sandbox.whitelabel.com/v1/banking/entities/<entity_id>")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Patch.new(uri)
request["Content-Type"] = "application/json"
request["public-api-key"] = "<public-api-key>"
request["private-secret-key"] = "<private-secret-key>"
request.body = "{\n \"account_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"merchant_entity_id\": \"merchant_user_12345\",\n \"phone\": {\n \"country_code\": \"+1\",\n \"number\": \"2025559999\"\n },\n \"address\": {\n \"address_line_1\": \"456 Oak Ave\",\n \"address_line_2\": \"Suite 100\",\n \"building_number_1\": \"456\",\n \"building_number_2\": null,\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip_code\": \"94105\",\n \"country\": \"US\"\n },\n \"entity_detail\": {\n \"individual\": {\n \"email\": \"john.new@example.com\",\n \"country_of_residence\": \"US\"\n },\n \"entity\": {\n \"name\": \"Acme Corp LLC\"\n }\n }\n}"
response = http.request(request)
puts response.body