Create Consent API

Call this API to create a consent request. The details of the request will be presented to your customer on Setu’s screens, as part of the next step.

Request

{
    "ver": "2.1.0",
    "timestamp": "2024-03-08T08:42:38.386Z",
    "txnid": "4a4adbbe-29ae-11e8-a8d7-0289437bf331",
    "ConsentDetail": {
        "consentStart": "2024-03-08T08:42:38.386Z",
        "consentExpiry": "2024-06-13T13:12:04.647Z",
        "consentMode": "STORE",
        "fetchType": "PERIODIC",
        "consentTypes": ["PROFILE", "SUMMARY", "TRANSACTIONS"],
        "fiTypes": ["EQUITIES", "MUTUAL_FUNDS", "ETF"],
        "DataConsumer": {
            "id": "setu-fiu-id",
            "type": "FIU"
        },
        "Customer": {
            "id": "9508811126@setu",
            "Identifiers": [
                {
                    "type": "MOBILE",
                    "value": "9508811126"
                }
            ]
        },
        "Purpose": {
            "code": "101",
            "refUri": "https://api.rebit.org.in/aa/purpose/101.xml",
            "text": "Wealth management service",
            "Category": {
                "type": "string"
            }
        },
        "FIDataRange": {
            "from": "2022-06-06T11:39:57.153Z",
            "to": "2022-12-06T11:39:57.153Z"
        },
        "DataLife": {
            "unit": "MONTH",
            "value": 1
        },
        "Frequency": {
            "unit": "HOUR",
            "value": 4
        },
        "DataFilter": [
            {
                "type": "TRANSACTIONAMOUNT",
                "operator": ">=",
                "value": "1000"
            }
        ]
    }
}

Response

{
    "ver": "2.1.0",
    "txnid": "4a4adbbe-29ae-11e8-a8d7-0289437bf331",
    "timestamp": "2024-03-08T08:41:45.773Z",
    "Customer": {
        "id": "9508811126@setu"
    },
    "ConsentHandle": "542193a9-f2b4-483c-be29-5f34b35838b8"
}