> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.credit.aarthiklabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.credit.aarthiklabs.com/_mcp/server.

# Request & Prefill Model

> Understand the borrower identity, product selection, and pre-fill payloads for Hosted Experience.

Hosted Experience lets you start with very little borrower data and add deeper pre-fill later. The core rule is simple: send a stable borrower identity, choose the journey type, and send only data that your app is allowed to share.

## Session Request Shape

Create a Hosted Experience URL with:

```txt
POST /api/lab/sessions
Authorization: Bearer PLATFORM_API_KEY
Content-Type: application/json
```

Top-level request keys:

| Field                | Required               | Purpose                                                                           |
| -------------------- | ---------------------- | --------------------------------------------------------------------------------- |
| `borrowerProviderID` | Yes                    | Stable borrower identity from your system.                                        |
| `journeyType`        | Recommended            | Credit journey to open. Use `PERSONAL_LOAN` or `GOLD_LOAN`.                       |
| `profile`            | Usually                | Borrower personal details and contact number.                                     |
| `workProfile`        | No                     | Employment or income pre-fill.                                                    |
| `address`            | No                     | Address pre-fill.                                                                 |
| `journey`            | No                     | Product-level journey preferences such as end-use or credit report consent.       |
| `goldLoan`           | For Gold Loan pre-fill | Gold Loan-specific fields such as jewellery weight, purity, and requested amount. |

The response shown to your front-end should contain only:

```json
{
  "embedURL": "https://credit.aarthiklabs.com/lab/embed?...#bt_live_xxx"
}
```

## Borrower Identity

`borrowerProviderID` is your permanent borrower reference for the Aarthik Labs platform.

Keep a stable one-to-one mapping between the borrower in your system and `borrowerProviderID`. If you send a different ID for the same borrower later, the platform may treat the borrower as a new borrower, which can break resume continuity and application tracking.

Recommended examples:

* customer ID from your system
* user ID from your system
* a stable borrower reference generated by your back-end

Avoid examples:

* session ID
* random UUID generated on every click
* device ID
* temporary lead ID that changes later

## Minimal vs Extended Pre-fill

Minimal pre-fill gets the borrower into the journey quickly. Extended pre-fill can reduce repeated data entry and improve completion.

Use minimal pre-fill when:

* you only know the borrower identity and contact number
* you want the borrower to provide most information inside the Hosted Experience
* you are still validating the product placement in your app

Use extended pre-fill when:

* you already have verified borrower profile details
* the borrower has consented to share those details
* you want to reduce form entry inside the Hosted Experience

## Personal Loan Examples

### Personal Loan (minimal pre-fill)

```json
{
  "borrowerProviderID": "BORROWER-123",
  "journeyType": "PERSONAL_LOAN",
  "profile": {
    "contactNumber": "9876543210"
  }
}
```

Response:

```json
{
  "embedURL": "https://credit.aarthiklabs.com/lab/embed?tenant_id=tenant_123&application_id=app_123&borrower_provider_id=BORROWER-123&journey_type=PERSONAL_LOAN#bt_live_personal_minimal"
}
```

### Personal Loan (salaried) (extended pre-fill)

```json
{
  "borrowerProviderID": "BORROWER-SAL-123",
  "journeyType": "PERSONAL_LOAN",
  "profile": {
    "contactNumber": "9876543210",
    "pan": "ABCDE1234F",
    "panName": "Rahul Sharma",
    "dob": "1995-06-20",
    "gender": "male",
    "personalemail": "rahul@example.com"
  },
  "workProfile": {
    "employmentType": "salaried",
    "officialemail": "rahul@company.com",
    "income": "75000",
    "incomeType": "monthly",
    "companyName": "Acme Pvt Ltd"
  },
  "address": {
    "addressL1": "Flat 301, Sunrise Heights",
    "addressL2": "MG Road",
    "city": "Bengaluru",
    "state": "Karnataka",
    "pincode": "560001"
  },
  "journey": {
    "endUse": "travel",
    "creditReportConsent": true
  }
}
```

Response:

```json
{
  "embedURL": "https://credit.aarthiklabs.com/lab/embed?tenant_id=tenant_123&application_id=app_123&borrower_provider_id=BORROWER-SAL-123&journey_type=PERSONAL_LOAN#bt_live_personal_salaried"
}
```

### Personal Loan (self-employed) (extended pre-fill)

```json
{
  "borrowerProviderID": "BORROWER-SE-123",
  "journeyType": "PERSONAL_LOAN",
  "profile": {
    "contactNumber": "9876543211",
    "pan": "BCDEF2345G",
    "panName": "Priya Mehta",
    "dob": "1992-04-15",
    "gender": "female",
    "personalemail": "priya@example.com"
  },
  "workProfile": {
    "employmentType": "selfEmployed",
    "income": "80000",
    "incomeType": "monthly",
    "companyName": "Mehta Traders",
    "udyamNumber": "UDYAM-DL-10-1234567"
  },
  "address": {
    "addressL1": "Shop 12, Market Plaza",
    "addressL2": "Ring Road",
    "city": "Delhi",
    "state": "Delhi",
    "pincode": "110001"
  },
  "journey": {
    "endUse": "businessExpansion",
    "creditReportConsent": true
  }
}
```

Response:

```json
{
  "embedURL": "https://credit.aarthiklabs.com/lab/embed?tenant_id=tenant_123&application_id=app_123&borrower_provider_id=BORROWER-SE-123&journey_type=PERSONAL_LOAN#bt_live_personal_self_employed"
}
```

## Gold Loan Examples

### Gold Loan (minimal pre-fill)

```json
{
  "borrowerProviderID": "BORROWER-GOLD-123",
  "journeyType": "GOLD_LOAN",
  "profile": {
    "contactNumber": "9876543212"
  }
}
```

Response:

```json
{
  "embedURL": "https://credit.aarthiklabs.com/lab/embed?tenant_id=tenant_123&application_id=app_123&borrower_provider_id=BORROWER-GOLD-123&journey_type=GOLD_LOAN#bt_live_gold_minimal"
}
```

### Gold Loan (extended pre-fill)

```json
{
  "borrowerProviderID": "BORROWER-GOLD-456",
  "journeyType": "GOLD_LOAN",
  "profile": {
    "contactNumber": "9876543213",
    "pan": "CDEFG3456H",
    "panName": "Amit Verma",
    "dob": "1990-11-08",
    "gender": "male",
    "personalemail": "amit@example.com"
  },
  "workProfile": {
    "employmentType": "salaried",
    "officialemail": "amit@company.com",
    "income": "90000",
    "incomeType": "monthly",
    "companyName": "Verma Services Pvt Ltd"
  },
  "address": {
    "addressL1": "House 44, Lake View Road",
    "addressL2": "Andheri East",
    "city": "Mumbai",
    "state": "Maharashtra",
    "pincode": "400069"
  },
  "goldLoan": {
    "userType": "individual",
    "jewelleryWeightGrams": "52",
    "purity": "22K",
    "endUse": "medicalTreatmentAndEmergencies",
    "aaID": "9876543213@finvu",
    "requestedAmount": "400000",
    "requestedTenureMonths": 5
  },
  "journey": {
    "creditReportConsent": true
  }
}
```

Response:

```json
{
  "embedURL": "https://credit.aarthiklabs.com/lab/embed?tenant_id=tenant_123&application_id=app_123&borrower_provider_id=BORROWER-GOLD-456&journey_type=GOLD_LOAN#bt_live_gold_extended"
}
```

## Field Reference

### Profile

| Field                   | Notes                                                                              |
| ----------------------- | ---------------------------------------------------------------------------------- |
| `profile.contactNumber` | Indian mobile number. Required for Gold Loan and recommended for all integrations. |
| `profile.pan`           | PAN in uppercase format, for example `ABCDE1234F`.                                 |
| `profile.panName`       | Name associated with PAN.                                                          |
| `profile.dob`           | Date of birth. Recommended format: `YYYY-MM-DD`.                                   |
| `profile.gender`        | Use `male`, `female`, or `transgender`.                                            |
| `profile.personalemail` | Personal email address.                                                            |

### Work Profile

| Field                        | Notes                                                    |
| ---------------------------- | -------------------------------------------------------- |
| `workProfile.employmentType` | Use `salaried` or `selfEmployed`.                        |
| `workProfile.officialemail`  | Work email address.                                      |
| `workProfile.income`         | Monthly or annual income value.                          |
| `workProfile.incomeType`     | Use `monthly` or `annual`.                               |
| `workProfile.companyName`    | Employer or business name.                               |
| `workProfile.udyamNumber`    | Udyam number for self-employed borrowers when available. |

### Address

| Field               | Notes               |
| ------------------- | ------------------- |
| `address.addressL1` | Address line 1.     |
| `address.addressL2` | Address line 2.     |
| `address.city`      | City.               |
| `address.state`     | State.              |
| `address.pincode`   | Six-digit PIN code. |

### Journey

| Field                         | Notes                                                                  |
| ----------------------------- | ---------------------------------------------------------------------- |
| `journey.endUse`              | Product-specific end-use value when your integration collects it.      |
| `journey.creditReportConsent` | Send `true` only when the borrower has provided credit report consent. |

### Gold Loan

| Field                            | Notes                                                             |
| -------------------------------- | ----------------------------------------------------------------- |
| `goldLoan.userType`              | Use `individual` or `non-individual`.                             |
| `goldLoan.constitution`          | Constitution value for non-individual borrowers, when applicable. |
| `goldLoan.jewelleryWeightGrams`  | Gold jewellery weight in grams.                                   |
| `goldLoan.purity`                | Use `24K`, `22K`, `21K`, `18K`, `14K`, or `9K`.                   |
| `goldLoan.endUse`                | Use a supported product-specific end-use value.                   |
| `goldLoan.aaID`                  | Account Aggregator handle, when available.                        |
| `goldLoan.requestedAmount`       | Requested loan amount.                                            |
| `goldLoan.requestedTenureMonths` | Requested tenure in months.                                       |

Supported Gold Loan end-use values:

* `marriage`
* `familyFunctions`
* `medicalTreatmentAndEmergencies`
* `travelEducationExpenses`
* `businessExpansion`
* `agricultureAndFarmRelatedNeeds`
* `purchaseOfEquipment`
* `other`