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

# Step 1 - Initiate Hosted Journey

> Starts a hosted loan journey (channel: API_HOSTED) and returns a single-use hostedUrl to redirect the applicant to EASYCRED web screens.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/partner/journey/initiate
openapi: 3.1.0
info:
  title: EASYCRED LENDING APIs
  version: 1.0.0
  description: >-
    Comprehensive EASYCRED Partner API specification for Product Discovery,
    Hosted Journeys, Headless Journeys, Application Tracking, and Webhooks.
servers:
  - url: https://api.easycred.co.in
    description: Production API
  - url: https://dev.easycred.co.in
    description: Sandbox / Development API
security:
  - apiKeyAuth: []
tags:
  - name: Product Access
    description: Discover and query eligible loan products
  - name: Hosted Journey
    description: EASYCRED-hosted webview integration
  - name: Headless Journey
    description: Full native REST API journey integration
  - name: Tracking and Leads
    description: Track applications and query lead status
  - name: Webhooks
    description: Register, list, and manage real-time webhook subscriptions
paths:
  /api/v1/partner/journey/initiate:
    post:
      tags:
        - Hosted Journey
      summary: Step 1 - Initiate Hosted Journey
      description: >-
        Starts a hosted loan journey (channel: API_HOSTED) and returns a
        single-use hostedUrl to redirect the applicant to EASYCRED web screens.
      operationId: initiateHostedJourney
      parameters:
        - name: x-api-key
          in: header
          required: true
          description: >-
            Your active EASYCRED Partner API Key (format: ec_live_... or
            ec_test_...)
          schema:
            type: string
            example: ec_live_abc123_xyz789
        - name: x-timestamp
          in: header
          required: true
          description: >-
            Unix epoch seconds. Requests outside the 5-minute tolerance window
            are rejected.
          schema:
            type: string
            example: '1759820800'
        - name: x-nonce
          in: header
          required: true
          description: Unique UUID v4 nonce per request to prevent replay attacks.
          schema:
            type: string
            example: d3b07384-d113-4ec4-9d45-2f928e123456
        - name: x-signature
          in: header
          required: true
          description: >-
            HMAC-SHA256 signature calculated over method, path, timestamp,
            nonce, and raw request body.
          schema:
            type: string
            example: a1b2c3d4e5f67890123456789abcdef0123456789abcdef0123456789abcdef0
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostedInitiateRequest'
            examples:
              personalLoan:
                summary: Personal Loan (ONLINE_PERSONAL)
                value:
                  channel: API_HOSTED
                  productCode: ONLINE_PERSONAL
                  mobile: '9876543210'
                  loanAmount: 150000
                  customer:
                    fullName: Rahul Sharma
                    pan: ABCDE1234F
                    dob: '1992-06-15'
                    gender: MALE
                    employmentType: salaried
                    monthlyIncome: 65000
                    pinCode: '560001'
                    city: Bengaluru
                    state: Karnataka
                    addressL1: Flat 402, Green Glen Layout, Bellandur
              pocketLoan:
                summary: Pocket Loan (ONLINE_SHORT_TERM)
                value:
                  channel: API_HOSTED
                  productCode: ONLINE_SHORT_TERM
                  mobile: '9876543210'
                  loanAmount: 25000
                  customer:
                    fullName: Ananya Verma
                    pan: BCDEF2345G
                    dob: '1997-09-20'
                    gender: FEMALE
                    employmentType: salaried
                    monthlyIncome: 35000
                    pinCode: '110001'
                    city: New Delhi
                    state: Delhi
                    addressL1: Connaught Place
              businessLoan:
                summary: Business Loan (ONLINE_BUSINESS)
                value:
                  channel: API_HOSTED
                  productCode: ONLINE_BUSINESS
                  mobile: '9876543210'
                  loanAmount: 1000000
                  customer:
                    fullName: Vikram Patel
                    companyName: Patel Industrial Solutions Pvt Ltd
                    pan: ABCDE5678G
                    dob: '1985-08-22'
                    gender: MALE
                    employmentType: selfEmployed
                    annualIncome: 4800000
                    udyamNumber: UDYAM-KR-03-0123456
                    pinCode: '400051'
                    city: Mumbai
                    state: Maharashtra
                    addressL1: Unit 12, Ground Floor, Bandra Kurla Complex
              goldLoan:
                summary: Gold Loan (ONLINE_GOLD)
                value:
                  channel: API_HOSTED
                  productCode: ONLINE_GOLD
                  mobile: '9876543210'
                  loanAmount: 200000
                  customer:
                    fullName: Sunita Verma
                    pan: FGHIJ5678K
                    dob: '1988-04-10'
                    gender: FEMALE
                    employmentType: selfEmployed
                    monthlyIncome: 40000
                    pinCode: '110024'
                    city: New Delhi
                    state: Delhi
                    addressL1: A-45, Lajpat Nagar 4
                  goldLoanDetails:
                    jewellaryList:
                      - Gold Bangle 22K (2 Pcs)
                      - Gold Chain 22K (1 Pc)
                    grams: '42.5'
      responses:
        '200':
          description: Journey initiated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostedInitiateResponse'
        '400':
          description: Bad Request - Validation or payload failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: >-
            Unauthorized - Invalid API key, signature mismatch, or replayed
            nonce
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden - Insufficient permissions or unassigned product scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Not Found - The requested resource or application does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Rate Limit Exceeded - Too many requests in short interval
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    HostedInitiateRequest:
      type: object
      required:
        - channel
        - productCode
        - mobile
        - loanAmount
        - customer
      properties:
        channel:
          type: string
          enum:
            - API_HOSTED
          example: API_HOSTED
        productCode:
          type: string
          enum:
            - ONLINE_PERSONAL
            - ONLINE_SHORT_TERM
            - ONLINE_BUSINESS
            - ONLINE_GOLD
          example: ONLINE_PERSONAL
        mobile:
          type: string
          pattern: ^[6-9]\d{9}$
          example: '9876543210'
        loanAmount:
          type: number
          example: 150000
        customer:
          $ref: '#/components/schemas/CustomerDetails'
        goldLoanDetails:
          $ref: '#/components/schemas/GoldLoanDetails'
    HostedInitiateResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          required:
            - journeyId
            - hostedUrl
            - nextAction
          properties:
            journeyId:
              type: string
              example: jrn_67a12b3c4d5e6f7a
            hostedUrl:
              type: string
              format: uri
              example: https://apply.easycred.co.in/journey/resume?token=eyJhbGciOi...
            nextAction:
              type: object
              properties:
                type:
                  type: string
                  example: WAITING_FOR_REDIRECT
                category:
                  type: string
                  example: WAIT
    ApiError:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Invalid signature or expired timestamp
    CustomerDetails:
      type: object
      required:
        - fullName
        - pan
        - dob
        - gender
        - employmentType
        - pinCode
      properties:
        fullName:
          type: string
          example: Rahul Sharma
        pan:
          type: string
          pattern: ^[A-Z]{5}[0-9]{4}[A-Z]{1}$
          example: ABCDE1234F
        dob:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          example: '1992-06-15'
        gender:
          type: string
          enum:
            - MALE
            - FEMALE
            - OTHER
          example: MALE
        employmentType:
          type: string
          enum:
            - salaried
            - selfEmployed
          example: salaried
        monthlyIncome:
          type: number
          example: 65000
        annualIncome:
          type: number
          example: 4800000
        companyName:
          type: string
          example: Patel Industrial Solutions Pvt Ltd
        udyamNumber:
          type: string
          example: UDYAM-KR-03-0123456
        pinCode:
          type: string
          pattern: ^\d{6}$
          example: '560001'
        city:
          type: string
          example: Bengaluru
        state:
          type: string
          example: Karnataka
        addressL1:
          type: string
          example: Flat 402, Green Glen Layout, Bellandur
        addressL2:
          type: string
          example: Near EcoWorld Tech Park
    GoldLoanDetails:
      type: object
      required:
        - jewellaryList
        - grams
      properties:
        jewellaryList:
          type: array
          items:
            type: string
          example:
            - Gold Bangle 22K (2 Pcs)
            - Gold Chain 22K (1 Pc)
        grams:
          type: string
          example: '42.5'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: EASYCRED Partner API Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.