> ## Documentation Index
> Fetch the complete documentation index at: https://developer.moneyone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Initiate Consent

> Start an AA journey and obtain the user redirection URL and transaction ID.

Initiating consent is the first step of the AA flow. You send the user's
identifiers and the products to fetch, and you receive a `webRedirectionUrl`
(where you redirect the user) and a `transaction_id` (which you use for all
subsequent calls).

## Endpoint

```
POST /v3/requestconsent
```

Base URL (UAT / Production): Contact `support@moneyone.in`.

## Headers

| Header           | Description          |
| ---------------- | -------------------- |
| `Content-Type`   | `application/json`   |
| `client_id`      | Your client ID       |
| `client_secret`  | Your client secret   |
| `organisationId` | Your organisation ID |
| `appIdentifier`  | Your app identifier  |

## Request body

```json theme={null}
{
  "vua": "<mobile_number>@onemoney",
  "accountID": "<account_id>",
  "productIDList": ["<product_id_1>", "<product_id_2>"],
  "partyIdentifierValue": "<mobile_number>",
  "partyIdentifierType": "MOBILE",
  "redirectUrl": "<your_redirect_url>",
  "fipID": ["<fip_id_1>", "<fip_id_2>"],
  "pan": "<pan_number>"
}
```

### Parameters

<ParamField body="vua" type="string" required>
  Virtual User Address, e.g. `<mobile_number>@onemoney`.
</ParamField>

<ParamField body="accountID" type="string" required>
  Your account identifier for the user.
</ParamField>

<ParamField body="productIDList" type="array" required>
  List of product IDs to fetch. Provide either `productIDList` or `productID`.
</ParamField>

<ParamField body="productID" type="string" required>
  A single product ID. Provide either `productID` or `productIDList`.
</ParamField>

<ParamField body="partyIdentifierValue" type="string" required>
  The value of the party identifier, e.g. the mobile number.
</ParamField>

<ParamField body="partyIdentifierType" type="string" required>
  The type of party identifier. One of `MOBILE`, `PAN`, `AADHAR`, `EMAIL`, `DOB`, `GSTIN`.
</ParamField>

<ParamField body="redirectUrl" type="string">
  URL the user is redirected back to after completing the journey.
</ParamField>

<ParamField body="fipID" type="array">
  List of FIP IDs to target for data fetch.
</ParamField>

<ParamField body="pan" type="string">
  The user's PAN.
</ParamField>

<ParamField body="transactionID" type="string">
  An optional transaction identifier you supply for the journey.
</ParamField>

<ParamField body="fitype" type="array">
  List of financial information types to request.
</ParamField>

<ParamField body="config" type="object">
  Optional configuration. Supports `fiDataRange` with `from` and `to` timestamps to
  bound the data fetch window.
</ParamField>

### config example

```json theme={null}
{
  "config": {
    "fiDataRange": {
      "from": "2023-01-01T00:00:00.000Z",
      "to": "2024-01-01T00:00:00.000Z"
    }
  }
}
```

## Sample request

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://<base_url>/v3/requestconsent' \
    --header 'Content-Type: application/json' \
    --header 'client_id: <your_client_id>' \
    --header 'client_secret: <your_client_secret>' \
    --header 'organisationId: <your_organisation_id>' \
    --header 'appIdentifier: <your_app_identifier>' \
    --data '{
      "vua": "<mobile_number>@onemoney",
      "accountID": "<account_id>",
      "productIDList": ["<product_id_1>", "<product_id_2>"],
      "partyIdentifierValue": "<mobile_number>",
      "partyIdentifierType": "MOBILE",
      "redirectUrl": "<your_redirect_url>",
      "fipID": ["<fip_id_1>", "<fip_id_2>"],
      "pan": "<pan_number>"
    }'
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "ver": "1.21.0",
  "status": "success",
  "data": {
    "webRedirectionUrl": "<web_redirection_url>",
    "transaction_id": "<transaction_id>"
  },
  "message": "Success"
}
```

<Note>
  Store the `transaction_id` — you will need it for status tracking and data fetch.
  The `webRedirectionUrl` carries a time-bound `access_token`; do not modify it.
</Note>

## Error Codes

| HTTP Status                 | Condition                                                                                                  |
| --------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `400 Bad Request`           | Required fields are missing or have an invalid format (e.g. missing `vua`, invalid `partyIdentifierType`). |
| `401 Unauthorized`          | Credentials are missing or invalid in the `Authorization` header.                                          |
| `500 Internal Server Error` | An unexpected server-side error occurred.                                                                  |

## Next step

Redirect the user to the `webRedirectionUrl`. See [User Redirection](./user-redirection).
