curl -X POST "https://api-sandbox.whitelabel.com/v1/banking/entities" \
-H "Content-Type: application/json" \
-H "x-idempotency-key: <x-idempotency-key>" \
-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",
"national_entity": "INDIVIDUAL",
"phone": {
"country_code": "+1",
"number": "2025551234"
},
"address": {
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"building_number_1": "123",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "US"
},
"entity_detail": {
"individual": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"date_of_birth": "1990-01-15",
"gender": "M",
"country_of_residence": "US",
"tax_information": [
{
"country": "US",
"tax_id": "123-45-6789",
"tax_id_type": "SSN",
"is_primary": true
}
],
"document": {
"document_type": "SSN",
"document_number": "123-45-6789",
"issuing_country": "US",
"issued_at": "2010-01-15",
"expires_at": "2030-01-15"
}
},
"entity": {
"name": "Acme Corporation Inc",
"country": "US",
"tax_information": [
{
"country": "US",
"tax_id": "12-3456789",
"tax_id_type": "EIN",
"is_primary": true
}
],
"entity_type": "CORPORATION",
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@acme.com",
"date_of_birth": "1985-03-20",
"gender": "F",
"country_of_residence": "US",
"tax_information": [
{
"country": "US",
"tax_id": "987-65-4321",
"tax_id_type": "SSN",
"is_primary": true
}
],
"document": {
"document_type": "SSN",
"document_number": "987-65-4321",
"issuing_country": "US",
"issued_at": "2005-03-20",
"expires_at": null
},
"ownership_percentage": 100,
"title": "CEO",
"address": {
"address_line_1": "789 Oak St",
"address_line_2": null,
"building_number_1": "789",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94103",
"country": "US"
}
}
]
}
}
}' const response = await fetch ( `https://api-sandbox.whitelabel.com/v1/banking/entities` , {
method: 'POST' ,
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" ,
"national_entity" : "INDIVIDUAL" ,
"phone" : {
"country_code" : "+1" ,
"number" : "2025551234"
},
"address" : {
"address_line_1" : "123 Main St" ,
"address_line_2" : "Apt 4B" ,
"building_number_1" : "123" ,
"building_number_2" : null ,
"city" : "San Francisco" ,
"state" : "CA" ,
"zip_code" : "94102" ,
"country" : "US"
},
"entity_detail" : {
"individual" : {
"first_name" : "John" ,
"last_name" : "Doe" ,
"email" : "john@example.com" ,
"date_of_birth" : "1990-01-15" ,
"gender" : "M" ,
"country_of_residence" : "US" ,
"tax_information" : [
{
"country" : "US" ,
"tax_id" : "123-45-6789" ,
"tax_id_type" : "SSN" ,
"is_primary" : true
}
],
"document" : {
"document_type" : "SSN" ,
"document_number" : "123-45-6789" ,
"issuing_country" : "US" ,
"issued_at" : "2010-01-15" ,
"expires_at" : "2030-01-15"
}
},
"entity" : {
"name" : "Acme Corporation Inc" ,
"country" : "US" ,
"tax_information" : [
{
"country" : "US" ,
"tax_id" : "12-3456789" ,
"tax_id_type" : "EIN" ,
"is_primary" : true
}
],
"entity_type" : "CORPORATION" ,
"beneficial_owners" : [
{
"first_name" : "Jane" ,
"last_name" : "Smith" ,
"email" : "jane@acme.com" ,
"date_of_birth" : "1985-03-20" ,
"gender" : "F" ,
"country_of_residence" : "US" ,
"tax_information" : [
{
"country" : "US" ,
"tax_id" : "987-65-4321" ,
"tax_id_type" : "SSN" ,
"is_primary" : true
}
],
"document" : {
"document_type" : "SSN" ,
"document_number" : "987-65-4321" ,
"issuing_country" : "US" ,
"issued_at" : "2005-03-20" ,
"expires_at" : null
},
"ownership_percentage" : 100 ,
"title" : "CEO" ,
"address" : {
"address_line_1" : "789 Oak St" ,
"address_line_2" : null ,
"building_number_1" : "789" ,
"building_number_2" : null ,
"city" : "San Francisco" ,
"state" : "CA" ,
"zip_code" : "94103" ,
"country" : "US"
}
}
]
}
}
})
});
const data = await response. json (); import requests
response = requests.request(
"POST" ,
"https://api-sandbox.whitelabel.com/v1/banking/entities" ,
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" ,
"national_entity" : "INDIVIDUAL" ,
"phone" : {
"country_code" : "+1" ,
"number" : "2025551234"
},
"address" : {
"address_line_1" : "123 Main St" ,
"address_line_2" : "Apt 4B" ,
"building_number_1" : "123" ,
"building_number_2" : None ,
"city" : "San Francisco" ,
"state" : "CA" ,
"zip_code" : "94102" ,
"country" : "US"
},
"entity_detail" : {
"individual" : {
"first_name" : "John" ,
"last_name" : "Doe" ,
"email" : "john@example.com" ,
"date_of_birth" : "1990-01-15" ,
"gender" : "M" ,
"country_of_residence" : "US" ,
"tax_information" : [
{
"country" : "US" ,
"tax_id" : "123-45-6789" ,
"tax_id_type" : "SSN" ,
"is_primary" : True
}
],
"document" : {
"document_type" : "SSN" ,
"document_number" : "123-45-6789" ,
"issuing_country" : "US" ,
"issued_at" : "2010-01-15" ,
"expires_at" : "2030-01-15"
}
},
"entity" : {
"name" : "Acme Corporation Inc" ,
"country" : "US" ,
"tax_information" : [
{
"country" : "US" ,
"tax_id" : "12-3456789" ,
"tax_id_type" : "EIN" ,
"is_primary" : True
}
],
"entity_type" : "CORPORATION" ,
"beneficial_owners" : [
{
"first_name" : "Jane" ,
"last_name" : "Smith" ,
"email" : "jane@acme.com" ,
"date_of_birth" : "1985-03-20" ,
"gender" : "F" ,
"country_of_residence" : "US" ,
"tax_information" : [
{
"country" : "US" ,
"tax_id" : "987-65-4321" ,
"tax_id_type" : "SSN" ,
"is_primary" : True
}
],
"document" : {
"document_type" : "SSN" ,
"document_number" : "987-65-4321" ,
"issuing_country" : "US" ,
"issued_at" : "2005-03-20" ,
"expires_at" : None
},
"ownership_percentage" : 100 ,
"title" : "CEO" ,
"address" : {
"address_line_1" : "789 Oak St" ,
"address_line_2" : None ,
"building_number_1" : "789" ,
"building_number_2" : None ,
"city" : "San Francisco" ,
"state" : "CA" ,
"zip_code" : "94103" ,
"country" : "US"
}
}
]
}
}
},
)
data = response.json() <? php
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api-sandbox.whitelabel.com/v1/banking/entities" );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST , "POST" );
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",
"national_entity": "INDIVIDUAL",
"phone": {
"country_code": "+1",
"number": "2025551234"
},
"address": {
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"building_number_1": "123",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "US"
},
"entity_detail": {
"individual": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"date_of_birth": "1990-01-15",
"gender": "M",
"country_of_residence": "US",
"tax_information": [
{
"country": "US",
"tax_id": "123-45-6789",
"tax_id_type": "SSN",
"is_primary": true
}
],
"document": {
"document_type": "SSN",
"document_number": "123-45-6789",
"issuing_country": "US",
"issued_at": "2010-01-15",
"expires_at": "2030-01-15"
}
},
"entity": {
"name": "Acme Corporation Inc",
"country": "US",
"tax_information": [
{
"country": "US",
"tax_id": "12-3456789",
"tax_id_type": "EIN",
"is_primary": true
}
],
"entity_type": "CORPORATION",
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@acme.com",
"date_of_birth": "1985-03-20",
"gender": "F",
"country_of_residence": "US",
"tax_information": [
{
"country": "US",
"tax_id": "987-65-4321",
"tax_id_type": "SSN",
"is_primary": true
}
],
"document": {
"document_type": "SSN",
"document_number": "987-65-4321",
"issuing_country": "US",
"issued_at": "2005-03-20",
"expires_at": null
},
"ownership_percentage": 100,
"title": "CEO",
"address": {
"address_line_1": "789 Oak St",
"address_line_2": null,
"building_number_1": "789",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94103",
"country": "US"
}
}
]
}
}
}' );
$response = curl_exec ($ch);
curl_close ($ch); package main
import (
" fmt "
" io "
" net/http "
" strings "
)
func main () {
req, _ := http. NewRequest ( "POST" , "https://api-sandbox.whitelabel.com/v1/banking/entities" , strings. NewReader ( `{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_entity_id": "merchant_user_12345",
"national_entity": "INDIVIDUAL",
"phone": {
"country_code": "+1",
"number": "2025551234"
},
"address": {
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"building_number_1": "123",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "US"
},
"entity_detail": {
"individual": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"date_of_birth": "1990-01-15",
"gender": "M",
"country_of_residence": "US",
"tax_information": [
{
"country": "US",
"tax_id": "123-45-6789",
"tax_id_type": "SSN",
"is_primary": true
}
],
"document": {
"document_type": "SSN",
"document_number": "123-45-6789",
"issuing_country": "US",
"issued_at": "2010-01-15",
"expires_at": "2030-01-15"
}
},
"entity": {
"name": "Acme Corporation Inc",
"country": "US",
"tax_information": [
{
"country": "US",
"tax_id": "12-3456789",
"tax_id_type": "EIN",
"is_primary": true
}
],
"entity_type": "CORPORATION",
"beneficial_owners": [
{
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@acme.com",
"date_of_birth": "1985-03-20",
"gender": "F",
"country_of_residence": "US",
"tax_information": [
{
"country": "US",
"tax_id": "987-65-4321",
"tax_id_type": "SSN",
"is_primary": true
}
],
"document": {
"document_type": "SSN",
"document_number": "987-65-4321",
"issuing_country": "US",
"issued_at": "2005-03-20",
"expires_at": null
},
"ownership_percentage": 100,
"title": "CEO",
"address": {
"address_line_1": "789 Oak St",
"address_line_2": null,
"building_number_1": "789",
"building_number_2": null,
"city": "San Francisco",
"state": "CA",
"zip_code": "94103",
"country": "US"
}
}
]
}
}
}` ))
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" ))
. header ( "Content-Type" , "application/json" )
. header ( "public-api-key" , "<public-api-key>" )
. header ( "private-secret-key" , "<private-secret-key>" )
. method ( "POST" , HttpRequest.BodyPublishers. ofString ( "{ \n \" account_id \" : \" 550e8400-e29b-41d4-a716-446655440000 \" , \n \" merchant_entity_id \" : \" merchant_user_12345 \" , \n \" national_entity \" : \" INDIVIDUAL \" , \n \" phone \" : { \n \" country_code \" : \" +1 \" , \n \" number \" : \" 2025551234 \"\n }, \n \" address \" : { \n \" address_line_1 \" : \" 123 Main St \" , \n \" address_line_2 \" : \" Apt 4B \" , \n \" building_number_1 \" : \" 123 \" , \n \" building_number_2 \" : null, \n \" city \" : \" San Francisco \" , \n \" state \" : \" CA \" , \n \" zip_code \" : \" 94102 \" , \n \" country \" : \" US \"\n }, \n \" entity_detail \" : { \n \" individual \" : { \n \" first_name \" : \" John \" , \n \" last_name \" : \" Doe \" , \n \" email \" : \" john@example.com \" , \n \" date_of_birth \" : \" 1990-01-15 \" , \n \" gender \" : \" M \" , \n \" country_of_residence \" : \" US \" , \n \" tax_information \" : [ \n { \n \" country \" : \" US \" , \n \" tax_id \" : \" 123-45-6789 \" , \n \" tax_id_type \" : \" SSN \" , \n \" is_primary \" : true \n } \n ], \n \" document \" : { \n \" document_type \" : \" SSN \" , \n \" document_number \" : \" 123-45-6789 \" , \n \" issuing_country \" : \" US \" , \n \" issued_at \" : \" 2010-01-15 \" , \n \" expires_at \" : \" 2030-01-15 \"\n } \n }, \n \" entity \" : { \n \" name \" : \" Acme Corporation Inc \" , \n \" country \" : \" US \" , \n \" tax_information \" : [ \n { \n \" country \" : \" US \" , \n \" tax_id \" : \" 12-3456789 \" , \n \" tax_id_type \" : \" EIN \" , \n \" is_primary \" : true \n } \n ], \n \" entity_type \" : \" CORPORATION \" , \n \" beneficial_owners \" : [ \n { \n \" first_name \" : \" Jane \" , \n \" last_name \" : \" Smith \" , \n \" email \" : \" jane@acme.com \" , \n \" date_of_birth \" : \" 1985-03-20 \" , \n \" gender \" : \" F \" , \n \" country_of_residence \" : \" US \" , \n \" tax_information \" : [ \n { \n \" country \" : \" US \" , \n \" tax_id \" : \" 987-65-4321 \" , \n \" tax_id_type \" : \" SSN \" , \n \" is_primary \" : true \n } \n ], \n \" document \" : { \n \" document_type \" : \" SSN \" , \n \" document_number \" : \" 987-65-4321 \" , \n \" issuing_country \" : \" US \" , \n \" issued_at \" : \" 2005-03-20 \" , \n \" expires_at \" : null \n }, \n \" ownership_percentage \" : 100, \n \" title \" : \" CEO \" , \n \" address \" : { \n \" address_line_1 \" : \" 789 Oak St \" , \n \" address_line_2 \" : null, \n \" building_number_1 \" : \" 789 \" , \n \" building_number_2 \" : null, \n \" city \" : \" San Francisco \" , \n \" state \" : \" CA \" , \n \" zip_code \" : \" 94103 \" , \n \" country \" : \" US \"\n } \n } \n ] \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" )
http = Net :: HTTP . new (uri. host , uri. port )
http. use_ssl = uri. scheme == "https"
request = Net :: HTTP :: Post . 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 \" national_entity \" : \" INDIVIDUAL \" , \n \" phone \" : { \n \" country_code \" : \" +1 \" , \n \" number \" : \" 2025551234 \"\n }, \n \" address \" : { \n \" address_line_1 \" : \" 123 Main St \" , \n \" address_line_2 \" : \" Apt 4B \" , \n \" building_number_1 \" : \" 123 \" , \n \" building_number_2 \" : null, \n \" city \" : \" San Francisco \" , \n \" state \" : \" CA \" , \n \" zip_code \" : \" 94102 \" , \n \" country \" : \" US \"\n }, \n \" entity_detail \" : { \n \" individual \" : { \n \" first_name \" : \" John \" , \n \" last_name \" : \" Doe \" , \n \" email \" : \" john@example.com \" , \n \" date_of_birth \" : \" 1990-01-15 \" , \n \" gender \" : \" M \" , \n \" country_of_residence \" : \" US \" , \n \" tax_information \" : [ \n { \n \" country \" : \" US \" , \n \" tax_id \" : \" 123-45-6789 \" , \n \" tax_id_type \" : \" SSN \" , \n \" is_primary \" : true \n } \n ], \n \" document \" : { \n \" document_type \" : \" SSN \" , \n \" document_number \" : \" 123-45-6789 \" , \n \" issuing_country \" : \" US \" , \n \" issued_at \" : \" 2010-01-15 \" , \n \" expires_at \" : \" 2030-01-15 \"\n } \n }, \n \" entity \" : { \n \" name \" : \" Acme Corporation Inc \" , \n \" country \" : \" US \" , \n \" tax_information \" : [ \n { \n \" country \" : \" US \" , \n \" tax_id \" : \" 12-3456789 \" , \n \" tax_id_type \" : \" EIN \" , \n \" is_primary \" : true \n } \n ], \n \" entity_type \" : \" CORPORATION \" , \n \" beneficial_owners \" : [ \n { \n \" first_name \" : \" Jane \" , \n \" last_name \" : \" Smith \" , \n \" email \" : \" jane@acme.com \" , \n \" date_of_birth \" : \" 1985-03-20 \" , \n \" gender \" : \" F \" , \n \" country_of_residence \" : \" US \" , \n \" tax_information \" : [ \n { \n \" country \" : \" US \" , \n \" tax_id \" : \" 987-65-4321 \" , \n \" tax_id_type \" : \" SSN \" , \n \" is_primary \" : true \n } \n ], \n \" document \" : { \n \" document_type \" : \" SSN \" , \n \" document_number \" : \" 987-65-4321 \" , \n \" issuing_country \" : \" US \" , \n \" issued_at \" : \" 2005-03-20 \" , \n \" expires_at \" : null \n }, \n \" ownership_percentage \" : 100, \n \" title \" : \" CEO \" , \n \" address \" : { \n \" address_line_1 \" : \" 789 Oak St \" , \n \" address_line_2 \" : null, \n \" building_number_1 \" : \" 789 \" , \n \" building_number_2 \" : null, \n \" city \" : \" San Francisco \" , \n \" state \" : \" CA \" , \n \" zip_code \" : \" 94103 \" , \n \" country \" : \" US \"\n } \n } \n ] \n } \n } \n }"
response = http. request (request)
puts response. body ⧉