CWB Webhook
This page contains samples as well as details about the CWB webhook object.
* Check out the Webhooks page to get instructions on how to set your webhook.
The CWB Webhook Object
This is the object (JSON) you will receive when you set up your webhook and someone fills out your form. It consists of the webhook event
,
apiVersion
,
and the data object
. The data object
contains the entry's (the form filler's) response, as well as reports generated by vForm on the response if required.
The Webhook Attributes
This section contains object samples for all possible webhook events, as well as explanations for each in the Explanation tab.
{
"event": "vForm.added",
"apiVersion": "v1",
"data": {...}
}
The Data Object
This object is made up of attributes that provide general information about the form entry. It also contains the field array
, which consists of response objects for each section of the form.
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes.
{
...
"data": {
"accessId": null,
"ipAddress": null,
"completedVerifications": 9,
"status": "not_cleared",
"billingItemComponents": [
"vform",
"aml",
"facial_compare",
"drivers_license",
"id_capture",
"facial_compare",
"passport",
"id_capture",
"facial_compare",
"drivers_license",
"facial_compare",
"inec",
"company_search",
"company_search"
],
"transactionDetails": {
"transactionReference": "63c9c46bb48f6ae9d46bc2f6",
"transactionId": "63c9c46bb48f6a667b6bc2f7",
"amountCharged": 1480,
"currency": "NGN",
"availableBalance": 463050,
"availableCredit": 0
},
"upsertFrequency": 0,
"_id": "63c9c46b25efdd314e1bf823",
"businessId": "6222a5ed3e7a41c29c031ecc",
"userId": "62346b6b283d48fb58b57e8e",
"templateId": "63c967d725efdd42541bf668",
"sharedId": null,
"field":[{..},{...},....],
"totalVerifications": 9,
"fillDurationInMilliSeconds": 287278,
"createdAt": "2023-01-19T22:30:03.521Z",
"updatedAt": "2023-01-19T22:31:48.907Z",
"__v": 0,
"_createdAt": "2023-01-19T22:30:033+00:00",
"_lastModifiedAt": "2023-01-30T18:20:1111+00:00",
"id": "63c9c46b25efdd314e1bf823"
}
The Fields Array
List of objects for each section of the form that contains responses from the person filling out the form and can contain a report on the responses after CWB performs verifications and validations on them as specified by the form owner.
Each section can be one of the following specified by the __type attribute in each objects. personal-information
,
identity
,
company-search
,
address
,
file-upload
,
reference
,
supplementary-field
,
consent-verification
.
{
...
"data":{
...
"field":[
{
...
"__type":"consent-verification",
},
{
...
"__type":"personal-information",
},
{
...
"__type":"identity",
},
{
...
"__type":"company-search",
},
{
...
"__type":"file-upload",
},
{
...
"__type":"address",
},
{
...
"__type":"reference",
},
{
...
"__type":"supplementary-field",
},
],
}
Consent verification field object
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes in the consent-verification
field object.
{
...
"field":[
{
"value": true,
"validated": true,
"__type": "consent-verification",
"_id": "63c9c46b25efddb7491bf825",
"label": "Request Verification Consent",
"fieldTemplateId": "63c967d725efdd359a1bf663",
"id": "63c9c46b25efddb7491bf825"
},
...
]
...
}
Personal Information field object
This object stores the user's personal information; there may be one or more personal information fields, any of which can also be linked to identity
or address
fields by the form owner to serve as the default personal information for performing validations.
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes in the personal-information
field object.
{
...
"field":[
...
{
"middleName": "Yin",
"email": "[email protected]",
"dateOfBirth": "2023-01-01T00:00:00.000Z",
"gender": "MALE",
"mobile": "+38781237458549",
"photo": "https://cdn.youverify.co/1674167402807-VlZyzrQ6CB85EMb01s58Z.jpg",
"relationship": "wife",
"validated": true,
"__type": "personal-information",
"_id": "63c9c46b25efddb6391bf826",
"label": "User Information Field Label",
"fieldTemplateId": "63c967d725efdd78b21bf662",
"firstName": "John",
"lastName": "Doe",
"amlCheck": {
"report": {
"status": "cleared",
"parentId": null,
"isSubjectConsent": true,
"middleName": "TEST",
"pepList": [],
"sanctionList": [],
"firstName": "John",
"lastName": "Doe",
"businessId": "6222fac719fab43e133f0d44",
"requestedAt": "2023-01-19T22:30:07.324Z",
"requestedById": "6222fac719fab4c11a3f0d40",
"createdAt": "2023-01-19T22:30:07.336Z",
"lastModifiedAt": "2023-01-19T22:30:07.336Z",
"_createdAt": "2023-01-19T22:30:077+00:00",
"_lastModifiedAt": "2023-01-19T22:30:077+00:00",
"id": "63c9c46dd80a7bfb6e9f1560",
"requestedBy": {
"firstName": "API",
"lastName": "User",
"middleName": "",
"id": "6222fac719fab4c11a3f0d40"
}
},
"status": "cleared",
"_id": "63d80a5b74738c257c3e4bfd"
},
"id": "63c9c46b25efddb6391bf826"
},
...
]
...
}
Identity field object
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes in the identity
field object.
{
...
"field":[
...
{
"typeCountryCode": "NG",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "2023-01-01T00:00:00.000Z",
"photo": "https://cdn.youverify.co/1674167402807-VlZyzrQ6CB85EMb01s58Z.jpg",
"identityCardPhotoFront": "",
"identityCardPhotoBack": "",
"livenessCheckSnapshot": null,
"status": "found",
"report": {
"id": "63c9c46fdd95fcd7fc3c7f69",
"validations": {
"data": {
"lastName": {
"validated": false,
"value": "Doe"
},
"dateOfBirth": {
"validated": false,
"value": "2023-01-01"
},
"firstName": {
"validated": false,
"value": "John"
}
},
"selfie": {
"selfieVerification": {
"confidenceLevel": 25,
"threshold": 80,
"match": false,
"image": "https://cdn.youverify.co/1674167402807-VlZyzrQ6CB85EMb01s58Z.jpg"
}
},
"validationMessages": "First name does not match, Last name does not match, Date of birth does not match, Provided image does not match ID image"
},
"parentId": null,
"status": "found",
"reason": null,
"dataValidation": true,
"selfieValidation": true,
"firstName": "John",
"middleName": null,
"lastName": "Doe",
"expiredDate": "2024-04-25",
"issuedDate": "2019-04-29",
"stateOfIssuance": "LAGOS",
"notifyWhenIdExpire": false,
"image": "data:image/jpg;base64,/9j/4AAQSkZJRgABAQEBOgE6AAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI",
"mobile": null,
"email": null,
"dateOfBirth": "1981-04-25",
"isConsent": true,
"idNumber": "KJA08031BA51",
"businessId": "6222fac719fab43e133f0d44",
"type": "ndl",
"allValidationPassed": false,
"gender": "male",
"requestedAt": "2023-01-19T22:30:08.539Z",
"requestedById": "6222fac719fab4c11a3f0d40",
"country": "NG",
"createdAt": "2023-01-19T22:30:08.552Z",
"lastModifiedAt": "2023-01-19T22:30:08.552Z",
"requestedBy": {
"firstName": "API",
"lastName": "User",
"middleName": "",
"id": "6222fac719fab4c11a3f0d40"
}
},
"validated": false,
"__type": "identity",
"_id": "63c9c46b25efdd64831bf829",
"label": "Identity Field Label",
"fieldTemplateId": "63c9c1bfeb600fc087807329",
"type": "drivers-license",
"value": "Kja08067aa01",
"id": "63c9c46b25efdd64831bf829"
},
...
]
...
}
Business Search field object
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes in the company-search
field object.
{
...
"field":[
...
{
"companyName": null,
"registeredName": null,
"companyAddress": null,
"supportEmail": null,
"supportPhoneNumber": null,
"countryCode": "NG",
"status": "found",
"report": {
"parentId": null,
"searchBusinessName": null,
"name": "THINK HAT SERVICES LIMITED",
"formerName": null,
"registrationNumber": "RC1733970",
"registryNumber": "1733970",
"vatNumber": "23739807-0001",
"registrationDate": "2020-11-12T00:00:00.000+00:00",
"registrationSubmissionDate": "2020-11-04T14:57:00.210+00:00",
"dateDisolved": null,
"tin": "23739807-0001",
"jtbTin": null,
"taxOffice": null,
"email": "[email protected]",
"phone": null,
"websiteEmail": null,
"typeOfEntity": "PRIVATE COMPANY LIMITED BY SHARES",
"activity": "GENERAL CONTRACT AND MERCHANDISE",
"address": "NO. 220, FREEDOM WAY, LEKKI PHASE 1, ",
"state": "LAGOS",
"lga": "Lagos Island",
"city": "LEKKI",
"branchAddress": "NO. 220, FREEDOM WAY, LEKKI PHASE 1, , LEKKI, LAGOS STATE ",
"headOfficeAddress": null,
"objectives": null,
"status": "found",
"companyStatus": "INACTIVE",
"isConsent": true,
"lastUpdatedAt": "2022-10-07T14:27:18.767+00:00",
"shareCapitalInWords": "ONE MILLION NAIRA",
"paidShareCapital": "1000000",
"subscribedShareCapital": "1000000",
"sharesValue": "1 NGN",
"activityDescription": "GENERAL CONTRACT AND MERCHANDISE",
"sharesIssued": "1000000",
"parentCountry": null,
"companyContactPersons": [
{
"contacts": {
"email": ["[email protected]"],
"phone": ["08030810838"]
},
"name": "Sokari Blessing Boma "
}
],
"country": "Nigeria",
"countryCode": "NG",
"keyPersonnel": [
{
"name": "Sokari Blessing Boma",
"designation": "PRESENTER",
"isCorporate": false,
"appointedOn": null,
"resignedOn": null,
"sharesType": null,
"sharesValue": null,
"sharesCount": null,
"occupation": null,
"nationality": null,
"birthYear": null,
"birthMonth": null,
"birthDate": null,
"dateOfBirth": "1990-08-29T23:00:00.000+00:00",
"gender": "MALE",
"address": null,
"countryOfResidence": "NIGERIA",
"number": null,
"isForeign": "false",
"documentType": "National Identification Number",
"documentIssuedOn": null,
"documentIssuedBy": null,
"documentNumber": null,
"email": "[email protected]",
"phone": "08030810838",
"status": "ACTIVE",
"companies": []
},
],
"activities": [],
"legalEntityIdentifierRegister": [],
"centralIndexKeyRegister": [],
"filings": [],
"affiliates": [],
"businessId": "6222fac719fab43e133f0d44",
"type": "advance_company_check",
"requestedAt": "2023-01-19T22:30:12.862Z",
"requestedById": "6222fac719fab4c11a3f0d40",
"searchTerm": "RC1733970",
"createdAt": "2023-01-19T22:30:12.978Z",
"lastModifiedAt": "2023-01-19T22:30:12.978Z",
"_createdAt": "2023-01-19T22:30:1212+00:00",
"_lastModifiedAt": "2023-01-19T22:30:1212+00:00",
"id": "63c9c46f7eb0a0dff6186872",
"requestedBy": {
"firstName": "API",
"lastName": "User",
"middleName": "",
"id": "6222fac719fab4c11a3f0d40"
}
},
"validated": true,
"__type": "company-search",
"_id": "63c9c46b25efdd34851bf82b",
"label": "Business Search",
"fieldTemplateId": "63c9b83feb600f5ea88072ab",
"type": "registrationNumber",
"value": "RC1733970",
"id": "63c9c46b25efdd34851bf82b"
},
...
]
...
}
File Upload field object
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes in the file-upload
field object.
{
...
"field":[
...
{
"name": "1674127188116",
"size": 7028,
"status": "completed",
"validated": true,
"__type": "file-upload",
"_id": "63c9c46b25efdd8ca01bf82d",
"label": "File Upload Field Label",
"fieldTemplateId": "63c9bb3aeb600f3a9b8072d4",
"url": "https://cdn.youverify.co/1674167402808-PgGVBkErMmR9ihSmIFTcR.jpg",
"fileType": "jpg",
"id": "63c9c46b25efdd8ca01bf82d"
},
...
]
...
}
Supplementary field object
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes in the supplementary-field
field object.
{
...
"field":[
...
{
"value": ["Omah Lay"],
"options": [],
"status": "completed",
"validated": true,
"__type": "supplementary-field",
"_id": "63c9c46b25efdd41b21bf82e",
"label": "What's your name",
"fieldTemplateId": "63c9bcb1e05ace51e6f8cbba",
"type": "text",
"format": "short",
"id": "63c9c46b25efdd41b21bf82e"
},
{
"value": ["Option 2"],
"options": ["Option 1", "Option 2", "Option 3"],
"status": "completed",
"validated": true,
"__type": "supplementary-field",
"_id": "63c9c46b25efdd92a91bf82f",
"label": "pick one",
"fieldTemplateId": "63c9bd3ce05ace819ff8cbd0",
"type": "radio",
"format": "short",
"id": "63c9c46b25efdd92a91bf82f"
},
{
"value": ["Option 1"],
"options": ["Option 1", "Option 2", "Option 3"],
"status": "completed",
"validated": true,
"__type": "supplementary-field",
"_id": "63c9c46b25efdde77c1bf830",
"label": "pick one",
"fieldTemplateId": "63c9bd460b8e960d56652d85",
"type": "dropdown",
"format": "short",
"id": "63c9c46b25efdde77c1bf830"
},
{
"value": ["Option 3"],
"options": ["Option 1", "Option 2", "Option 3"],
"status": "completed",
"validated": true,
"__type": "supplementary-field",
"_id": "63c9c46b25efdd67821bf831",
"label": "pick one or more",
"fieldTemplateId": "63c9bd4f25efdd5ce11bf7ca",
"type": "dropdown",
"format": "short",
"id": "63c9c46b25efdd67821bf831"
},
{
"value": ["2023-01-23"],
"options": ["Option 1", "Option 2", "Option 3"],
"status": "completed",
"validated": true,
"__type": "supplementary-field",
"_id": "63c9c46b25efdd1f261bf832",
"label": "Date of Birth",
"fieldTemplateId": "63c9bd59e05ace78fdf8cbd7",
"type": "date",
"format": "short",
"id": "63c9c46b25efdd1f261bf832"
},
{
"value": [
"Itβs difficult to say without more information about what the code is supposed to do and whatβs happening when itβs executed. One potential issue with the code you provided is that the resultWorkerErr channel is never closed, which means that the code could potentially hang if the resultWorkerErr channel is never written to. This could happen if b.resultWorker never returns an error or if itβs canceled before it has a chance to return an error.\n\nTo fix this issue, you could close the resultWorkerErr channel after writing to it. For example, you could add the following line of code after the line that sends the error on the channel:"
],
"options": ["Option 1", "Option 2", "Option 3"],
"status": "completed",
"validated": true,
"__type": "supplementary-field",
"_id": "63c9c46b25efdd82021bf833",
"label": "Explain yourself",
"fieldTemplateId": "63c9bd650b8e9643b2652d8c",
"type": "text",
"format": "long",
"id": "63c9c46b25efdd82021bf833"
},
...
]
...
}
Reference field object
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes in the reference
field object.
{
...
"field":[
...
{
"firstName": "John",
"lastName": "Doe",
"status": "cleared",
"fields": [{...},{...},...],
"validated": true,
"__type": "reference",
"_id": "63c9c46b25efdd1b621bf835",
"label": "Reference Field Label",
"fieldTemplateId": "63c9c2d30b8e962a52652de1",
"referenceTemplateId": "63c9bfdb0b8e96183b652da5",
"email": "[email protected]",
"id": "63c9c46b25efdd1b621bf835"
}
...
]
...
}
Address field object
The Sample
and Explanation tabs below show a sample object as well as explanations for the attributes in the address
field object.
{
...
"field":[
...
{
"candidate": {
"middleName": null,
"dateOfBirth": null,
"email": null,
"firstName": "John",
"lastName": "Doe",
"mobile": "34556666654",
"image": "https://cdn.youverify.co/1659017656259-I87Q6mTD0qJ1pTJyCoz5j.png"
},
"guarantor": {
"firstName": null,
"lastName": null,
"email": null,
"mobile": null,
"image": null
},
"business": {
"name": null,
"registrationNumber": null,
"email": null,
"mobile": null
},
"address": {
"flatNumber": "",
"buildingName": "Sum House",
"subStreet": "",
"lga": "Yaba-Alagomeji",
"country": "NG",
"buildingNumber": "350",
"landmark": " Bukka House",
"street": "Bornu Way",
"city": "Lagos-Mainland",
"state": "Lagos"
},
"status": "not_applicable",
"taskStatus": "NOT_APPLICABLE",
"description": "To enter the estate, a security pin is required.",
"report": null,
"validated": true,
"__type": "address",
"_id": "62e299b98fbe590c099b43c2",
"label": "Address",
"fieldTemplateId": "62e282388fbe5975b39b423a",
"type": "individual",
"id": "62e299b98fbe590c099b43c2"
}
...
]
...
}
Last updated
Was this helpful?