Use this API call to generate KYC forms for unregulated trusts.
const apiEndpoint = 'https://dev.bronid.com/idform';
// request body
const kycData = {
"metadata_serviceUid": "XL7ULiU6B4QE9Y2iWFZnhtMDKFN2",
"metadata_secretKey": "api_sec_NJAtNcRtUrPlf7xYDrMNP9URI-ZfN314",
"metadata_version": "4",
"metadata_userId": "yourUniqueUserId",
"bronLink_dataAccessType": "idForm",
"type": "unRegulatedTrust",
"fields": {
"country": "AUS",
"name": "Pass My Trust",
"unRegulatedTrustType": "unitTrust",
"abn": "16123456789",
"registeredOffice": "125 York Street, SYDNEY NSW 2000",
"uploadTrustDeed": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
},
"stakeholders": [
{
"type": "individual",
"role": "beneficiaries",
"fields": {
"country": "AUS",
"firstName": "Jane",
"middleName": "ok",
"lastName": "Citizen",
"gender": "female",
"dateOfBirth": "11/10/1980",
"address": "125 York st",
"email": "email@gmail.com",
"medicareCardColour": "green",
"medicareCardNumber": 2428778132,
"medicareIndividualReferenceNumber": 1,
"medicareNameOnCard": "Jane Citizen",
"medicareExpiryDate": "12/2030",
"medicareImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
}
},
{
"type": "individual",
"role": "settlors",
"fields": {
"country": "AUS",
"firstName": "Dave",
"middleName": "ok",
"lastName": "Citizen",
"gender": "male",
"dateOfBirth": "20/10/1980",
"address": "125 Pitt st",
"email": "email@gmail.com",
"driversLicenceNumber": "11111111",
"driversLicenceCardNumber": "1234567890",
"driversLicenceState": "NSW",
"driversLicenceImageFront": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"driversLicenceImageBack": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"passportNumber": "A1111111",
"passportCountryOfIssue": "AUS",
"passportImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
}
},
{
"type": "privateCompany",
"role": "trustee",
"fields": {
"country": "AUS",
"abn": "16123456789",
"acn": "123456789",
"name": "Pass my stakeholder",
"registeredOffice": "125 York Street, SYDNEY NSW 2000",
"principalPlaceOfBusiness": "250 York Street, SYDNEY NSW 2000",
"companyExtract": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
}
}
]
};
console.log('Running request...')
// submit the KYC data to the bronID API
try {
const response = await fetch(apiEndpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(kycData),
});
if (!response.ok) {
const errorData = await response.json();
console.log('error! click the results to expand them');
console.log(JSON.stringify(errorData, null, 2));
} else {
const bronIdResult = await response.json();
const printResult = 'bronId API response: ' + JSON.stringify(bronIdResult, null, 2);
console.log(printResult);
}
} catch (error) {
console.log('Fetch error: ', error);
}
// Click “▶ run” to try this code live and run your first KYC.