Skip to main content

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

Try it out

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)
    1. name (string): The name of verification, accepted values:-
      1. bgv-tenth (10th education check)
      2. bgv-twelfth (12th education check)
      3. bgv-degree (Any degree/marsheet check)
      4. bgv-employment (Employment check)
      5. bgv-criminal
      6. bgv-cibil
      7. bgv-local-address-digital
      8. bgv-local-address-postal
      9. bgv-permanent-address-digital
      10. bgv-permanent-address-postal
      11. bgv-global-database-check
      12. bgv-social-media
      13. bgv-degree-with-marksheet
      14. bgv-professional-reference-check
      15. bgv-police-verification
      16. pan
      17. gst
      18. bank-account
      19. upi
      20. cin
      21. din
      22. voter-id
      23. employment-check
      24. face-match
      25. aadhaar
      26. dl
      27. liveness
      28. passport
      29. form26as
    2. skipAllowed (boolean): // User can skip this verification(Required)
  • userPaymentRequired (string): If want payment from user make it true other wise false(Required)
  • type (string): TThe form type is DIY, accepted values:- (Required)
    1. diy
  • sharing.visibility (string): The form is publicly visible, accepted values:- (Required)
    1. public
    2. 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.