---
title: Credit Analytics - Consent Flow Encrypt Data
slug: api-marketplace/credit-analytics-consent-flow-encrypt-data
createdAt: 2023-12-08T06:16:39.746Z
---

### Introduction

This API is for giving demo only on our api specs portal for Credit Analytics - consent flow. Client should integrate encryption/decryption code in their application, all the required details will be shared on onboarding client with consent flow.

### Authorization

- **Authorization Token**: Users require an authorization token generated by Signzy to use this API. Please contact help\@signzy.com for acquiring this token.

### Conclusion

In summary, the Initiate Initiate Credit Analytics - Consent API simplifies the initiation of Customer Consent for Credit Analytics by providing a unique Consent Link. It streamlines the process of customer verification and ensures the secure transmission of Credit Analytics to the user's provided callback URL.




## Sample Curl:

:::CodeblockTabs
preproduction

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/test-encrypt-data' \
--header 'Authorization: <auth-token>' \
--header 'Content-Type: application/json' \
--data '{
    "phoneNumber": "",
    "firstName": "",
    "lastName":"",
    "dateOfBirth": "1986-06-03",
    "panNumber": "",
    "gender": "",
    "address": "",
    "pincode": "",
    "callbackUrl":"",
    "productName":["equifax"],
    "otpBypass":true,
    "redirectUrl": "https://www.google.com/"
}'
```

Production

```curl
curl --location 'https://api.signzy.app/api/v3/test-encrypt-data' \
--header 'Authorization: <auth-token>' \
--header 'Content-Type: application/json' \
--data '{
    "phoneNumber": "",
    "firstName": "",
    "lastName":"",
    "dateOfBirth": "1986-06-03",
    "panNumber": "",
    "gender": "",
    "address": "",
    "pincode": "",
    "callbackUrl":"",
    "productName":["equifax"],
    "otpBypass":true,
    "redirectUrl": "https://www.google.com/"
}'
```
:::

## Input Parameters:

| Parameter      | Type   | Mandatory/Optional                        | Description                                                                 |
| -------------- | ------ | ----------------------------------------- | --------------------------------------------------------------------------- |
| requestId      | String | Mandatory                                 | uuid generated from client's end                                            |
| phoneNumber    | String | Mandatory                                 | The phone number of the individual for whom the Bureau report is requested. |
| panNumber      | String | Mandatory.<br />Optional for cibil bureau | The PAN (Permanent Account Number) of the individual.                       |
| passport       | String | Optional                                  | passport Id                                                                 |
| voterId        | String | Optional                                  | Voter Id                                                                    |
| driversLicense | String | Optional                                  | Drivers License Number                                                      |
| firstName      | String | Mandatory                                 | The First Name of the individual.                                           |
| lastName       | String | Mandatory                                 | The Last Name of the individual                                             |
| gender         | String | Mandatory                                 | gender Male/Female/Transgender                                              |
| dateOfBirth    | String | Mandatory                                 | Date of Birth of the user<br />yyyy-mm-dd                                   |
| address        | String | Mandatory                                 | Address of the user                                                         |
| pincode        | String | Mandatory                                 | pincode of the user                                                         |
| productName    | Array  | Mandatory                                 | Bureau name list - cibil, equifax, experian, crif                           |
| redirectUrl    | String | Optional                                  | Redirect page url                                                           |
| callbackUrl    | String | Mandatory                                 | Callback url where report will be posted                                    |

### Sample Status Codes And Messages

:::CodeblockTabs
200 OK

```json
{
    "encryptedData": "",
    "decryptedData": {
        "requestId": "3f3ba981-ac93-44b7-ad13-9e05a1a0d7dc",
        "phoneNumber": "",
        "firstName": "",
        "lastName": "",
        "dateOfBirth": "1986-06-03",
        "panNumber": "",
        "gender": "Male",
        "address": "",
        "pincode": "641045",
        "callbackUrl": "",
        "productName": [
            "equifax"
        ],
        "otpBypass": true,
        "redirectUrl": "https://www.google.com/"
    }
}
```

409

```json
{
    "error": {
        "name": "error",
        "message": "Error in getting data from Upstream",
        "status": 409,
        "reason": "Error",
        "type": "Conflict",
        "statusCode": 409
    }
}
```

400

```json
{
    "error": {
        "reason": "VALIDATION_ERROR",
        "status": 400,
        "message": "Encrypted string is invalid",
        "type": "Bad Request",
        "statusCode": 400,
        "name": "error"
    }
}

1. Datatype validation issues errors, eg: "\"requestData\" must be a string"
2. Missing required parameters, eg: "\"requestData\" is required"
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

500

```json
{
    "error": {
        "name": "error",
        "message": "Internal Server Error",
        "status": 500,
        "reason": "ERROR",
        "type": "Internal Server Error",
        "statusCode": 500
    }
}
```
:::

