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

# Get Loan Terms

> Retrieves the loan terms and conditions for a specific organization.

Fetches the loan terms and conditions, including interest rates, fees, repayment schedules, and other important terms that apply to loans from a specific organization.

<RequestExample>
  ```bash cURL GET theme={null}
  [https://finlend.fincode.software/api/v1/services/user/get-loan-terms/{organisationId}](https://finlend.fincode.software/api/v1/services/user/get-loan-terms/{organisationId})
  ```
</RequestExample>

## Request Headers

<ParamField header="X-Auth-Token" type="string" required>
  The **JWT Access Token** obtained from the `/login` or `/refresh-token` endpoint.
</ParamField>

<ParamField header="x-idempotency-key" type="string" required>
  Unique idempotency key for the request to prevent duplicate processing.
</ParamField>

<ParamField header="x-fapi-auth-date" type="string" required>
  The date and time at which the request was initiated (ISO 8601 format).
</ParamField>

<ParamField header="x-fapi-customer-ip-address" type="string" required>
  The IP address of the customer making the request.
</ParamField>

<ParamField header="x-fapi-interaction-id" type="string" required>
  Unique identifier for the interaction/session.
</ParamField>

## Path Parameters

<ParamField path="organisationId" type="string" required>
  The unique identifier (UUID) of the organization whose loan terms to retrieve.
</ParamField>

## Response

Returns the loan terms and conditions for the organization.

<ResponseField name="status" type="string" default="SUCCESS">
  Overall status of the API request.
</ResponseField>

<ResponseField name="data" type="object">
  Loan terms and conditions details.

  <Expandable title="data object">
    <ResponseField name="organisationId" type="string">
      Unique identifier of the organization.
    </ResponseField>

    <ResponseField name="termsAndConditions" type="string">
      Full text of the terms and conditions.
    </ResponseField>

    <ResponseField name="interestRateRange" type="object">
      Range of interest rates applicable.
    </ResponseField>

    <ResponseField name="feeStructure" type="object">
      Details of fees applicable to loans.
    </ResponseField>

    <ResponseField name="repaymentTerms" type="object">
      Information about repayment schedules and options.
    </ResponseField>

    <ResponseField name="eligibilityCriteria" type="object">
      Criteria that customers must meet to qualify for loans.
    </ResponseField>

    <ResponseField name="lastUpdated" type="string">
      Date when the terms were last updated.
    </ResponseField>
  </Expandable>
</ResponseField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://finlend.fincode.software/api/v1/services/user/get-loan-terms/123e4567-e89b-12d3-a456-426614174000' \
  --header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
  --header 'x-idempotency-key: unique-key-12345' \
  --header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
  --header 'x-fapi-customer-ip-address: 192.168.1.1' \
  --header 'x-fapi-interaction-id: interaction-12345'
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const BASE_URL = 'https://finlend.fincode.software/api/v1/services/user';

  async function getLoanTerms(accessToken, organisationId) {
    try {
      const response = await axios.get(
        `${BASE_URL}/get-loan-terms/${organisationId}`,
        {
          headers: {
            'X-Auth-Token': accessToken,
            'x-idempotency-key': `key-${Date.now()}`,
            'x-fapi-auth-date': new Date().toISOString(),
            'x-fapi-customer-ip-address': '192.168.1.1',
            'x-fapi-interaction-id': `interaction-${Date.now()}`,
          },
        }
      );
      return terms;
    } catch (error) {
      console.error(
        'Failed to fetch loan terms:',
        error.response?.data || error.message
      );
      throw error;
    }
  }

  // Usage Example
  const accessToken = 'YOUR_JWT_ACCESS_TOKEN';
  const organisationId = '123e4567-e89b-12d3-a456-426614174000';
  getLoanTerms(accessToken, organisationId);
  ```
</CodeGroup>
