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

# Submit Customer Action



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/partner/journey/{journeyId}/action
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/{journeyId}/action:
    post:
      summary: Submit Customer Action
      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
        - name: journeyId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JourneyActionRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JourneyActionResponse'
        '400':
          description: Invalid action kind.
          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'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Journey state conflict (version mismatch).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth:
            - offers:select
components:
  schemas:
    JourneyActionRequest:
      type: object
      description: >-
        The payload shape depends on `kind`:

        - SELECT_OFFER → { offerId, loanAmount }

        - SELECT_GOLD_LOAN_BRANCH → { offerId, branchLocationId } where
        branchLocationId is an `id` from data.offers[].branchLocations[] (see
        GET /{journeyId})

        - SUBMIT_BANK_ACCOUNT → { accHolderName, acctype, accNo, ifscCode }
      properties:
        kind:
          type: string
          enum:
            - SELECT_OFFER
            - SELECT_GOLD_LOAN_BRANCH
            - SUBMIT_BANK_ACCOUNT
        payload:
          oneOf:
            - $ref: '#/components/schemas/SelectOfferPayload'
            - $ref: '#/components/schemas/SelectGoldLoanBranchPayload'
            - $ref: '#/components/schemas/SubmitBankAccountPayload'
      required:
        - kind
        - payload
    JourneyActionResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          properties:
            nextAction:
              $ref: '#/components/schemas/NextAction'
          required:
            - nextAction
      required:
        - success
        - data
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
      required:
        - success
        - error
    SelectOfferPayload:
      type: object
      description: Payload for kind=SELECT_OFFER.
      properties:
        offerId:
          type: string
          description: An offerId from data.offers[] (GET /{journeyId}).
        loanAmount:
          type: number
          exclusiveMinimum: 0
          description: Requested principal (> 0).
      required:
        - offerId
        - loanAmount
    SelectGoldLoanBranchPayload:
      type: object
      description: Payload for kind=SELECT_GOLD_LOAN_BRANCH.
      properties:
        offerId:
          type: string
          description: An offerId from data.offers[] (GET /{journeyId}).
        branchLocationId:
          type: string
          description: >-
            The chosen branch. This is the `id` of an entry in
            data.offers[].branchLocations[] returned by GET /{journeyId} while
            the journey sits at SELECT_GOLD_LOAN_BRANCH.
      required:
        - offerId
        - branchLocationId
    SubmitBankAccountPayload:
      type: object
      description: >-
        Payload for kind=SUBMIT_BANK_ACCOUNT (the FSM step is
        SUBMIT_BANK_DETAILS).
      properties:
        accHolderName:
          type: string
        acctype:
          type: string
          enum:
            - SAVING
            - CURRENT
        accNo:
          type: string
          minLength: 6
        ifscCode:
          type: string
          pattern: ^[A-Z]{4}0[A-Z0-9]{6}$
      required:
        - accHolderName
        - acctype
        - accNo
        - ifscCode
    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.

````