Create Form
The following documentation details the process for integrating with the Add Candidate API, which is used to add candidates as per the form created on the portal.
API Endpoint
Endpoint URL: POST
https://api.trential.dev/verification/api/1.0/ekyc-forms
Request
To create a form, send a POST request with the following JSON payload:
{
"name": "Demo form 2", // The name of the form
"purpose": "657ab9ba7c8741f1f8bc3376", // The unique ID for the purpose of the form.(use get purpose api)
"expiry": 1717093800, // The expiration time of form as a Unix timestamp
"verifications": [ // List of verification checks included in the form
{
"name": "bgv-employment", // Employment background verification
"skipAllowed": true // User can skip this verification
},
{
"name": "bgv-twelfth", // Twelfth-grade verification
"skipAllowed": true // User can skip this verification
},
{
"name": "bgv-degree", // Degree verification
"skipAllowed": true // User can skip this verification
}
],
"userPaymentRequired": false, // If want payment from user make it true other wise false
"type": "diy", // The form type is DIY
"sharing": {
"visibility": "public" // The form is publicly visible. For private form use private
}
}
Parameters
- name (string):The name of the form(Required)
- purpose (ID): The unique ID for the purpose of the form.(use get purpose api)(Required)
- expiry (Number): The expiration time of form as a Unix timestamp(optional)
- verifications (Array): List of verification want in the form(Required)
- name (string): The name of verification, accepted values:-
- bgv-tenth (10th education check)
- bgv-twelfth (12th education check)
- bgv-degree (Any degree/marsheet check)
- bgv-employment (Employment check)
- bgv-criminal
- bgv-cibil
- bgv-local-address-digital
- bgv-local-address-postal
- bgv-permanent-address-digital
- bgv-permanent-address-postal
- bgv-global-database-check
- bgv-social-media
- bgv-degree-with-marksheet
- bgv-professional-reference-check
- bgv-police-verification
- pan
- gst
- bank-account
- upi
- cin
- din
- voter-id
- employment-check
- face-match
- aadhaar
- dl
- liveness
- passport
- form26as
- skipAllowed (boolean): // User can skip this verification(Required)
- name (string): The name of verification, accepted values:-
- userPaymentRequired (string): If want payment from user make it true other wise false(Required)
- type (string): TThe form type is DIY, accepted values:- (Required)
- diy
- sharing.visibility (string): The form is publicly visible, accepted values:- (Required)
- public
- private
Response
If the candidate is valid, the response will be as follows:
{
"code": 0,
"message": "Success",
"data": {
"_id": "664dc505f7675bad1a822371",
"name": "Demo form 2",
"purpose": "657ab9ba7c8741f1f8bc3376",
"expiry": 1717093800,
"verificationList": [
{
"name": "bgv-degree",
"mode": "manual",
"skipAllowed": true,
"marksheetRequired": false
},
{
"name": "bgv-employment",
"mode": "manual",
"skipAllowed": true,
},
{
"name": "bgv-twelfth",
"mode": "manual",
"skipAllowed": true,
}
],
"sharing": {
"mode": []
},
"archived": false,
"type": "diy",
"userPaymentRequired": false,
"createdAt": "2024-05-22T10:12:21.702Z",
"updatedAt": "2024-05-22T10:12:21.702Z"
}
}
Success Response
- code (integer): Status code indicating the result of the request.
0
indicates success. - message (string): Description of the result.
Success
indicates the candidate was successfully added. - data (object): Contains additional data related to the request.
- _id (string): A unique identifier for the form, used during candidate add and init verification.
If the form req is invalid, the response will be as follows:
{
"message": "Error message",
"code": -1
}
Error Response
- message (string): Description of the error(s) encountered. This field provides detailed information about the specific validation issues.
- code (integer): Status code indicating the result of the request.
-1
indicates a failure due to invalid candidate data.