Get Purpose
Use below api to get list of purpose. to use in the form creation api.
API Endpoint
Endpoint URL: GET https://api.staging.trential.app/verification/api/1.0/purposes
Response
If the candidate is valid, the response will be as follows:
{
  "code": 0,
  "message": "Success",
  "data": {
    "total": 4,
    "list": [
      {
        "_id": "657ab9ba7c8741f1f8bc3376",
        "name": "BGV",
        "createdAt": "2023-12-14T08:15:54.654Z",
        "updatedAt": "2023-12-14T08:15:54.654Z"
      },
      {
        "_id": "65a04aacf8016bfc639b5618",
        "name": "Compliance",
        "createdAt": "2023-12-14T08:15:54.654Z",
        "updatedAt": "2023-12-14T08:15:54.654Z"
      },
      {
        "_id": "65a04ab8f8016bfc639b5678",
        "name": "Availing Service",
        "createdAt": "2023-12-14T08:15:54.654Z",
        "updatedAt": "2023-12-14T08:15:54.654Z"
      },
      {
        "_id": "657ab9ac7c8741f1f8bc3372",
        "name": "KYC",
        "createdAt": "2023-12-14T08:15:40.349Z",
        "updatedAt": "2023-12-14T08:15:40.349Z"
      }
    ]
  }
}
Success Response
- code (integer): Status code indicating the result of the request. 0indicates success.
- message (string): Description of the result. Successindicates the candidate was successfully added.
- data (object): Contains list of all purpose
Below is the error resposne
{
    "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. -1indicates a failure due to invalid candidate data.