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

# Push PDF

> Upload bank statement PDFs for analytics processing. Step 1 of the PDF Analytics flow.

## Overview

The Push PDF API is the first step in the PDF Analytics flow. It allows you to upload one or more bank statement PDF files (as Base64-encoded data) for analytics processing. After a successful upload, the API returns a `ref_token` that you use in subsequent steps to check processing status and retrieve the analytics results.

### PDF Analytics Flow

<Steps>
  <Step title="Push PDF (this API)">
    Upload bank statement PDFs with customer details. Receive a `ref_token` for tracking.
  </Step>

  <Step title="Check Status">
    Poll the [Pull Status](/api-reference/analytics/pdf-pull-status) API using the `ref_token` to check if processing is complete.
  </Step>

  <Step title="Pull Analytics JSON">
    Once processing is complete, retrieve the analytics results using the [Pull Analytics JSON](/api-reference/analytics/pdf-pull-json) API.
  </Step>
</Steps>

## Authentication

This API requires authentication using the following headers:

<ParamField header="client_id" type="string" required>
  Your unique client identifier provided by FinPro during onboarding.
</ParamField>

<ParamField header="client_secret" type="string" required>
  Your confidential client secret key provided by FinPro. Must be kept secure.
</ParamField>

<ParamField header="appIdentifier" type="string" required>
  The unique identifier for your application.
</ParamField>

<ParamField header="organisationId" type="string" required>
  Your organization's unique identifier assigned by FinPro.
</ParamField>

<ParamField header="content-Type" type="string" required>
  Must be set to `application/json`.
</ParamField>

## Request Body

<ParamField body="customer_name" type="string" required>
  Full name of the customer whose bank statement is being uploaded.
</ParamField>

<ParamField body="mobile_number" type="string" required>
  Customer's mobile number.
</ParamField>

<ParamField body="loan_account_number" type="string" required>
  The loan account number associated with this customer.
</ParamField>

<ParamField body="fileData" type="object[]" required>
  An array of file objects, each representing a bank statement PDF to be processed.

  <Expandable title="fileData item properties">
    <ParamField body="bank_account_number" type="string" required>
      The bank account number associated with the PDF statement.
    </ParamField>

    <ParamField body="file" type="string" required>
      The file name of the PDF (e.g., `SBI.pdf`).
    </ParamField>

    <ParamField body="file_blob" type="string" required>
      Base64-encoded content of the PDF file.
    </ParamField>

    <ParamField body="password" type="string" optional>
      Password to unlock the PDF, if the bank statement is password-protected.
    </ParamField>

    <ParamField body="remarks" type="string" optional>
      Any additional remarks or notes for this file.
    </ParamField>
  </Expandable>
</ParamField>

### Request Example

```json theme={null}
{
  "customer_name": "John Doe",
  "mobile_number": "9876543210",
  "loan_account_number": "LOAN123456",
  "fileData": [
    {
      "bank_account_number": "1234567890",
      "file": "SBI.pdf",
      "file_blob": "<Base64-encoded PDF content>",
      "password": "",
      "remarks": "Savings account statement"
    }
  ]
}
```

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --location --request POST '{{Base_URL}}/analytics/pdf/push' \
  --header 'client_id: {{Client_Id}}' \
  --header 'client_secret: {{Client_Secret}}' \
  --header 'organisationId: {{Organisation_Id}}' \
  --header 'appIdentifier: {{App_Identifier}}' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "customer_name": "John Doe",
      "mobile_number": "9876543210",
      "loan_account_number": "LOAN123456",
      "fileData": [
          {
              "bank_account_number": "1234567890",
              "file": "SBI.pdf",
              "file_blob": "<Base64-encoded PDF content>",
              "password": "",
              "remarks": "Savings account statement"
          }
      ]
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('{{Base_URL}}/analytics/pdf/push', {
    method: 'POST',
    headers: {
      'client_id': '{{Client_Id}}',
      'client_secret': '{{Client_Secret}}',
      'organisationId': '{{Organisation_Id}}',
      'appIdentifier': '{{App_Identifier}}',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      customer_name: 'John Doe',
      mobile_number: '9876543210',
      loan_account_number: 'LOAN123456',
      fileData: [
        {
          bank_account_number: '1234567890',
          file: 'SBI.pdf',
          file_blob: '<Base64-encoded PDF content>',
          password: '',
          remarks: 'Savings account statement'
        }
      ]
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "{{Base_URL}}/analytics/pdf/push"

  headers = {
      "client_id": "{{Client_Id}}",
      "client_secret": "{{Client_Secret}}",
      "organisationId": "{{Organisation_Id}}",
      "appIdentifier": "{{App_Identifier}}",
      "Content-Type": "application/json"
  }

  payload = {
      "customer_name": "John Doe",
      "mobile_number": "9876543210",
      "loan_account_number": "LOAN123456",
      "fileData": [
          {
              "bank_account_number": "1234567890",
              "file": "SBI.pdf",
              "file_blob": "<Base64-encoded PDF content>",
              "password": "",
              "remarks": "Savings account statement"
          }
      ]
  }

  response = requests.post(url, json=payload, headers=headers)
  print(response.json())
  ```
</CodeGroup>


## OpenAPI

````yaml POST /analytics/pdf/push
openapi: 3.0.3
info:
  title: FinPro API
  description: MoneyOne FinPro - Account Aggregator FIU Platform APIs
  version: 1.21.0
servers:
  - url: '{baseUrl}'
    description: FinPro API Server
    variables:
      baseUrl:
        default: https://scramblerpay-uat.moneyone.in
        description: API Base URL - change this to your environment
security:
  - clientId: []
    clientSecret: []
    organisationId: []
    appIdentifier: []
paths:
  /analytics/pdf/push:
    post:
      tags:
        - Analytics
      summary: Push PDF
      description: >-
        Upload bank statement PDFs for analytics processing. Step 1 of the PDF
        Analytics flow.
      operationId: pushPdfAnalytics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PdfPushRequest'
            example:
              customer_name: John Doe
              mobile_number: '9876543210'
              loan_account_number: LOAN123456
              fileData:
                - bank_account_number: '1234567890'
                  file: SBI.pdf
                  file_blob: <Base64-encoded PDF content>
                  password: ''
                  remarks: Savings account statement
      responses:
        '200':
          description: PDF uploaded successfully for processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PdfPushResponse'
              example:
                status: success
                data:
                  ref_token: 34b11d14-1bee-4966-bcdc-c2c7ce9ff9a5
                  message: PDF uploaded successfully. Use ref_token to check status.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                ver: 1.21.0
                timestamp: '2025-10-01T11:49:28.920Z'
                errorCode: InvalidRequest
                errorMsg: Invalid file data
                status: FP0001
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - clientId: []
          clientSecret: []
          organisationId: []
          appIdentifier: []
components:
  schemas:
    PdfPushRequest:
      type: object
      description: Request body for uploading bank statement PDFs for analytics processing.
      required:
        - customer_name
        - mobile_number
        - loan_account_number
        - fileData
      properties:
        customer_name:
          type: string
          description: Full name of the customer.
          example: John Doe
        mobile_number:
          type: string
          description: Customer's mobile number.
          example: '9876543210'
        loan_account_number:
          type: string
          description: Loan account number associated with the customer.
          example: LOAN123456
        fileData:
          type: array
          description: Array of PDF file objects to be processed.
          items:
            type: object
            required:
              - bank_account_number
              - file
              - file_blob
            properties:
              bank_account_number:
                type: string
                description: Bank account number associated with the statement.
                example: '1234567890'
              file:
                type: string
                description: File name of the PDF.
                example: SBI.pdf
              file_blob:
                type: string
                description: Base64-encoded content of the PDF file.
              password:
                type: string
                description: Password for password-protected PDFs.
              remarks:
                type: string
                description: Additional remarks or notes.
    PdfPushResponse:
      type: object
      description: Response after successfully pushing a PDF for processing.
      properties:
        status:
          type: string
          description: API call status.
          example: success
        data:
          type: object
          properties:
            ref_token:
              type: string
              description: Reference token to track the processing job.
              example: 34b11d14-1bee-4966-bcdc-c2c7ce9ff9a5
            message:
              type: string
              description: Status message.
              example: PDF uploaded successfully. Use ref_token to check status.
    ErrorResponse:
      type: object
      properties:
        ver:
          type: string
          description: API version
        timestamp:
          type: string
          format: date-time
          description: When the error occurred
        errorCode:
          type: string
          description: Error category code
        errorMsg:
          type: string
          description: Detailed error message
        status:
          type: string
          description: FinPro-specific error code (FPxxxx format)
  securitySchemes:
    clientId:
      type: apiKey
      in: header
      name: client_id
      description: Your unique client identifier provided by MoneyOne during FIU onboarding
    clientSecret:
      type: apiKey
      in: header
      name: client_secret
      description: Your confidential client secret provided by MoneyOne
    organisationId:
      type: apiKey
      in: header
      name: organisationId
      description: Your organization's unique identifier in the FinPro system
    appIdentifier:
      type: apiKey
      in: header
      name: appIdentifier
      description: Application-specific identifier for tracking API calls

````