const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: 'Customer:019542f5-b3e7-1d02-0000-000000000001',
roles: ['UBO', 'DIRECTOR'],
ownershipPercentage: 51,
personalInfo: {
firstName: 'Jane',
lastName: 'Smith',
birthDate: '1978-06-15',
nationality: 'US',
address: {
line1: '123 Main Street',
postalCode: '94105',
country: 'US',
line2: 'Apt 4B',
city: 'San Francisco',
state: 'CA'
},
idType: 'SSN',
identifier: '123-45-6789',
middleName: 'Marie',
email: 'jane.smith@acmecorp.com',
phoneNumber: '+14155550192',
countryOfIssuance: 'US'
}
})
};
fetch('https://api.lightspark.com/grid/2025-10-13/beneficial-owners', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));