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

# Initiate Loan Journey



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/partner/journey/initiate
openapi: 3.1.0
info:
  title: EASYCRED Partner API
  version: 1.0.0
  description: >-
    EASYCRED-managed secure partner API. All requests require a Bearer API key
    plus HMAC request signing (X-Signature / X-Timestamp / X-Nonce). No raw
    customer PII is exposed by this version. Signing convention: the HMAC-SHA256
    is computed over method, path, timestamp, nonce and the raw request body.
    For GET requests (and any request with no body) the body component is the
    EMPTY string '' — sign over '' for those requests.
servers:
  - url: https://api.easycred.in
    description: Production
security:
  - bearerAuth: []
paths:
  /api/v1/partner/journey/initiate:
    post:
      summary: Initiate Loan Journey
      parameters:
        - name: X-Signature
          in: header
          required: true
          description: >-
            HMAC-SHA256 signature over method, path, timestamp, nonce and raw
            body.
          schema:
            type: string
        - name: X-Timestamp
          in: header
          required: true
          description: >-
            Unix epoch seconds. Requests outside the tolerance window are
            rejected.
          schema:
            type: string
        - name: X-Nonce
          in: header
          required: true
          description: Unique per-request nonce. Replays are rejected.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JourneyInitiateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JourneyInitiateResponse'
        '400':
          description: Missing/invalid channel, productCode, mobile or customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: >-
            Authentication failed (missing/invalid key, signature, or replayed
            nonce).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Authenticated but missing the required scope / product access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth:
            - leads:create
components:
  schemas:
    JourneyInitiateRequest:
      type: object
      properties:
        channel:
          type: string
          enum:
            - API_HOSTED
            - API_HEADLESS
        productCode:
          type: string
          enum:
            - ONLINE_PERSONAL
            - ONLINE_GOLD
            - PERSONAL_LOAN
            - GOLD_LOAN
          description: >-
            Catalog code (ONLINE_*) or legacy alias. Instant PL (ONLINE_INSTANT)
            is NOT a journey product — use POST /api/v1/partner/instant-loans.
        mobile:
          type: string
          pattern: ^[6-9]\d{9}$
          example: '9876543210'
        customer:
          $ref: '#/components/schemas/UserDetails'
        goldLoanDetails:
          $ref: '#/components/schemas/GoldLoanDetails'
      required:
        - channel
        - productCode
        - mobile
        - customer
    JourneyInitiateResponse:
      type: object
      description: >-
        API_HOSTED returns a `hostedUrl` (single-use resume link to hand to the
        customer). API_HEADLESS returns a `journeySession` token. Authorize
        subsequent /action and /{journeyId} calls by passing it in the
        `journey_session` cookie OR the `X-Journey-Session` header — NOT in
        Authorization, which carries your API key.
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          properties:
            journeyId:
              type: string
            nextAction:
              $ref: '#/components/schemas/NextAction'
            hostedUrl:
              type: string
              format: uri
              description: API_HOSTED only.
            journeySession:
              type: string
              description: >-
                API_HEADLESS only — pass back via the journey_session cookie or
                X-Journey-Session header on /action and /{journeyId}.
          required:
            - journeyId
            - nextAction
      required:
        - success
        - data
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
      required:
        - success
        - error
    UserDetails:
      type: object
      description: Applicant details. Provide monthlyIncome OR annualIncome (at least one).
      required:
        - pan
        - dob
        - gender
        - personalEmail
        - employmentType
        - pinCode
        - termsAccepted
      properties:
        firstName:
          type: string
        lastName:
          type: string
        pan:
          type: string
          pattern: ^[A-Z]{5}[0-9]{4}[A-Z]$
          example: DJHPG8765E
        dob:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: YYYY-MM-DD.
          example: '1990-05-01'
        gender:
          type: string
          enum:
            - MALE
            - FEMALE
            - TRANSGENDER
            - OTHER
        personalEmail:
          type: string
          format: email
        officialEmail:
          type: string
          format: email
        employmentType:
          type: string
          enum:
            - salaried
            - selfEmployed
        companyName:
          type: string
        monthlyIncome:
          type: number
          description: Provide this OR annualIncome.
        annualIncome:
          type: number
          description: Provide this OR monthlyIncome.
        addressL1:
          type: string
        addressL2:
          type: string
        city:
          type: string
        state:
          type: string
        pinCode:
          type: string
          pattern: ^\d{6}$
          description: 'Note: camelCase pinCode.'
          example: '560001'
        endUse:
          type: string
        termsAccepted:
          type: boolean
          enum:
            - true
          description: Must be true.
    GoldLoanDetails:
      type: object
      description: Required when productCode is ONLINE_GOLD.
      required:
        - jewellaryList
        - grams
      properties:
        jewellaryList:
          type: array
          items:
            type: string
          minItems: 1
          example:
            - Gold Ring
            - Gold Chain
        grams:
          type: string
          pattern: ^\d+(\.\d+)?$
          description: Numeric string (e.g. "50").
          example: '50'
    NextAction:
      type: object
      description: >-
        The mirrored next step the client must drive (POLL / REDIRECT / COLLECT
        / TERMINAL).
      properties:
        type:
          type: string
          description: >-
            e.g. POLL_FOR_OFFERS, SELECT_OFFER, SUBMIT_BANK_DETAILS,
            REDIRECT_TO_KYC, COMPLETED.
        category:
          type: string
          enum:
            - POLL
            - REDIRECT
            - COLLECT
            - TERMINAL
      required:
        - type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key of the form ec_(live|test)_<prefix>_<secret>. Scopes are listed
        per operation.

````