---
title: Loans purchase
slug: apis/lending/purchasing-a-loan/loans-purchase
description: This endpoint triggers the purchase of loans using criteria including type, date, bank, MPL ID, and investor options, returning batch details and a completion webhook.
icon: {"apiMethod":"POST"}
docTags: 
createdAt: 2026-05-14T06:19:51.241Z
---

## Execute loan purchase

:::BlockQuote
**POST&#x20;**/selling/api/loans/purchase
:::

This API executes the purchase of loans based on loan type and purchase date. The request body includes key details such as the **date, loan type,&#x20;**(1 for HFS, 2 for LTHFS), **issuing bank, MPL ID,&#x20;**&#x61;nd **investor ID&#x20;**(optional). The date parameter is required but does not impact the purchase process.  If the **investor ID&#x20;**&#x69;s left empty, loans will be purchased without investor allocation.

For example: Purchase HFS loans for MPL TST for issuing bank Cross River.

### Sample request

```json
{
  "date": "2025-01-01",
  "loanType": 1,
  "issuingBank": "CRB",
  "mplId": "YourMPLId",
  "investorId": "[YourInvestorId]",
  "dateFilter": {
    "dateType": "[FundedDate],
    "fromDate": "2026-05-14T06:40:03:854Z",
    "toDate": "2026-05-14T06:40:03:854Z"
  },
  "purchaseAccountNumber": "2392433617"
}
```

### Attributes description

| **Parameter**           | **Description**                                                                                                                                                                                    |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `date`                  | Purchase date in YYYY-MM-DD format. Must be a Federal Reserve business day. (required)                                                                                                             |
| `loanType`              | Loan type: 1 = HFS (Held for Sale), 2 = LTHFS (Long-Term Held for Sale), 3 = RET (Retained) (required)                                                                                             |
| `issuingBank`           | Issuing bank identifier (e.g., "CRB") (required)                                                                                                                                                   |
| `mplId`                 | Your Marketplace Lender identifier (required)                                                                                                                                                      |
| `investorId`            | Your Investor identifier (required)                                                                                                                                                                |
| `purchaseAccountNumber` | Specific purchase account to use. If omitted, the default account for your investor will be used (optional)                                                                                        |
| `dateFilter`            | Date types include FundedDate, PurchaseDate, OriginalPurchaseDate andSeasoningStartDate. All date filters use the same <br />YYYY-MM-DD<br /> format. Both the "from" and "to" dates are optional. |

### Sample response

```json
{
  "batchId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "PurchaseRequested",
  "loanCount": 25
}
```

When the purchase is complete, the user can receive a webhook "batchpurchasecomplete".
