> ## 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.

# PDF Analytics Excel

> Compute analytics from PDF bank statements and return a downloadable Excel report.

Runs the analytics journey over one or more PDF bank statements you reference by URL and
returns a pre-signed S3 URL to a generated Excel report.

Like [PDF Analytics JSON](./pdf-analytics-json), this is a **two-step** flow — only the
`journey_id` changes to the Excel variant, and Step 2 returns a report URL instead of inline
insights (same shape as [Analytics Excel](./analytics-excel)).

<Steps>
  <Step title="Execute the journey">
    Call `POST /ie/transaction/journey/execute` with the bank-statement URLs. The response
    `data` is always **empty** at this stage — capture the `transaction_id` and
    `journey_transaction_id` it returns.
  </Step>

  <Step title="Fetch the data">
    Call `POST /ie/transaction/journey/data/fetch` with that `transaction_id` and
    `journey_transaction_id` to retrieve the Excel report URL.
  </Step>
</Steps>

### Headers

Both calls use the same headers:

| Header          | Description                               |
| --------------- | ----------------------------------------- |
| `Content-Type`  | `application/json`                        |
| `Authorization` | `Basic <base64(client_id:client_secret)>` |

<Note>
  The `Authorization` value, `journey_id`, and `exchange_application_id` are provided by
  Moneyone during onboarding.
</Note>

## Step 1 — Execute the journey

Set `journey_id` to the value provided by Moneyone for this variant, and pass each bank-statement URL under
`input_data.bank_statement_data`.

<CodeGroup>
  ```bash cURL theme={null}
  curl --location --request POST 'https://equal-gms-uat.moneyone.in/ie/transaction/journey/execute' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Basic <base64(client_id:client_secret)>' \
    --data-raw '{
      "journey_id": "<journey_id>",
      "exchange_application_id": "gateway.equal.f20fec65-f5ef-4b33-b5eb-3cf79b701355",
      "input_data": {
        "bank_statement_data": [
          {
            "bank_statement_url": "<bank_statement_url>"
          }
        ]
      }
    }'
  ```
</CodeGroup>

| Field                                                 | Description                                                                   |
| ----------------------------------------------------- | ----------------------------------------------------------------------------- |
| `journey_id`                                          | Provided by Moneyone for this variant.                                        |
| `exchange_application_id`                             | Your exchange application ID provided by Moneyone.                            |
| `input_data.bank_statement_data[].bank_statement_url` | URL to a PDF bank statement. Add more objects to analyze multiple statements. |

### Response

The `data` object is **empty** here. Store the `transaction_id` and `journey_transaction_id`
for Step 2.

```json theme={null}
{
  "status": "SUCCESS",
  "message": "Success",
  "status_code": "success",
  "transaction_id": "80107cd7-e077-4d8d-a4d7-02f3ede2f9fd",
  "journey_transaction_id": "EQ.GT.533b16b6-0a95-4d86-8585-09f51d1d9773#<journey_id>#98df5278c6e1467684c3ca67b93b796d",
  "journey_id": "<journey_id>",
  "data": {}
}
```

## Step 2 — Fetch the data

Pass the `transaction_id` and `journey_transaction_id` returned by Step 1.

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://equal-gms-uat.moneyone.in/ie/transaction/journey/data/fetch' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Basic <base64(client_id:client_secret)>' \
    --data '{
      "transaction_id": "80107cd7-e077-4d8d-a4d7-02f3ede2f9fd",
      "journey_transaction_id": "EQ.GT.533b16b6-0a95-4d86-8585-09f51d1d9773#<journey_id>#98df5278c6e1467684c3ca67b93b796d"
    }'
  ```
</CodeGroup>

| Field                    | Description                                            |
| ------------------------ | ------------------------------------------------------ |
| `transaction_id`         | The `transaction_id` from the Step 1 response.         |
| `journey_transaction_id` | The `journey_transaction_id` from the Step 1 response. |

### Response

```json theme={null}
{
  "status": "SUCCESS",
  "message": "Success",
  "status_code": "success",
  "transaction_id": "80107cd7-e077-4d8d-a4d7-02f3ede2f9fd",
  "journey_transaction_id": "EQ.GT.533b16b6-0a95-4d86-8585-09f51d1d9773#<journey_id>#98df5278c6e1467684c3ca67b93b796d",
  "journey_id": "<journey_id>",
  "data": {
    "insights": {
      "analytics_excel_report": [
        {
          "report_s3_url": "<s3_url_link>"
        }
      ]
    }
  }
}
```

### Response fields

| Field                                                  | Description                                               |
| ------------------------------------------------------ | --------------------------------------------------------- |
| `status`                                               | Overall status, e.g. `SUCCESS`.                           |
| `message`                                              | Human-readable status message.                            |
| `status_code`                                          | Machine-readable status code, e.g. `success`.             |
| `transaction_id`                                       | Unique ID for this analytics transaction.                 |
| `journey_transaction_id`                               | Fully-qualified journey transaction reference.            |
| `journey_id`                                           | The `journey_id` provided by Moneyone for this variant.   |
| `data.insights.analytics_excel_report[].report_s3_url` | Pre-signed S3 URL to download the generated Excel report. |

<Note>
  The `report_s3_url` is a time-limited pre-signed link — download the report promptly before
  it expires.
</Note>
